From 95da33383b75d4d3125e6806a94d9756efc7ee8a Mon Sep 17 00:00:00 2001 From: kaoru Date: Thu, 19 Feb 2004 19:26:05 +0000 Subject: [PATCH] (elmo-passwd-alist-clear): Shred password before clear. (elmo-remove-passwd): Remove all mached pair. --- elmo/ChangeLog | 2 ++ elmo/elmo-util.el | 14 ++++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 50461b3..8a1e7ac 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,6 +1,8 @@ 2004-02-19 TAKAHASHI Kaoru * elmo-util.el (elmo-string-partial-p): Removed unused function. + (elmo-passwd-alist-clear): Shred password before clear. + (elmo-remove-passwd): Remove all mached pair. 2004-02-18 Yoichi NAKAYAMA diff --git a/elmo/elmo-util.el b/elmo/elmo-util.el index e5d23fe..5a7a1bc 100644 --- a/elmo/elmo-util.el +++ b/elmo/elmo-util.el @@ -418,6 +418,9 @@ Return value is a cons cell of (STRUCTURE . REST)" (defun elmo-passwd-alist-clear () "Clear password cache." (interactive) + (dolist (pair elmo-passwd-alist) + (when (stringp (cdr-safe pair)) + (fillarray (cdr pair) 0))) (setq elmo-passwd-alist nil)) (defun elmo-passwd-alist-save () @@ -465,12 +468,11 @@ Return value is a cons cell of (STRUCTURE . REST)" (defun elmo-remove-passwd (key) "Remove password from password pool (for failure)." (let (pass-cons) - (if (setq pass-cons (assoc key elmo-passwd-alist)) - (progn - (unwind-protect - (fillarray (cdr pass-cons) 0)) - (setq elmo-passwd-alist - (delete pass-cons elmo-passwd-alist)))))) + (while (setq pass-cons (assoc key elmo-passwd-alist)) + (unwind-protect + (fillarray (cdr pass-cons) 0) + (setq elmo-passwd-alist + (delete pass-cons elmo-passwd-alist)))))) (defmacro elmo-read-char-exclusive () (cond ((featurep 'xemacs) -- 1.7.10.4