entries.push_back(new NotePairs::Entry(key, note));
}
+void
+NotePairs::remove(const char *key)
+{
+ Vector<NotePairs::Entry *>::iterator i = entries.begin();
+ while (i != entries.end()) {
+ if ((*i)->name.cmp(key) == 0) {
+ NotePairs::Entry *e = (*i);
+ entries.prune(e);
+ delete e;
+ i = entries.begin(); // vector changed underneath us
+ } else
+ ++i;
+ }
+}
+
void
NotePairs::addStrList(const char *key, const char *values)
{
*/
void add(const char *key, const char *value);
+ /**
+ * Remove all notes with a given key.
+ */
+ void remove(const char *key);
+
/**
* Adds a note key and values strList to the notes list.
* If the key name already exists in list, add the new values to its set
// add new helper kv-pair notes to the credentials object
// so that any transaction using those credentials can access them
auth_user_request->user()->notes.appendNewOnly(&reply.notes);
+ // remove any private credentials detail which got added.
+ auth_user_request->user()->notes.remove("ha1");
static bool oldHelperWarningDone = false;
switch (reply.result) {
// add new helper kv-pair notes to the credentials object
// so that any transaction using those credentials can access them
auth_user_request->user()->notes.appendNewOnly(&reply.notes);
+ // remove any private credentials detail which got added.
+ auth_user_request->user()->notes.remove("token");
Auth::Negotiate::UserRequest *lm_request = dynamic_cast<Auth::Negotiate::UserRequest *>(auth_user_request.getRaw());
assert(lm_request != NULL);
// add new helper kv-pair notes to the credentials object
// so that any transaction using those credentials can access them
auth_user_request->user()->notes.appendNewOnly(&reply.notes);
+ // remove any private credentials detail which got added.
+ auth_user_request->user()->notes.remove("token");
Auth::Ntlm::UserRequest *lm_request = dynamic_cast<Auth::Ntlm::UserRequest *>(auth_user_request.getRaw());
assert(lm_request != NULL);