9330 stack overflow when creating a deeply nested dataset
[unleashed.git] / usr / src / man / man3c / getpw.3c
blob44dd9cc3fc351ae350e624dd4d795e59d5fb5fdc
1 '\" te
2 .\"  Copyright 1989 AT&T  Copyright (c) 1997, Sun Microsystems, Inc.  All Rights Reserved
3 .\" 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.
4 .\" 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.
5 .\" 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]
6 .TH GETPW 3C "Dec 29, 1996"
7 .SH NAME
8 getpw \- get passwd entry from UID
9 .SH SYNOPSIS
10 .LP
11 .nf
12 #include <stdlib.h>
14 \fBint\fR \fBgetpw\fR(\fBuid_t\fR \fIuid\fR, \fBchar *\fR\fIbuf\fR);
15 .fi
17 .SH DESCRIPTION
18 .sp
19 .LP
20 The \fBgetpw()\fR function searches the user data base for a user id number
21 that equals \fIuid\fR, copies the line of the password file in which \fIuid\fR
22 was found into the array pointed to by \fIbuf\fR, and returns 0. \fBgetpw()\fR
23 returns non-zero if \fIuid\fR cannot be found.
24 .SH USAGE
25 .sp
26 .LP
27 This function is included only for compatibility with prior systems and should
28 not be used; the functions described on the \fBgetpwnam\fR(3C) manual page
29 should be used instead.
30 .sp
31 .LP
32 If the \fB/etc/passwd\fR and the \fB/etc/group\fR files have a plus sign
33 (\fB+\fR) for the NIS entry, then \fBgetpwent()\fR and  \fBgetgrent()\fR will
34 not return \fINULL\fR when the end of file is reached.  See \fBgetpwnam\fR(3C).
35 .SH RETURN VALUES
36 .sp
37 .LP
38 The \fBgetpw()\fR function returns non-zero on error.
39 .SH ATTRIBUTES
40 .sp
41 .LP
42 See \fBattributes\fR(5) for descriptions of the following attributes:
43 .sp
45 .sp
46 .TS
47 box;
48 c | c
49 l | l .
50 ATTRIBUTE TYPE  ATTRIBUTE VALUE
52 MT-Level        Safe
53 .TE
55 .SH SEE ALSO
56 .sp
57 .LP
58 \fBgetpwnam\fR(3C), \fBpasswd\fR(4), \fBattributes\fR(5)