'\" te .\" Copyright 1989 AT&T Copyright (c) 1997, Sun Microsystems, Inc. All Rights Reserved .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] .TH GETPW 3C "Dec 29, 1996" .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 box; c | c l | l . ATTRIBUTE TYPE ATTRIBUTE VALUE _ MT-Level Safe .TE .SH SEE ALSO .sp .LP \fBgetpwnam\fR(3C), \fBpasswd\fR(4), \fBattributes\fR(5)