OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / 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 2007-07-26 "GNU" "Linux Programmer's Manual"
38 .SH Ì¾Á°
39 getpw \- ¥Ñ¥¹¥ï¡¼¥É¹Ô¥¨¥ó¥È¥ê¤ò¼èÆÀ¤¹¤ë
40 .SH ½ñ¼°
41 .nf
42 .B #define _GNU_SOURCE
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;      /* real name */
68     char   *pw_dir;        /* home directory */
69     char   *pw_shell;      /* shell program */
70 };
71 .fi
72 .in
73 .SH ÊÖ¤êÃÍ
74 .BR getpw ()
75 ´Ø¿ô¤Ï¡¢À®¸ù¤·¤¿¾ì¹ç 0 ¤òÊÖ¤¹; ¥¨¥é¡¼¤¬È¯À¸¤·¤¿¾ì¹ç \-1 ¤òÊÖ¤·¡¢¥¨¥é¡¼¤ò
76 ¼¨¤¹¤¿¤á¤Ë
77 .I error
78 ¤¬¥»¥Ã¥È¤µ¤ì¤ë¡£
79 .SH ¥¨¥é¡¼
80 .TP
81 .B EINVAL
82 .I buf
83 ¤¬ NULL¡£
84 .TP
85 .B ENOENT
86 .I uid
87 ¤ËÂбþ¤¹¤ë¥æ¡¼¥¶¤¬¤¤¤Ê¤¤¡£
88 .TP
89 .B ENOMEM
90 .I passwd
91 ¹½Â¤ÂΤò³ä¤êÅö¤Æ¤ë¤¿¤á¤Î¥á¥â¥ê¤¬ÉÔ½½Ê¬¡£
92 .SH ¥Õ¥¡¥¤¥ë
93 .TP
94 .I /etc/passwd
95 ¥Ñ¥¹¥ï¡¼¥É¥Ç¡¼¥¿¥Ù¡¼¥¹¥Õ¥¡¥¤¥ë
96 .SH ½àµò
97 SVr2
98 .SH ¥Ð¥°
99 .BR getpw ()
100 ´Ø¿ô¤Ï¡¢Í¿¤¨¤é¤ì¤¿¥Ð¥Ã¥Õ¥¡
101 .I buf
102 ¤¬¥ª¡¼¥Ð¡¼¥Õ¥í¡¼¤¹¤ë¤«¤â¤·¤ì¤Ê¤¤¤Î¤Ç´í¸±¤Ç¤¢¤ë¡£
103 ¤³¤Î´Ø¿ô¤Ï
104 .BR getpwuid (3)
105 ¤Ë¤è¤Ã¤Æ¸Å¤¤¤â¤Î¤È¤Ê¤Ã¤¿¡£
106 .SH ´ØÏ¢¹àÌÜ
107 .BR endpwent (3),
108 .BR fgetpwent (3),
109 .BR getpwent (3),
110 .BR getpwnam (3),
111 .BR getpwuid (3),
112 .BR putpwent (3),
113 .BR setpwent (3),
114 .BR passwd (5)