* elmo-utils.el (elmo-get-passwd): Set timeout of password.
authorokada <okada>
Wed, 10 May 2000 05:54:32 +0000 (05:54 +0000)
committerokada <okada>
Wed, 10 May 2000 05:54:32 +0000 (05:54 +0000)
(elmo-remove-passwd): Fill password with 0 before erase.
* elmo-vars.el (elmo-passwd-life-time): New variable.

doc/wl-ja.texi
elmo/ChangeLog
elmo/elmo-util.el
elmo/elmo-vars.el

index 4b64e0c..781f7be 100644 (file)
@@ -5857,6 +5857,13 @@ Non-nil \e$B$J$i$P\e(B dbm \e$B$r;H$C$F\e(B Message-ID \e$B$N4IM}$r9T$J$$$^$9!#\e(B
 \e$B%3%^%s%I\e(B @code{elmo-passwd-alist-save} \e$B$r<B9T$9$k$H$3$N%U%!%$%k$K8=:_@_Dj\e(B
 \e$B$5$l$F$$$k%Q%9%o!<%I$,%;!<%V$5$l$^$9!#\e(B
 
+@item elmo-passwd-life-time
+@vindex  elmo-passwd-life-time
+\e$B=i4|@_Dj$O\e(B nil\e$B!#\e(B
+Non-nil \e$B$JCM$,@_Dj$5$l$?>l9g$O!"?75,$K%Q%9%o!<%I$,F~NO$5$l$F$+$i\e(B
+@code{elmo-passwd-life-time} \e$BIC8e$K%Q%9%o!<%I$r>C5n$9$k%?%$%^$,!"\e(B
+\e$B%;%C%H$5$l$^$9!#\e(B
+
 @item elmo-nntp-list-folders-use-cache
 @vindex elmo-nntp-list-folders-use-cache
 \e$B=i4|@_Dj$O\e(B 600 (\e$BIC\e(B)\e$B!#\e(B
index 855f838..75f711b 100644 (file)
@@ -1,3 +1,9 @@
+2000-05-10  Kenichi OKADA <okada@opaopa.org>
+
+       * 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  <teranisi@gohome.org>
 
        * elmo-cache.el (elmo-buffer-cache-add):
index 9c6de8c..923d479 100644 (file)
@@ -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)
index 7bf3d35..9018fa6 100644 (file)
@@ -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