getpw(S-osr5)
getpw --
get user info from UID
Syntax
cc ... -lc
int getpw (uid, buf)
int uid;
char *buf;
Description
The getpw routine searches the /etc/passwd
file for a user ID number that equals the uid argument.
If the user ID is found,
getpw copies the line of the password file in which uid
was found into the array to which the argument buf points.
Upon a successful match,
the getpw routine returns a value of zero.
If the /etc/passwd
file does not exist, cannot be opened, or if
uid does not match any ID entry in the password file,
getpw fails and returns a non-zero value.
This routine is included only for compatibility with prior
systems and should not be used; see
getpwent(S-osr5)
for routines to use instead.
Return value
Upon successful completion, the getpw
routine returns a value of zero.
getpw returns a non-zero value on error.
Files
/etc/passwd
See also
getpwent(S-osr5),
passwd(FP)
Standards conformance
The getpw routine
is an extension of AT&T System V provided by
the Santa Cruz Operation.
.
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005