From: Sudish Joseph <sudish@mindspring.com>
Subject: Re: Is Username Expansion possible in GNUS?
Date: 17 Jun 1996 22:38:45 -0400 [thread overview]
Message-ID: <m2ivcpomyy.fsf@atreides.erehwon.org> (raw)
In-Reply-To: "Edward J. Sabol"'s message of Mon, 17 Jun 1996 14:21:09 -0400
"Edward J. Sabol" <sabol@thuban.gsfc.nasa.gov> writes:
> It doesn't use getpwnam(3); instead it loads /etc/passwd into a
> buffer and searches that.
>
> For large sites, one is more likely to use YP, NIS, NIS+, Ph, or
> Kerberos to look up such information. In such case, I believe you
Isn't getpwnam() supposed to work under all those conditions?
Hallvard Furuseth's idea was cool, so I did it using perl. Not
beautiful, but it works.
-Sudish
(defun getpwnam (name)
"Results of getpwnam(name) as a list of 9 strings; nil on failure"
(save-excursion
(set-buffer (get-buffer-create " *getpwnam*"))
(if (or (/= 0
(call-process "perl" nil t nil "-e"
(format "print join ':', getpwnam('%s')"
name)))
(bobp))
(not (kill-buffer (current-buffer))) ; crockery
(goto-char 1)
(save-match-data
(looking-at "\\(.*\\):\\(.*\\):\\(.*\\):\\(.*\\):\\(.*\\):\\(.*\\):\\(.*\\):\\(.*\\):\\(.*\\)")
(let ((l (list
(match-string 1) (match-string 2) (match-string 3)
(match-string 4) (match-string 5) (match-string 6)
(match-string 7) (match-string 8) (match-string 9))))
(kill-buffer (current-buffer))
l)))))
next prev parent reply other threads:[~1996-06-18 2:38 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-06-13 21:47 Danny Siu
1996-06-14 0:32 ` Lars Magne Ingebrigtsen
1996-06-14 22:36 ` Danny Siu
1996-06-14 23:02 ` Eric Hendrickson
1996-06-15 1:44 ` Sudish Joseph
1996-06-15 19:06 ` Hallvard B Furuseth
1996-06-15 1:51 ` Lars Magne Ingebrigtsen
1996-06-16 21:27 ` Mark Eichin
1996-06-17 2:33 ` Lars Magne Ingebrigtsen
1996-06-17 18:21 ` Edward J. Sabol
1996-06-18 2:38 ` Sudish Joseph [this message]
1996-06-18 16:33 ` Hallvard B Furuseth
1996-06-18 16:56 ` Lars Magne Ingebrigtsen
1996-06-18 17:15 ` Hallvard B Furuseth
1996-06-14 13:08 ` David Worenklein
1996-06-14 15:45 ` Kai Grossjohann
1996-06-17 5:30 ` Mark Breslauer
1996-06-17 14:23 ` BBDB and Gnus 5.2 Jack Vinson
1996-06-17 16:14 ` Is Username Expansion possible in GNUS? Kai Grossjohann
1996-06-18 14:55 ` Hans de Graaff
1996-06-18 15:57 ` Jack Vinson
1996-06-25 17:11 ` Brian Edmonds
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2ivcpomyy.fsf@atreides.erehwon.org \
--to=sudish@mindspring.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).