OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / draft / man3 / setnetgrent.3
1 .\"  Copyright 2002 walter harms (walter.harms@informatik.uni-oldenburg.de)
2 .\"  Distributed under GPL
3 .\"  based on glibc infopages
4 .\" polished - aeb
5 .\"
6 .\" Japanese Version Copyright (c) 2005  Akihiro MOTOKI
7 .\"         all rights reserved.
8 .\" Translated 2005-02-20, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
9 .\"
10 .TH SETNETGRENT 3 2007-07-26 "GNU" "Linux Programmer's Manual"
11 .\"O .SH NAME
12 .SH Ì¾Á°
13 .\"O setnetgrent, endnetgrent, getnetgrent, getnetgrent_r, innetgr \-
14 .\"O handle network group entries
15 setnetgrent, endnetgrent, getnetgrent, getnetgrent_r, innetgr \-
16 ¥Í¥Ã¥È¥ï¡¼¥¯¡¦¥°¥ë¡¼¥×¤Î¥¨¥ó¥È¥ê¤òÁàºî¤¹¤ë
17 .\"O .SH SYNOPSIS
18 .SH ½ñ¼°
19 .nf
20 .B #include <netdb.h>
21
22 .BI "int setnetgrent(const char *" netgroup );
23
24 .B "void endnetgrent(void);"
25
26 .BI "int getnetgrent(char **" host ", char **" user ", char **" domain );
27
28 .BI "int getnetgrent_r(char **" host ", char **" user ","
29 .BI "                  char **" domain ", char *" buf ", int " buflen );
30
31 .BI "int innetgr(const char *" netgroup ", const char *" host ","
32 .BI "            const char *" user ", const char *" domain );
33 .fi
34 .sp
35 .in -4n
36 .\"O Feature Test Macro Requirements for glibc (see
37 .\"O .BR feature_test_macros (7)):
38 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
39 .RB ( feature_test_macros (7)
40 »²¾È):
41 .in
42 .sp
43 .ad l
44 .BR setnetgrent (),
45 .BR endnetgrent (),
46 .BR getnetgrent (),
47 .BR getnetgrent_r (),
48 .BR innetgr ():
49 _BSD_SOURCE || _SVID_SOURCE
50 .ad b
51 .\"O .SH DESCRIPTION
52 .SH ÀâÌÀ
53 .\"O The
54 .\"O .I netgroup
55 .\"O is a SunOS invention.
56 .\"O A netgroup database is a list of string triples
57 .\"O .RI ( hostname ", " username ", " domainname )
58 .\"O or other netgroup names.
59 .\"O Any of the elements in a triple can be empty,
60 .\"O which means that anything matches.
61 .\"O The functions described here allow access to the netgroup databases.
62 .\"O The file
63 .\"O .I /etc/nsswitch.conf
64 .\"O defines what database is searched.
65 .I netgroup
66 ¤Ï SunOS ¤Ç¹Í°Æ¤µ¤ì¤¿¤â¤Î¤Ç¤¢¤ë¡£¥Í¥Ã¥È¥°¥ë¡¼¥×¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¤Î
67 ¥¨¥ó¥È¥ê¤Ï¡¢ 3 ¤Ä¤Îʸ»úÎó¤Î¥ê¥¹¥È
68 .RI ( hostname ", " username ", " domainname )
69 ¤â¤·¤¯¤Ï¥Í¥Ã¥È¥°¥ë¡¼¥×̾¤Ç¤¢¤ë¡£
70 Á°µ­¤Î¥ê¥¹¥È¤Î³ÆÍ×ÁǤ϶õ¤Ç¤¢¤Ã¤Æ¤â¤è¤¤¡£
71 ¶õ¤Ï²¿¤È¤Ç¤â°ìÃפ¹¤ë¤³¤È¤ò°ÕÌ£¤¹¤ë¡£
72 ËÜ¥Ú¡¼¥¸¤ÇÀâÌÀ¤¹¤ë´Ø¿ô¤ò»È¤¦¤³¤È¤Ç¡¢¥Í¥Ã¥È¥°¥ë¡¼¥×¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¤Ë
73 ¥¢¥¯¥»¥¹¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£¤É¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¤¬¸¡º÷¤µ¤ì¤ë¤«¤Ï
74 .I /etc/nsswitch.conf
75 ¥Õ¥¡¥¤¥ë¤ÇÄêµÁ¤µ¤ì¤Æ¤¤¤ë¡£
76 .PP
77 .\"O The
78 .\"O .BR setnetgrent ()
79 .\"O call defines the netgroup that will be searched by subsequent
80 .\"O .BR getnetgrent ()
81 .\"O calls.
82 .\"O The
83 .\"O .BR getnetgrent ()
84 .\"O function retrieves the next netgroup entry, and returns pointers in
85 .\"O .IR host ,
86 .\"O .IR user ,
87 .\"O .IR domain .
88 .BR setnetgrent ()
89 ¥³¡¼¥ë¤Ï¡¢¤³¤Î¸å¤Ç¸Æ¤Ð¤ì¤ë
90 .BR getnetgrent ()
91 ¥³¡¼¥ë¤¬¸¡º÷¤¹¤ë¥Í¥Ã¥È¥°¥ë¡¼¥×¤òÄê¤á¤ë¡£
92 .BR getnetgrent ()
93 ´Ø¿ô¤Ï¥Í¥Ã¥È¥°¥ë¡¼¥×¤Î¼¡¤Î¥¨¥ó¥È¥ê¤ò¼èÆÀ¤·¡¢
94 .IR host ,
95 .IR user ,
96 .I domain
97 ¤Ë¥Ý¥¤¥ó¥¿¤òÆþ¤ì¤ÆÊ֤롣
98 .\"O A NULL pointer means that the corresponding entry matches any string.
99 .\"O The pointers are valid only as long as there is no call to other
100 .\"O netgroup-related functions.
101 .\"O To avoid this problem you can use the GNU function
102 .\"O .BR getnetgrent_r ()
103 .\"O that stores the strings in the supplied buffer.
104 .\"O To free all allocated buffers use
105 .\"O .BR endnetgrent ().
106 NULL ¥Ý¥¤¥ó¥¿¤Ï¡¢Âбþ¤¹¤ë¥¨¥ó¥È¥ê¤¬¤É¤ó¤Êʸ»úÎó¤È¤â°ìÃפ¹¤ë¤³¤È¤ò°ÕÌ£¤¹¤ë¡£
107 ÆÀ¤é¤ì¤¿¥Ý¥¤¥ó¥¿¤Ï¡¢¥Í¥Ã¥È¥°¥ë¡¼¥×´Ø·¸¤Î´Ø¿ô¤Î¤¤¤º¤ì¤«¤¬¸Æ¤Ð¤ì¤ë¤Þ¤Ç¤Î
108 ´Ö¤À¤±Í­¸ú¤Ç¤¢¤ë¡£¤³¤ÎÌäÂê¤òÈò¤±¤ë¤¿¤á¤Ë¤Ï GNU ³ÈÄ¥¤Î´Ø¿ô
109 .BR getnetgrent_r ()
110 ¤ò»È¤¦¤È¤è¤¤¡£¤³¤Î´Ø¿ô¤Ï¸Æ¤Ó½Ð¤·Â¦¤¬ÍÑ°Õ¤·¤¿¥Ð¥Ã¥Õ¥¡¤Ë
111 ʸ»úÎó¤ò³ÊǼ¤¹¤ë¡£³ä¤êÅö¤ÆºÑ¤Î¥Ð¥Ã¥Õ¥¡¤òÁ´¤Æ²òÊü¤¹¤ë¤Ë¤Ï
112 .BR endnetgrent ()
113 ¤ò»ÈÍѤ¹¤ë¡£
114 .PP
115 .\"O In most cases you only want to check if the triplet
116 .\"O .RI ( hostname ", " username ", " domainname )
117 .\"O is a member of a netgroup.
118 .\"O The function
119 .\"O .BR innetgr ()
120 .\"O can be used for this without calling the above three functions.
121 .\"O Again, a NULL pointer is a wildcard and matches any string.
122 .\"O The function is thread-safe.
123 ¤Û¤È¤ó¤É¤Î¾ì¹ç¡¢
124 .RI ( hostname ", " username ", " domainname )
125 ¤Î3Í×ÁǤÎÁȤ¬¥Í¥Ã¥È¥°¥ë¡¼¥×¤Î¥á¥ó¥Ð¡¼¤«¤É¤¦¤«¤ò³Îǧ¤·¤¿¤¤¤À¤±¤Ç¤¢¤í¤¦¡£
126 .BR innetgr ()
127 ´Ø¿ô¤ò»È¤¦¤È¡¢¾åµ­¤Î3¤Ä¤Î´Ø¿ô¤ò¸Æ¤Ó½Ð¤µ¤º¤Ë¤³¤ÎÌÜŪ¤òãÀ®¤Ç¤­¤ë¡£
128 ¤â¤¦°ìÅÙ½ñ¤¤¤Æ¤ª¤¯¤¬¡¢NULL ¥Ý¥¤¥ó¥¿¤Ï¥ï¥¤¥ë¥É¥«¡¼¥É¤Ç¤¢¤ê¡¢
129 ¤¢¤é¤æ¤ëʸ»úÎó¤È°ìÃפ¹¤ë¡£¤³¤Î´Ø¿ô¤Ï¥¹¥ì¥Ã¥É¥»¡¼¥Õ¤Ç¤¢¤ë¡£
130 .\"O .SH "RETURN VALUE"
131 .SH ÊÖ¤êÃÍ
132 .\"O These functions return 1 on success and 0 for failure.
133 ¤³¤ì¤é¤Î´Ø¿ô¤ÏÀ®¸ù¤¹¤ë¤È 1 ¤ò¡¢¼ºÇÔ¤¹¤ë¤È 0 ¤òÊÖ¤¹¡£
134 .\"O .SH FILES
135 .SH ¥Õ¥¡¥¤¥ë
136 .I /etc/netgroup
137 .br
138 .I /etc/nsswitch.conf
139 .\"O .SH CONFORMING TO
140 .SH ½àµò
141 .\"O These functions are not in POSIX.1-2001, but
142 .\"O .BR setnetgrent (),
143 .\"O .BR endnetgrent (),
144 .\"O .BR getnetgrent (),
145 .\"O and
146 .\"O .BR innetgr ()
147 .\"O are available on most Unix systems.
148 .\"O .BR getnetgrent_r ()
149 .\"O is not widely available on other systems.
150 ¤³¤ì¤é¤Î´Ø¿ô¤Ï POSIX.1-2001 ¤Ë¤Ï¤Ê¤¤¤¬¡¢
151 setnetgrent (),
152 endnetgrent (),
153 getnetgrent (),
154 innetgr ()
155 ¤Ï¤Û¤È¤ó¤É¤Î Unix ¥·¥¹¥Æ¥à¤ÇÍøÍѲÄǽ¤Ç¤¢¤ë¡£
156 .BR getnetgrent_r ()
157 ¤Ï¹­¤¯Â¾¤Î¥·¥¹¥Æ¥à¤ÇÍøÍѤǤ­¤ë¤ï¤±¤Ç¤Ï¤Ê¤¤¡£
158 .\" getnetgrent_r() is on Solaris 8 and AIX 5.1, but not the BSDs.
159 .\"O .SH NOTES
160 .SH Ãí°Õ
161 .\"O In the BSD implementation,
162 .\"O .BR setnetgrent ()
163 .\"O returns void.
164 BSD ¤Î¼ÂÁõ¤Ç¤Ï
165 .BR setnetgrent ()
166 ¤Ï void ¤òÊÖ¤¹¡£
167 .\"O .SH "SEE ALSO"
168 .SH ´ØÏ¢¹àÌÜ
169 .BR sethostent (3),
170 .BR setprotoent (3),
171 .BR setservent (3)