OSDN Git Service

(split) LDP_man-pages: release ioctl.2 [JM:00378]
[linuxjm/LDP_man-pages.git] / draft / man3 / getspnam.3
1 .\" Copyright (c) 2003 Andries Brouwer (aeb@cwi.nl) and
2 .\" Walter Harms (walter.harms@informatik.uni-oldenburg.de)
3 .\"
4 .\" Distributed under GPL
5 .\"
6 .\" Japanese Version Copyright (c) 2004 Yuichi SATO
7 .\"         all rights reserved.
8 .\" Translated 2004-08-20, Yuichi SATO <ysato444@yahoo.co.jp>
9 .\"
10 .TH GETSPNAM 3  2010-02-25 "GNU" "Linux Programmer's Manual"
11 .\"O .SH NAME
12 .SH Ì¾Á°
13 .\"O getspnam, getspnam_r, getspent, getspent_r, setspent, endspent,
14 .\"O fgetspent, fgetspent_r, sgetspent, sgetspent_r, putspent,
15 .\"O lckpwdf, ulckpwdf \- get shadow password file entry
16 getspnam, getspnam_r, getspent, getspent_r, setspent, endspent,fgetspent, fgetspent_r, sgetspent, sgetspent_r, putspent, lckpwdf, ulckpwdf \- shadow ¥Ñ¥¹¥ï¡¼¥É¥Õ¥¡¥¤¥ë¤Î¥¨¥ó¥È¥ê¤ò¼èÆÀ¤¹¤ë
17 .\"O .SH SYNOPSIS
18 .SH ½ñ¼°
19 .nf
20 .\"O /* General shadow password file API */
21 /* °ìÈÌŪ¤Ê shadow ¥Ñ¥¹¥ï¡¼¥É¥Õ¥¡¥¤¥ë API */
22 .br
23 .B #include <shadow.h>
24 .sp
25 .BI "struct spwd *getspnam(const char *" name );
26 .sp
27 .B struct spwd *getspent(void);
28 .sp
29 .B void setspent(void);
30 .sp
31 .B void endspent(void);
32 .sp
33 .BI "struct spwd *fgetspent(FILE *" fp );
34 .sp
35 .BI "struct spwd *sgetspent(const char *" s );
36 .sp
37 .BI "int putspent(struct spwd *" p ", FILE *" fp );
38 .sp
39 .B int lckpwdf(void);
40 .sp
41 .B int ulckpwdf(void);
42 .sp
43 .\"O /* GNU extension */
44 /* GNU ÈǤˤª¤±¤ë³ÈÄ¥ */
45 .br
46 .B #include <shadow.h>
47 .sp
48 .BI "int getspent_r(struct spwd *" spbuf ,
49 .br
50 .BI "        char *" buf ", size_t " buflen ", struct spwd **" spbufp );
51 .sp
52 .BI "int getspnam_r(const char *" name ", struct spwd *" spbuf ,
53 .br
54 .BI "        char *" buf ", size_t " buflen ", struct spwd **" spbufp );
55 .sp
56 .BI "int fgetspent_r(FILE *" fp ", struct spwd *" spbuf ,
57 .br
58 .BI "        char *" buf ", size_t " buflen ", struct spwd **" spbufp );
59 .sp
60 .BI "int sgetspent_r(const char *" s ", struct spwd *" spbuf ,
61 .br
62 .BI "        char *" buf ", size_t " buflen ", struct spwd **" spbufp );
63 .fi
64 .sp
65 .in -4n
66 .\"O Feature Test Macro Requirements for glibc (see
67 .\"O .BR feature_test_macros (7)):
68 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
69 .RB ( feature_test_macros (7)
70 »²¾È):
71 .in
72 .sp
73 .ad l
74 .BR getspent_r (),
75 .BR getspnam_r (),
76 .BR fgetspent_r (),
77 .BR sgetspent_r ():
78 .RS 4
79 _BSD_SOURCE || _SVID_SOURCE
80 .RE
81 .ad b
82 .\"O .SH DESCRIPTION
83 .SH ÀâÌÀ
84 .\"O Long ago it was considered safe to have encrypted passwords openly
85 .\"O visible in the password file.
86 .\"O When computers got faster and people
87 .\"O got more security-conscious, this was no longer acceptable.
88 ÀΤϰŹ沽¤µ¤ì¤¿¥Ñ¥¹¥ï¡¼¥É¤ò¥Ñ¥¹¥ï¡¼¥É¥Õ¥¡¥¤¥ë¤Ë
89 ¸«¤¨¤ë¤è¤¦¤Ë¸ø³«¤·¤Æ¤ª¤¤¤Æ¤â°ÂÁ´¤À¤È¹Í¤¨¤é¤ì¤Æ¤¤¤¿¡£
90 .\"O Julianne Frances Haugh implemented the shadow password suite
91 .\"O that keeps the encrypted passwords in
92 .\"O the shadow password database
93 .\"O (e.g., the local shadow password file
94 .\"O .IR /etc/shadow ,
95 .\"O NIS, and LDAP),
96 .\"O readable only by root.
97 Julianne Frances Haugh ¤Ï shadow ¥Ñ¥¹¥ï¡¼¥É¡¦¥¹¥¤¡¼¥È¤ò¼ÂÁõ¤·¤¿¡£
98 ¤³¤ì¤Ï°Å¹æ²½¤µ¤ì¤¿¥Ñ¥¹¥ï¡¼¥É¤ò¡¢root ¤Î¤ß¤¬Æɤळ¤È¤¬¤Ç¤­¤ë
99 shadow ¥Ñ¥¹¥ï¡¼¥É¡¦¥Ç¡¼¥¿¥Ù¡¼¥¹ (Î㤨¤Ð¡¢
100 ¥í¡¼¥«¥ë¤Î shadow ¥Ñ¥¹¥ï¡¼¥É¥Õ¥¡¥¤¥ë
101 .IR /etc/shadow ,
102 NIS, LDAP)
103 ¤ËÊÝ»ý¤¹¤ë¡£
104 .LP
105 .\"O The functions described below resemble those for
106 .\"O the traditional password database
107 .\"O (e.g., see
108 .\"O .BR getpwnam (3)
109 .\"O and
110 .\"O .BR getpwent (3)).
111 °Ê²¼¤ÇÀâÌÀ¤¹¤ë´Ø¿ô¤Ï¡¢ÅÁÅýŪ¤Ê¥Ñ¥¹¥ï¡¼¥É¡¦¥Ç¡¼¥¿¥Ù¡¼¥¹¤ËÂФ¹¤ë
112 ´Ø¿ô¤Ë»÷¤Æ¤¤¤ë (Î㤨¤Ð
113 .BR getpwnam (3)
114 ¤ä
115 .BR getpwent (3)
116 ¤ò»²¾È)¡£
117 .\"O .\" FIXME I've commented out the following for the
118 .\"O .\" moment.  The relationship between PAM and nsswitch.conf needs
119 .\"O .\" to be clearly documented in one place, which is pointed to by
120 .\"O .\" the pages for the user, group, and shadow password functions.
121 .\"O .\" (Jul 2005, mtk)
122 .\"O .\"
123 .\"O .\" This shadow password setup has been superseded by PAM
124 .\"O .\" (pluggable authentication modules), and the file
125 .\"O .\" .I /etc/nsswitch.conf
126 .\"O .\" now describes the sources to be used.
127 .\" FIXME °Ê²¼¤ò°ì»þŪ¤Ë¥³¥á¥ó¥È¥¢¥¦¥È¤·¤¿¡£
128 .\" PAM ¤È nsswitch.conf ¤Î´Ø·¸¤Ë¤Ä¤¤¤Æ¤Ï¡¢¥æ¡¼¥¶¡¢¥°¥ë¡¼¥×¡¢shadow
129 .\" ¥Ñ¥¹¥ï¡¼¥É¤Î´Ø¿ô¤Ë¤Ä¤¤¤Æ¤Î¥Ú¡¼¥¸¤«¤é»²¾È¤µ¤ì¤ë¤É¤³¤«¤Ë¤Ï¤Ã¤­¤ê¤È
130 .\" µ­ºÜ¤·¤Æ¤ª¤¯É¬Íפ¬¤¢¤ë¡£
131 .\" (Jul 2005, mtk)
132 .\"
133 .\" ¤³¤Î shadow ¥Ñ¥¹¥ï¡¼¥É¤ÎÀßÄê¤Ï
134 .\" PAM (pluggable authentication modules) ¤Ç¼è¤êÂؤ¨¤ë¤³¤È¤¬¤Ç¤­¤ë¡£
135 .\" ¸½ºß¤Î¤È¤³¤í¡¢¤É¤Î¾ðÊ󸻤ò»ÈÍѤ¹¤ë¤«¤Ï
136 .\" .I /etc/nsswitch.conf
137 .\" ¥Õ¥¡¥¤¥ë¤Ëµ­½Ò¤µ¤ì¤ë¡£
138 .LP
139 .\"O The
140 .\"O .BR getspnam ()
141 .\"O function returns a pointer to a structure containing
142 .\"O the broken-out fields of the record in the shadow password database
143 .\"O that matches the username
144 .\"O .IR name .
145 .BR getspnam ()
146 ´Ø¿ô¤Ï¡¢¥æ¡¼¥¶Ì¾
147 .I name
148 ¤Ë¥Þ¥Ã¥Á¤¹¤ë shadow ¥Ñ¥¹¥ï¡¼¥É¡¦¥Ç¡¼¥¿¥Ù¡¼¥¹¤Î¥¨¥ó¥È¥ê¤ò
149 Í×ÁÇËè¤Ëʬ²ò¤·¡¢³ÆÍ×ÁǤò³ÊǼ¤·¤¿¹½Â¤ÂΤؤΥݥ¤¥ó¥¿¤òÊÖ¤¹¡£
150 .LP
151 .\"O The
152 .\"O .BR getspent ()
153 .\"O function returns a pointer to the next entry in the shadow password
154 .\"O database.
155 .BR getspent ()
156 ´Ø¿ô¤Ï shadow ¥Ñ¥¹¥ï¡¼¥É¡¦¥Ç¡¼¥¿¥Ù¡¼¥¹¤Ë¤ª¤±¤ë¼¡¤Î¥¨¥ó¥È¥ê¤Ø¤Î¥Ý¥¤¥ó¥¿¤òÊÖ¤¹¡£
157 .\"O The position in the input stream is initialized by
158 .\"O .BR setspent ().
159 ÆþÎÏ¥¹¥È¥ê¡¼¥à¤Ë¤ª¤±¤ë°ÌÃ֤ϡ¢
160 .BR setspent ()
161 ¤Ç½é´ü²½¤µ¤ì¤ë¡£
162 .\"O When done reading, the program may call
163 .\"O .BR endspent ()
164 .\"O so that resources can be deallocated.
165 Æɤ߹þ¤ß¤¬½ª¤ï¤Ã¤¿¸å¤Ë¡¢
166 .BR endspent ()
167 ¤ò¸Æ¤Ó½Ð¤¹¤È¡¢¥ê¥½¡¼¥¹¤ò²òÊü¤Ç¤­¤ë¡£
168 .\"O .\" some systems require a call of setspent() before the first getspent()
169 .\"O .\" glibc does not
170 .\" ºÇ½é¤Ë getspent() ¤ò¸Æ¤Ó½Ð¤¹Á°¤Ë¡¢
171 .\" setspent() ¤ò¸Æ¤Ó½Ð¤µ¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¥·¥¹¥Æ¥à¤â¤¢¤ë¡£
172 .\" glibc ¤Ç¤Ï¤½¤ÎɬÍפ¬¤Ê¤¤¡£
173 .LP
174 .\"O The
175 .\"O .BR fgetspent ()
176 .\"O function is similar to
177 .\"O .BR getspent ()
178 .\"O but uses the supplied stream instead of the one implicitly opened by
179 .\"O .BR setspent ().
180 .BR fgetspent ()
181 ´Ø¿ô¤Ï
182 .BR getspent ()
183 ¤Ë»÷¤Æ¤¤¤ë¤¬¡¢
184 .BR setspent ()
185 ¤Ç°ÅÌۤΤ¦¤Á¤Ë¥ª¡¼¥×¥ó¤µ¤ì¤ë¥¹¥È¥ê¡¼¥à¤Ç¤Ï¤Ê¤¯¡¢Í¿¤¨¤é¤ì¤¿¥¹¥È¥ê¡¼¥à¤ò»È¤¦¡£
186 .LP
187 .\"O The
188 .\"O .BR sgetspent ()
189 .\"O function parses the supplied string
190 .\"O .I s
191 .\"O into a struct
192 .\"O .IR spwd .
193 .BR sgetspent ()
194 ´Ø¿ô¤ÏÍ¿¤¨¤é¤ì¤¿Ê¸»úÎó
195 .I s
196 ¤ò²òÀϤ· struct
197 .I spwd
198 ¤Ë³ÊǼ¤¹¤ë¡£
199 .LP
200 .\"O The
201 .\"O .BR putspent ()
202 .\"O function writes the contents of the supplied struct
203 .\"O .I spwd
204 .\"O .I *p
205 .\"O as a text line in the shadow password file format to the stream
206 .\"O .IR fp .
207 .BR putspent ()
208 ´Ø¿ô¤ÏÍ¿¤¨¤é¤ì¤¿ struct
209 .I spwd
210 .I *p
211 ¤ÎÆâÍƤò shadow ¥Ñ¥¹¥ï¡¼¥É¥Õ¥¡¥¤¥ë·Á¼°¤Î¥Æ¥­¥¹¥È¹Ô¤Ç¥¹¥È¥ê¡¼¥à
212 .I fp
213 ¤Ë½ñ¤­½Ð¤¹¡£
214 .\"O String entries with value NULL and numerical entries with value \-1
215 .\"O are written as an empty string.
216 ¶õʸ»úÎó¤È¤·¤Æ¡¢
217 Ãͤ¬ NULL ¤Îʸ»úÎ󥨥ó¥È¥ê¤ÈÃͤ¬ \-1 ¤Î¿ôÃÍ¥¨¥ó¥È¥ê¤¬
218 ½ñ¤­½Ð¤µ¤ì¤ë¡£
219 .LP
220 .\"O The
221 .\"O .BR lckpwdf ()
222 .\"O function is intended to protect against multiple simultaneous accesses
223 .\"O of the shadow password database.
224 .\"O It tries to acquire a lock, and returns 0 on success,
225 .\"O or \-1 on failure (lock not obtained within 15 seconds).
226 .BR lckpwdf ()
227 ´Ø¿ô¤Ï¡¢ shadow ¥Ñ¥¹¥ï¡¼¥É¡¦¥Ç¡¼¥¿¥Ù¡¼¥¹¤ò
228 ¿½ÅƱ»þ¥¢¥¯¥»¥¹¤«¤é¼é¤ë¤¿¤á¤Î¤â¤Î¤Ç¤¢¤ë¡£
229 ¤³¤Î´Ø¿ô¤Ï¥í¥Ã¥¯¤Î³ÍÆÀ¤ò»î¤ß¡¢
230 À®¸ù¤·¤¿¾ì¹ç¤Ï 0 ¤òÊÖ¤¹¡£
231 ¼ºÇÔ¤·¤¿¾ì¹ç (15 ÉðÊÆâ¤Ë¥í¥Ã¥¯¤¬¼èÆÀ¤Ç¤­¤Ê¤«¤Ã¤¿¾ì¹ç) ¤Ï \-1 ¤òÊÖ¤¹¡£
232 .\"O The
233 .\"O .BR ulckpwdf ()
234 .\"O function releases the lock again.
235 .BR ulckpwdf ()
236 ´Ø¿ô¤Ï¥í¥Ã¥¯¤òºÆ¤Ó²òÊü¤¹¤ë¡£
237 .\"O Note that there is no protection against direct access of the shadow
238 .\"O password file.
239 .\"O Only programs that use
240 .\"O .BR lckpwdf ()
241 .\"O will notice the lock.
242 shadow ¥Ñ¥¹¥ï¡¼¥É¥Õ¥¡¥¤¥ë¤Ø¤ÎľÀÜ¥¢¥¯¥»¥¹¤«¤é
243 Êݸ¤ë¼êÃʤ¬¤Ê¤¤ÅÀ¤ËÃí°Õ¤¹¤ë¤³¤È¡£
244 .BR lckpwdf ()
245 ¤ò»È¤¦¥×¥í¥°¥é¥à¤À¤±¤¬¥í¥Ã¥¯¤òÄÌÃΤǤ­¤ë¡£
246 .LP
247 .\"O These were the functions that formed the original shadow API.
248 .\"O They are widely available.
249 .\"O .\" Also in libc5
250 .\"O .\" SUN doesn't have sgetspent()
251 ¤³¤ì¤é¤Î´Ø¿ô¤Ï¥ª¥ê¥¸¥Ê¥ë¤Î shadow API ¤ò¹½À®¤·¤Æ¤¤¤¿´Ø¿ô¤Ç¤¢¤ê¡¢
252 ¤¤¤í¤¤¤í¤Ê¥·¥¹¥Æ¥à¤Ç¹­¤¯ÍøÍѲÄǽ¤Ç¤¢¤ë¡£
253 .\" libc5 ¤Ç¤âÍøÍѲÄǽ¤Ç¤¢¤ë¡£
254 .\" SUN ¤Ë¤Ï sgetspent() ¤¬¤Ê¤¤¡£
255 .\"O .SS "Reentrant versions"
256 .SS ¥ê¥¨¥ó¥È¥é¥ó¥ÈÈÇ
257 .\"O Analogous to the reentrant functions for the password database, glibc
258 .\"O also has reentrant functions for the shadow password database.
259 ¥Ñ¥¹¥ï¡¼¥É¡¦¥Ç¡¼¥¿¥Ù¡¼¥¹¤ËÂФ¹¤ë¥ê¥¨¥ó¥È¥é¥ó¥ÈÈǤÈƱ¤¸¤è¤¦¤Ë¡¢
260 glibc ¤Ë¤Ï shadow ¥Ñ¥¹¥ï¡¼¥É¥Õ¥¡¥¤¥ë¤ËÂФ·¤Æ¥ê¥¨¥ó¥È¥é¥ó¥ÈÈǤ¬¤¢¤ë¡£
261 .\"O The
262 .\"O .BR getspnam_r ()
263 .\"O function is like
264 .\"O .BR getspnam ()
265 .\"O but stores the retrieved shadow password structure in the space pointed to by
266 .\"O .IR spbuf .
267 .BR getspnam_r ()
268 ´Ø¿ô¤Ï
269 .BR getspnam ()
270 ¤È»÷¤Æ¤¤¤ë¤¬¡¢¼èÆÀ¤·¤¿ shadow ¥Ñ¥¹¥ï¡¼¥É¹½Â¤ÂΤò
271 .I spbuf
272 ¤¬»Ø¤¹Îΰè¤Ë³ÊǼ¤¹¤ë¡£
273 .\"O This shadow password structure contains pointers to strings, and these strings
274 .\"O are stored in the buffer
275 .\"O .I buf
276 .\"O of size
277 .\"O .IR buflen .
278 shadow ¥Ñ¥¹¥ï¡¼¥É¹½Â¤ÂΤÏʸ»úÎ󷲤ؤΥݥ¤¥ó¥¿¤ò´Þ¤ß¡¢
279 ¤³¤ì¤é¤Îʸ»úÎ󷲤ϥµ¥¤¥º
280 .I buflen
281 ¤Î¥Ð¥Ã¥Õ¥¡
282 .I buf
283 ¤Ë³ÊǼ¤µ¤ì¤ë¡£
284 .\"O A pointer to the result (in case of success) or NULL (in case no entry
285 .\"O was found or an error occurred) is stored in
286 .\"O .IR *spbufp .
287 .I *spbufp
288 ¤Ë¤Ï (À®¸ù¤·¤¿¾ì¹ç¤Ï) ·ë²Ì¤Ø¤Î¥Ý¥¤¥ó¥¿¤¬³ÊǼ¤µ¤ì¡¢
289 (¥¨¥ó¥È¥ê¤¬¸«¤Ä¤«¤é¤Ê¤«¤Ã¤¿¾ì¹ç¤Þ¤¿¤Ï¥¨¥é¡¼¤¬µ¯¤³¤Ã¤¿¾ì¹ç¤Ï)
290 NULL ¤¬³ÊǼ¤µ¤ì¤ë¡£
291 .LP
292 .\"O The functions
293 .\"O .BR getspent_r (),
294 .\"O .BR fgetspent_r (),
295 .\"O and
296 .\"O .BR sgetspent_r ()
297 .\"O are similarly analogous to their nonreentrant counterparts.
298 ´Ø¿ô
299 .BR getspent_r (),
300 .BR fgetspent_r (),
301 .BR sgetspent_r ()
302 ¤Ï¤½¤ì¤¾¤ì¥ê¥¨¥ó¥È¥é¥ó¥È¤Ç¤Ê¤¤¥Ð¡¼¥¸¥ç¥ó¤ÈƱÍͤε¡Ç½¤ò»ý¤Ä¡£
303 .LP
304 .\"O Some non-glibc systems also have functions with these names,
305 .\"O often with different prototypes.
306 .\"O .\" SUN doesn't have sgetspent_r()
307 glibc ¤Ç¤Ê¤¤¥·¥¹¥Æ¥à¤Ë¤â¤³¤ì¤é¤ÈƱ¤¸Ì¾Á°¤Î´Ø¿ô¤¬¤¢¤ë¤¬¡¢
308 ¥×¥í¥È¥¿¥¤¥×¤¬°Û¤Ê¤ë¤³¤È¤â¿¤¤¡£
309 .\" SUN ¤Ë¤Ï sgetspent_r() ¤¬¤Ê¤¤¡£
310 .\"O .SS Structure
311 .SS ¹½Â¤ÂÎ
312 .\"O The shadow password structure is defined in \fI<shadow.h>\fP as follows:
313 shadow ¥Ñ¥¹¥ï¡¼¥É¹½Â¤ÂΤϠ\fI<shadow.h>\fP ¤Ç°Ê²¼¤Î¤è¤¦¤ËÄêµÁ¤µ¤ì¤Æ¤¤¤ë:
314 .sp
315 .in +4n
316 .nf
317 struct spwd {
318 .\"O     char *sp_namp;     /* Login name */
319 .\"O     char *sp_pwdp;     /* Encrypted password */
320 .\"O     long  sp_lstchg;   /* Date of last change (measured
321 .\"O                           in days since 1970-01-01 00:00:00 +0000 (UTC)) */
322 .\"O     long  sp_min;      /* Min # of days between changes */
323 .\"O     long  sp_max;      /* Max # of days between changes */
324 .\"O     long  sp_warn;     /* # of days before password expires
325 .\"O                           to warn user to change it */
326 .\"O     long  sp_inact;    /* # of days after password expires
327 .\"O                           until account is disabled */
328 .\"O     long  sp_expire;   /* Date when account expires (measured
329 .\"O                           in days since 1970-01-01 00:00:00 +0000 (UTC)) */
330 .\"O     unsigned long sp_flag;  /* Reserved */
331     char *sp_namp;     /* ¥í¥°¥¤¥ó̾ */
332     char *sp_pwdp;     /* °Å¹æ²½¤µ¤ì¤¿¥Ñ¥¹¥ï¡¼¥É */
333     long  sp_lstchg;   /* ºÇ½ª¹¹¿·Æü
334                           (1970-01-01 00:00:00 +0000 (UTC)) ¤«¤é¤ÎÆü¿ô) */
335     long  sp_min;      /* Êѹ¹¤¬½ÐÍè¤ë¤è¤¦¤Ë¤Ê¤ë¤Þ¤Ç¤ÎºÇûÆü¿ô */
336     long  sp_max;      /* Êѹ¹¤ò¤·¤Ê¤¯¤Æ¤â¤è¤¤ºÇĹÆü¿ô */
337     long  sp_warn;     /* ¥Ñ¥¹¥ï¡¼¥É¤¬´ü¸ÂÀÚ¤ì¤Ë¤Ê¤ëÁ°¤Ë
338                           ¥æ¡¼¥¶¤ËÊѹ¹¤Î·Ù¹ð¤ò½Ð¤¹Æü¿ô */
339     long  sp_inact;    /* ¥Ñ¥¹¥ï¡¼¥É¤¬´ü¸ÂÀÚ¤ì¤Ë¤Ê¤Ã¤Æ¤«¤é
340                           ¥¢¥«¥¦¥ó¥È¤¬Ìµ¸ú¤Ë¤Ê¤ë¤Þ¤Ç¤ÎÆü¿ô */
341     long  sp_expire;   /* ¥¢¥«¥¦¥ó¥È¤¬Ìµ¸ú¤Ë¤Ê¤ëÆüÉÕ
342                           (1970-01-01 00:00:00 +0000 (UTC)) ¤«¤é¤ÎÆü¿ô) */
343     unsigned long sp_flag;  /* Í½Ìó¥Õ¥£¡¼¥ë¥É */
344 };
345 .fi
346 .in
347 .\"O .SH "RETURN VALUE"
348 .SH ÊÖ¤êÃÍ
349 .\"O The functions that return a pointer return NULL if no more entries
350 .\"O are available or if an error occurs during processing.
351 ¥Ý¥¤¥ó¥¿¤òÊÖ¤¹´Ø¿ô¤Ï¡¢¤³¤ì°Ê¾å¥¨¥ó¥È¥ê¤¬¤Ê¤¤¾ì¹ç¤ä
352 ½èÍýÃæ¤Ë¥¨¥é¡¼¤¬È¯À¸¤·¤¿¾ì¹ç NULL ¤òÊÖ¤¹¡£
353 .\"O The functions which have \fIint\fP as the return value return 0 for
354 .\"O success and \-1 for failure.
355 \fIint\fP ¤òÊÖ¤êÃͤȤ·¤Æ»ý¤Ä´Ø¿ô¤Ï¡¢
356 À®¸ù¤·¤¿¾ì¹ç 0 ¤òÊÖ¤·¡¢¼ºÇÔ¤·¤¿¾ì¹ç \-1 ¤òÊÖ¤¹¡£
357 .LP
358 .\"O For the nonreentrant functions, the return value may point to static area,
359 .\"O and may be overwritten by subsequent calls to these functions.
360 ¥ê¥¨¥ó¥È¥é¥ó¥ÈÈǤǤʤ¤´Ø¿ô¤Ç¤Ï¡¢ÊÖ¤êÃͤ¬ÀÅŪ¤ÊÎΰè¤ò»Ø¤·¤Æ¤ª¤ê¡¢
361 °ú¤­Â³¤¤¤Æ¤³¤ì¤é¤Î´Ø¿ô¤ò¸Æ¤Ó½Ð¤·¤¿¾ì¹ç¤Ë¾å½ñ¤­¤µ¤ì¤ë²ÄǽÀ­¤¬¤¢¤ë¡£
362 .LP
363 .\"O The reentrant functions return zero on success.
364 ¥ê¥¨¥ó¥È¥é¥ó¥ÈÈǤδؿô¤Ï¡¢À®¸ù¤·¤¿¾ì¹ç¤Ë 0 ¤òÊÖ¤¹¡£
365 .\"O In case of error, an error number is returned.
366 ¥¨¥é¡¼¤Î¾ì¹ç¤Ï¡¢¥¨¥é¡¼Èֹ椬ÊÖ¤µ¤ì¤ë¡£
367 .\"O .SH ERRORS
368 .SH ¥¨¥é¡¼
369 .TP
370 .B ERANGE
371 .\"O Supplied buffer is too small.
372 Í¿¤¨¤é¤ì¤¿¥Ð¥Ã¥Õ¥¡¤¬¾®¤µ¤¹¤®¤ë¡£
373 .\"O .SH FILES
374 .SH ¥Õ¥¡¥¤¥ë
375 .TP
376 .I /etc/shadow
377 .\"O local shadow password database file
378 ¥í¡¼¥«¥ë¤Î shadow ¥Ñ¥¹¥ï¡¼¥É¡¦¥Ç¡¼¥¿¥Ù¡¼¥¹¥Õ¥¡¥¤¥ë
379 .TP
380 .I /etc/.pwd.lock
381 .\"O lock file
382 ¥í¥Ã¥¯¥Õ¥¡¥¤¥ë
383 .LP
384 .\"O The include file
385 .\"O .I <paths.h>
386 .\"O defines the constant
387 .\"O .B _PATH_SHADOW
388 .\"O to the pathname of the shadow password file.
389 ¥¤¥ó¥¯¥ë¡¼¥É¥Õ¥¡¥¤¥ë
390 .I <paths.h>
391 ¤ÏÄê¿ô
392 .B _PATH_SHADOW
393 ¤òÄêµÁ¤·¤Æ¤¤¤ë¡£
394 ¤³¤ì¤Ï shadow ¥Ñ¥¹¥ï¡¼¥É¥Õ¥¡¥¤¥ë¤Î¥Ñ¥¹Ì¾¤Ç¤¢¤ë¡£
395 .\"O .SH "CONFORMING TO"
396 .SH ½àµò
397 .\"O The shadow password database and its associated API are
398 .\"O not specified in POSIX.1-2001.
399 .\"O However, many other systems provide a similar API.
400 shadow ¥Ñ¥¹¥ï¡¼¥É¡¦¥Ç¡¼¥¿¥Ù¡¼¥¹¤È´ØÏ¢ API ¤Ï POSIX.1-2001
401 ¤Ë¤Ïµ­ºÜ¤µ¤ì¤Æ¤¤¤Ê¤¤¡£¤·¤«¤·¤Ê¤¬¤é¡¢Â¿¤¯¤Î¾¤Î¥·¥¹¥Æ¥à¤Ç¤â
402 ƱÍͤΠAPI ¤¬Ä󶡤µ¤ì¤Æ¤¤¤ë¡£
403 .\"O .SH "SEE ALSO"
404 .SH ´ØÏ¢¹àÌÜ
405 .BR getgrnam (3),
406 .BR getpwnam (3),
407 .BR getpwnam_r (3),
408 .BR shadow (5)