aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1997-03-22 03:49:14 +0000
committerRichard M. Stallman1997-03-22 03:49:14 +0000
commit8e3beae0e6d522b086e82c2e7208091e32801ee5 (patch)
treec298fc780d4975a9971411137d6bf684b5aed873
parent13c2b5cb7720c3a615bc093ed352fdf2cf80109a (diff)
downloademacs-8e3beae0e6d522b086e82c2e7208091e32801ee5.tar.gz
emacs-8e3beae0e6d522b086e82c2e7208091e32801ee5.zip
(mail-passwd-command): New variable.
(mail-get-names): Implement that variable. (mail-passwd-files): New variable. (mail-get-names): Use mail-passwd-files instead of always /etc/passwd.
-rw-r--r--lisp/mail/mailalias.el16
1 files changed, 14 insertions, 2 deletions
diff --git a/lisp/mail/mailalias.el b/lisp/mail/mailalias.el
index 0969f50ae29..3b67a1f9e0e 100644
--- a/lisp/mail/mailalias.el
+++ b/lisp/mail/mailalias.el
@@ -41,6 +41,12 @@ This is the basis for `mail-complete'.")
41 "Alist of local users. 41 "Alist of local users.
42When t this still needs to be initialized.") 42When t this still needs to be initialized.")
43 43
44(defvar mail-passwd-files '("/etc/passwd")
45 "List of files from which to determine valid user names.")
46
47(defvar mail-passwd-command nil
48 "Shell command to retrieve text to add to `/etc/passwd', or nil.")
49
44(defvar mail-directory-names t 50(defvar mail-directory-names t
45 "Alist of mail address directory entries. 51 "Alist of mail address directory entries.
46When t this still needs to be initialized.") 52When t this still needs to be initialized.")
@@ -338,8 +344,14 @@ Consults `/etc/passwd' and a directory service if one is set up via
338 (if (eq mail-local-names t) 344 (if (eq mail-local-names t)
339 (save-excursion 345 (save-excursion
340 (set-buffer (generate-new-buffer " passwd")) 346 (set-buffer (generate-new-buffer " passwd"))
341 (insert-file-contents "/etc/passwd" nil nil nil t) 347 (let ((files mail-passwd-files))
342 (setq mail-local-names) 348 (while files
349 (insert-file-contents (car files) nil nil nil t)
350 (setq files (cdr files))))
351 (if mail-passwd-command
352 (call-process shell-file-name nil t nil
353 shell-command-switch mail-passwd-command))
354 (setq mail-local-names nil)
343 (while (not (eobp)) 355 (while (not (eobp))
344 ;;Recognize lines like 356 ;;Recognize lines like
345 ;; nobody:*:65534:65534::/: 357 ;; nobody:*:65534:65534::/: