1getpw(3C) Standard C Library Functions getpw(3C)
2
3
4
6 getpw - get passwd entry from UID
7
9 #include <stdlib.h>
10
11 int getpw(uid_t uid, char *buf);
12
13
15 The getpw() function searches the user data base for a user id number
16 that equals uid, copies the line of the password file in which uid was
17 found into the array pointed to by buf, and returns 0. getpw() returns
18 non-zero if uid cannot be found.
19
21 This function is included only for compatibility with prior systems and
22 should not be used; the functions described on the getpwnam(3C) manual
23 page should be used instead.
24
25
26 If the /etc/passwd and the /etc/group files have a plus sign (+) for
27 the NIS entry, then getpwent() and getgrent() will not return NULL
28 when the end of file is reached. See getpwnam(3C).
29
31 The getpw() function returns non-zero on error.
32
34 See attributes(5) for descriptions of the following attributes:
35
36
37
38
39 ┌─────────────────────────────┬─────────────────────────────┐
40 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
41 ├─────────────────────────────┼─────────────────────────────┤
42 │MT-Level │Safe │
43 └─────────────────────────────┴─────────────────────────────┘
44
46 getpwnam(3C), passwd(4), attributes(5)
47
48
49
50SunOS 5.11 29 Dec 1996 getpw(3C)