'\" te .\" Copyright 1989 AT&T Copyright (c) 1997, Sun Microsystems, Inc. All Rights Reserved .TH getpw 3C "29 Dec 1996" "SunOS 5.11" "Standard C Library Functions" .SH NAME getpw \- get passwd entry from UID .SH SYNOPSIS .LP .nf #include \fBint\fR \fBgetpw\fR(\fBuid_t\fR \fIuid\fR, \fBchar *\fR\fIbuf\fR); .fi .SH DESCRIPTION .sp .LP The \fBgetpw()\fR function searches the user data base for a user id number that equals \fIuid\fR, copies the line of the password file in which \fIuid\fR was found into the array pointed to by \fIbuf\fR, and returns 0. \fBgetpw()\fR returns non-zero if \fIuid\fR cannot be found. .SH USAGE .sp .LP This function is included only for compatibility with prior systems and should not be used; the functions described on the \fBgetpwnam\fR(3C) manual page should be used instead. .sp .LP If the \fB/etc/passwd\fR and the \fB/etc/group\fR files have a plus sign (\fB+\fR) for the NIS entry, then \fBgetpwent()\fR and \fBgetgrent()\fR will not return \fINULL\fR when the end of file is reached. See \fBgetpwnam\fR(3C). .SH RETURN VALUES .sp .LP The \fBgetpw()\fR function returns non-zero on error. .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ MT-LevelSafe .TE .SH SEE ALSO .sp .LP \fBgetpwnam\fR(3C), \fBpasswd\fR(4), \fBattributes\fR(5)