OSDN Git Service

(split) Fixed #25191 (typo in fenv.3).
[linuxjm/LDP_man-pages.git] / release / man3 / getpw.3
1 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
2 .\"
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
6 .\"
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
11 .\"
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein.  The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
18 .\" professionally.
19 .\"
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
22 .\"
23 .\" References consulted:
24 .\"     Linux libc source code
25 .\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
26 .\"     386BSD man pages
27 .\" Modified Sat Jul 24 19:23:25 1993 by Rik Faith (faith@cs.unc.edu)
28 .\" Modified Mon May 27 21:37:47 1996 by Martin Schulze (joey@linux.de)
29 .\"
30 .\" Japanese Version Copyright (c) 1997 HIROFUMI Nishizuka
31 .\"     all rights reserved.
32 .\" Translated 1997-12-19, HIROFUMI Nishizuka <nishi@rpts.cl.nec.co.jp>
33 .\" Modified 1999-12-08, Kentaro Shirakata <argrath@yo.rim.or.jp>
34 .\" Modified 2005-09-04, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
35 .\" Modified 2008-07-23, Kentaro Shirakata <argrath@ub32.org>
36 .\"
37 .TH GETPW 3 2010-10-21 "GNU" "Linux Programmer's Manual"
38 .SH Ì¾Á°
39 getpw \- ¥Ñ¥¹¥ï¡¼¥É¹Ô¥¨¥ó¥È¥ê¤ò¼èÆÀ¤¹¤ë
40 .SH ½ñ¼°
41 .nf
42 .BR "#define _GNU_SOURCE" "             /* feature_test_macros(7) »²¾È */"
43 .B #include <sys/types.h>
44 .B #include <pwd.h>
45 .sp
46 .BI "int getpw(uid_t " uid ", char *" buf );
47 .fi
48 .SH ÀâÌÀ
49 .BR getpw ()
50 ´Ø¿ô¤Ï¡¢¥Ð¥Ã¥Õ¥¡ \fIbuf\fP ¤Ë»ØÄê¥æ¡¼¥¶ ID  \fIuid\fP ¤Î
51 ¥Ñ¥¹¥ï¡¼¥É¹Ô¥¨¥ó¥È¥ê¤ò¼èÆÀ¤¹¤ë¡£
52 ÊÖ¤µ¤ì¤ë¥Ð¥Ã¥Õ¥¡¤Ï¡¢°Ê²¼¤Î·Á¼°¤Î¹Ô¤ò´Þ¤à¡£
53 .sp
54 .in +4n
55 .B name:passwd:uid:gid:gecos:dir:shell
56 .in
57 .PP
58 \fIpasswd\fP ¹½Â¤ÂΤϠ\fI<pwd.h>\fP ¤Ç°Ê²¼¤Î¤è¤¦¤ËÄêµÁ¤µ¤ì¤Æ¤¤¤ë:
59 .sp
60 .in +4n
61 .nf
62 struct passwd {
63     char   *pw_name;       /* username */
64     char   *pw_passwd;     /* user password */
65     uid_t   pw_uid;        /* user ID */
66     gid_t   pw_gid;        /* group ID */
67     char   *pw_gecos;      /* user information */
68     char   *pw_dir;        /* home directory */
69     char   *pw_shell;      /* shell program */
70 };
71 .fi
72 .in
73 .PP
74 ¤³¤Î¹½Â¤ÂΤΥե£¡¼¥ë¥É¤Î¾ÜºÙ¤Ï
75 .BR passwd (5)
76 ¤ò»²¾È¤Î¤³¤È¡£
77 .SH ÊÖ¤êÃÍ
78 .BR getpw ()
79 ´Ø¿ô¤Ï¡¢À®¸ù¤·¤¿¾ì¹ç 0 ¤òÊÖ¤¹; ¥¨¥é¡¼¤¬È¯À¸¤·¤¿¾ì¹ç \-1 ¤òÊÖ¤·¡¢¥¨¥é¡¼¤ò
80 ¼¨¤¹¤¿¤á¤Ë
81 .I error
82 ¤¬¥»¥Ã¥È¤µ¤ì¤ë¡£
83 .SH ¥¨¥é¡¼
84 .TP
85 .B EINVAL
86 .I buf
87 ¤¬ NULL¡£
88 .TP
89 .B ENOENT
90 .I uid
91 ¤ËÂбþ¤¹¤ë¥æ¡¼¥¶¤¬¤¤¤Ê¤¤¡£
92 .TP
93 .B ENOMEM
94 .I passwd
95 ¹½Â¤ÂΤò³ä¤êÅö¤Æ¤ë¤¿¤á¤Î¥á¥â¥ê¤¬ÉÔ½½Ê¬¡£
96 .SH ¥Õ¥¡¥¤¥ë
97 .TP
98 .I /etc/passwd
99 ¥Ñ¥¹¥ï¡¼¥É¥Ç¡¼¥¿¥Ù¡¼¥¹¥Õ¥¡¥¤¥ë
100 .SH ½àµò
101 SVr2
102 .SH ¥Ð¥°
103 .BR getpw ()
104 ´Ø¿ô¤Ï¡¢Í¿¤¨¤é¤ì¤¿¥Ð¥Ã¥Õ¥¡
105 .I buf
106 ¤¬¥ª¡¼¥Ð¡¼¥Õ¥í¡¼¤¹¤ë¤«¤â¤·¤ì¤Ê¤¤¤Î¤Ç´í¸±¤Ç¤¢¤ë¡£
107 ¤³¤Î´Ø¿ô¤Ï
108 .BR getpwuid (3)
109 ¤Ë¤è¤Ã¤Æ¸Å¤¤¤â¤Î¤È¤Ê¤Ã¤¿¡£
110 .SH ´ØÏ¢¹àÌÜ
111 .BR endpwent (3),
112 .BR fgetpwent (3),
113 .BR getpwent (3),
114 .BR getpwnam (3),
115 .BR getpwuid (3),
116 .BR putpwent (3),
117 .BR setpwent (3),
118 .BR passwd (5)