diff options
author | Richard M. Stallman <rms@gnu.org> | 1997-03-22 03:49:14 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1997-03-22 03:49:14 +0000 |
commit | 8e3beae0e6d522b086e82c2e7208091e32801ee5 (patch) | |
tree | c298fc780d4975a9971411137d6bf684b5aed873 /lisp/mail/mailalias.el | |
parent | 13c2b5cb7720c3a615bc093ed352fdf2cf80109a (diff) | |
download | emacs-8e3beae0e6d522b086e82c2e7208091e32801ee5.tar.gz |
(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.
Diffstat (limited to 'lisp/mail/mailalias.el')
-rw-r--r-- | lisp/mail/mailalias.el | 16 |
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'.") "Alist of local users. When t this still needs to be initialized.") +(defvar mail-passwd-files '("/etc/passwd") + "List of files from which to determine valid user names.") + +(defvar mail-passwd-command nil + "Shell command to retrieve text to add to `/etc/passwd', or nil.") + (defvar mail-directory-names t "Alist of mail address directory entries. When t this still needs to be initialized.") @@ -338,8 +344,14 @@ Consults `/etc/passwd' and a directory service if one is set up via (if (eq mail-local-names t) (save-excursion (set-buffer (generate-new-buffer " passwd")) - (insert-file-contents "/etc/passwd" nil nil nil t) - (setq mail-local-names) + (let ((files mail-passwd-files)) + (while files + (insert-file-contents (car files) nil nil nil t) + (setq files (cdr files)))) + (if mail-passwd-command + (call-process shell-file-name nil t nil + shell-command-switch mail-passwd-command)) + (setq mail-local-names nil) (while (not (eobp)) ;;Recognize lines like ;; nobody:*:65534:65534::/: |