Annotation of 42BSD/usr.lib/sendmail/aux/getpwwho.3, revision 1.1.1.1

1.1       root        1: From James.Gosling@CMU-VLSI@CMU-10A  Thu Sep 10 07:17:42 1981
                      2: Date: 10 Sep 1981 10:08:10-EDT
                      3: From: James.Gosling at CMU-VLSI at CMU-10A
                      4: Reply-To: James.Gosling at CMU-10A
                      5: To: IngVAX.eric@Berkeley
                      6: Subject: getpwwho.1
                      7: Status: R
                      8: 
                      9: .TH GETPWWHO 3 5/9/80
                     10: .CM 2
                     11: .SH "NAME"
                     12: getpwwho \- get password file entry using liberal name matching.
                     13: .SH "SYNOPSIS"
                     14: .B
                     15: #include <pwd.h>
                     16: .br
                     17: .B
                     18: extern struct gecos *_gecos;
                     19: .sp
                     20: .B
                     21: struct passwd *getpwwho(name)
                     22: .br
                     23: .B
                     24: char *name;
                     25: .sp
                     26: .B
                     27: struct passwd *getpwambig();
                     28: .SH "DESCRIPTION"
                     29: .I
                     30: Getpwwho
                     31: is much like
                     32: .IR getpwnam (3),
                     33: except that it is much more
                     34: liberal about the names that it will match.
                     35: .I
                     36: Name
                     37: may be a full login name
                     38: or it may be the unique abbreviation of a persons last name, or it
                     39: may be a unique abbreviation of a persons first
                     40: and last name.
                     41: .sp
                     42: The subroutine
                     43: .I
                     44: getpwambig
                     45: may be used to iterate through all the
                     46: matches for the name given to the last call to
                     47: .IR getpwwho .
                     48: If
                     49: .I
                     50: getpwwho
                     51: returns -1 then name does not uniquely determine
                     52: a person, a program can then print out all the names that match
                     53: by repeatedly calling
                     54: .I
                     55: getpwambig
                     56: until
                     57: .I
                     58: getpwambig
                     59: returns 0.
                     60: .sp
                     61: Both
                     62: .I
                     63: getpwwho
                     64: and
                     65: .I
                     66: getpwambig
                     67: return with
                     68: .I
                     69: _gecos
                     70: pointing to
                     71: a
                     72: .I
                     73: gecos
                     74: structure that results from parsing the GECOS field of
                     75: the
                     76: .I
                     77: passwd
                     78: entry that is returned.
                     79: .SH "FILES"
                     80: /etc/passwd    The password file.
                     81: .SH "SEE ALSO"
                     82: getpwnam(3),
                     83: parsgecos(3)
                     84: .SH "EXAMPLE"
                     85: .B
                     86: getpwwho("harry bovik");
                     87: .br
                     88: .B
                     89: getpwwho("bovik");
                     90: .br
                     91: .B
                     92: getpwwho("H Bovik");
                     93: .br
                     94: .B
                     95: getpwwho("hb");
                     96: .RS
                     97: All of these match the person "Harry Q. Bovik",
                     98: who has "hb" as his login name.
                     99: .RE
                    100: .SH "DIAGNOSTICS"
                    101: .I
                    102: Getpwwho
                    103: return 0 if the person isn't found, -1 if the name
                    104: is ambiguous.
                    105: In the case that the name is ambiguous a program can
                    106: iterate through all the possibilities by using
                    107: .IR getpwambig .
                    108: .SH "HISTORY"
                    109: .TP
                    110: 09-May-80  James Gosling (jag) at Carnegie-Mellon University
                    111: Created.
                    112: 
                    113: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.