Penguin
Annotated edit history of getpw(3) version 1, including all changes. View license author blame.
Rev Author # Line
1 perry 1 GETPW
2 !!!GETPW
3 NAME
4 SYNOPSIS
5 DESCRIPTION
6 RETURN VALUE
7 ERRORS
8 FILES
9 CONFORMING TO
10 BUGS
11 SEE ALSO
12 ----
13 !!NAME
14
15
16 getpw - Re-construct password line entry
17 !!SYNOPSIS
18
19
20 __#include
21 __ ''uid''__, char *__''buf''__);
22 __
23 !!DESCRIPTION
24
25
26 The __getpw()__ function re-constructs the password line
27 entry for the given user uid ''uid'' in the buffer
28 ''buf''. The returned buffer contains a line of
29 format
30
31
32 __name:passwd:uid:gid:gecos:dir:shell__
33
34
35 The ''passwd'' structure is defined in
36 '''' as follows:
37
38
39 struct passwd {
40 char *pw_name; /* user name */
41 char *pw_passwd; /* user password */
42 uid_t pw_uid; /* user id */
43 gid_t pw_gid; /* group id */
44 char *pw_gecos; /* real name */
45 char *pw_dir; /* home directory */
46 char *pw_shell; /* shell program */
47 };
48 !!RETURN VALUE
49
50
51 The __getpw()__ function returns 0 on success, or -1 if
52 an error occurs.
53 !!ERRORS
54
55
56 __ENOMEM__
57
58
59 Insufficient memory to allocate passwd
60 structure.
61 !!FILES
62
63
64 ''/etc/passwd''
65
66
67 password database file
68 !!CONFORMING TO
69
70
71 SYSVr2.
72 !!BUGS
73
74
75 The __getpw__() function is dangerous as it may overflow
76 the provided buffer ''buf''. It is obsoleted by
77 __getpwuid__().
78 !!SEE ALSO
79
80
81 fgetpwent(3), getpwent(3), setpwent(3),
82 endpwent(3), getpwnam(3), getpwuid(3),
83 putpwent(3), passwd(5)
84 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.