From: okada Date: Wed, 10 May 2000 05:54:32 +0000 (+0000) Subject: * elmo-utils.el (elmo-get-passwd): Set timeout of password. X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=dfd963cef4322e12e90f7c39f7978da610e83d0d;p=elisp%2Fwanderlust.git * elmo-utils.el (elmo-get-passwd): Set timeout of password. (elmo-remove-passwd): Fill password with 0 before erase. * elmo-vars.el (elmo-passwd-life-time): New variable. --- diff --git a/doc/wl-ja.texi b/doc/wl-ja.texi index 4b64e0c..781f7be 100644 --- a/doc/wl-ja.texi +++ b/doc/wl-ja.texi @@ -5857,6 +5857,13 @@ Non-nil ならば dbm を使って Message-ID の管理を行ないます。 コマンド @code{elmo-passwd-alist-save} を実行するとこのファイルに現在設定 されているパスワードがセーブされます。 +@item elmo-passwd-life-time +@vindex elmo-passwd-life-time +初期設定は nil。 +Non-nil な値が設定された場合は、新規にパスワードが入力されてから +@code{elmo-passwd-life-time} 秒後にパスワードを消去するタイマが、 +セットされます。 + @item elmo-nntp-list-folders-use-cache @vindex elmo-nntp-list-folders-use-cache 初期設定は 600 (秒)。 diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 855f838..75f711b 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,9 @@ +2000-05-10 Kenichi OKADA + + * elmo-utils.el (elmo-get-passwd): Set timeout of password. + (elmo-remove-passwd): Fill password with 0 before erase. + * elmo-vars.el (elmo-passwd-life-time): New variable. + 2000-05-10 Yuuichi Teranishi * elmo-cache.el (elmo-buffer-cache-add): diff --git a/elmo/elmo-util.el b/elmo/elmo-util.el index 9c6de8c..923d479 100644 --- a/elmo/elmo-util.el +++ b/elmo/elmo-util.el @@ -770,14 +770,20 @@ File content is encoded with MIME-CHARSET." (append elmo-passwd-alist (list (cons user-at-host (elmo-base64-encode-string pass))))) + (if elmo-passwd-life-time + (run-with-timer elmo-passwd-life-time nil + `(lambda () (elmo-remove-passwd ,user-at-host)))) pass))) (defun elmo-remove-passwd (user-at-host) "Remove password from password pool (for failure)." - (setq elmo-passwd-alist - (delete (assoc user-at-host elmo-passwd-alist) - elmo-passwd-alist - ))) + (let (pass-cons) + (if (setq pass-cons (assoc user-at-host elmo-passwd-alist)) + (progn + (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) diff --git a/elmo/elmo-vars.el b/elmo/elmo-vars.el index 7bf3d35..9018fa6 100644 --- a/elmo/elmo-vars.el +++ b/elmo/elmo-vars.el @@ -95,6 +95,8 @@ Each elements are regexp of folder name (This is obsolete).") "*ELMO Message Database path.") (defvar elmo-passwd-alist-file-name "passwd" "*ELMO Password filename.") +(defvar elmo-passwd-life-time nil + "*ELMO Life of Password.(s)") (defvar elmo-warning-threshold 30000 "*Display warning when the bytes of message exceeds this value.") (defvar elmo-msg-appended-hook nil