Penguin
Annotated edit history of getpwuid(3) version 1, including all changes. View license author blame.
Rev Author # Line
1 perry 1 GETPWNAM
2 !!!GETPWNAM
3 NAME
4 SYNOPSIS
5 DESCRIPTION
6 RETURN VALUE
7 ERRORS
8 FILES
9 CONFORMING TO
10 SEE ALSO
11 ----
12 !!NAME
13
14
15 getpwnam, getpwuid - get password file entry
16 !!SYNOPSIS
17
18
19 __#include
20 __ ''name''__);
21 struct passwd *getpwuid(uid_t__ ''uid''__);
22 __
23 !!DESCRIPTION
24
25
26 The __getpwnam()__ function returns a pointer to a
27 structure containing the broken out fields of a line from
28 ''/etc/passwd'' for the entry that matches the user name
29 ''name''.
30
31
32 The __getpwuid()__ function returns a pointer to a
33 structure containing the broken out fields of a line from
34 ''/etc/passwd'' for the entry that matches the user uid
35 ''uid''.
36
37
38 The ''passwd'' structure is defined in
39 '''' as follows:
40
41
42 struct passwd {
43 char *pw_name; /* user name */
44 char *pw_passwd; /* user password */
45 uid_t pw_uid; /* user id */
46 gid_t pw_gid; /* group id */
47 char *pw_gecos; /* real name */
48 char *pw_dir; /* home directory */
49 char *pw_shell; /* shell program */
50 };
51 !!RETURN VALUE
52
53
54 The __getpwnam()__ and __getpwuid()__ functions return
55 a pointer to the passwd structure, or NULL if the matching
56 entry is not found or an error occurs.
57 !!ERRORS
58
59
60 __ENOMEM__
61
62
63 Insufficient memory to allocate passwd
64 structure.
65 !!FILES
66
67
68 ''/etc/passwd''
69
70
71 password database file
72 !!CONFORMING TO
73
74
75 SVID 3, POSIX, BSD 4.3
76 !!SEE ALSO
77
78
79 fgetpwent(3), getgrnam(3), getpwent(3),
80 setpwent(3), endpwent(3), getpw(3),
81 putpwent(3), passwd(5)
82 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.