changeset 17210:5c7c572f57f8

(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.
author Richard M. Stallman <rms@gnu.org>
date Sat, 22 Mar 1997 03:49:14 +0000
parents c7dbcb7494d1
children ecf78b4eb138
files lisp/mail/mailalias.el
diffstat 1 files changed, 14 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/mailalias.el	Sat Mar 22 03:44:08 1997 +0000
+++ b/lisp/mail/mailalias.el	Sat Mar 22 03:49:14 1997 +0000
@@ -41,6 +41,12 @@
   "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 @@
   (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::/: