X-Git-Url: http://git.osdn.net/view?p=linuxjm%2FLDP_man-pages.git;a=blobdiff_plain;f=draft%2Fman3%2Fsetnetgrent.3;h=1644e950a5d61beb170f95a48d64655b84c39901;hp=d8febcd6402186b3155eaa431f721e7986894e01;hb=1d98b26905be2ad5ba08a94d65f57d872bae4f85;hpb=38394e00bdc712dc8637aada383aebb3a95a9cbf diff --git a/draft/man3/setnetgrent.3 b/draft/man3/setnetgrent.3 index d8febcd6..1644e950 100644 --- a/draft/man3/setnetgrent.3 +++ b/draft/man3/setnetgrent.3 @@ -2,170 +2,69 @@ .\" Distributed under GPL .\" based on glibc infopages .\" polished - aeb +.\"******************************************************************* .\" -.\" Japanese Version Copyright (c) 2005 Akihiro MOTOKI -.\" all rights reserved. -.\" Translated 2005-02-20, Akihiro MOTOKI +.\" This file was generated with po4a. Translate the source file. .\" -.TH SETNETGRENT 3 2007-07-26 "GNU" "Linux Programmer's Manual" -.\"O .SH NAME +.\"******************************************************************* +.TH SETNETGRENT 3 2007\-07\-26 GNU "Linux Programmer's Manual" .SH 名前 -.\"O setnetgrent, endnetgrent, getnetgrent, getnetgrent_r, innetgr \- -.\"O handle network group entries setnetgrent, endnetgrent, getnetgrent, getnetgrent_r, innetgr \- ネットワーク・グループのエントリを操作する -.\"O .SH SYNOPSIS .SH 書式 .nf -.B #include +\fB#include \fP -.BI "int setnetgrent(const char *" netgroup ); +\fBint setnetgrent(const char *\fP\fInetgroup\fP\fB);\fP -.B "void endnetgrent(void);" +\fBvoid endnetgrent(void);\fP -.BI "int getnetgrent(char **" host ", char **" user ", char **" domain ); +\fBint getnetgrent(char **\fP\fIhost\fP\fB, char **\fP\fIuser\fP\fB, char **\fP\fIdomain\fP\fB);\fP -.BI "int getnetgrent_r(char **" host ", char **" user "," -.BI " char **" domain ", char *" buf ", int " buflen ); +\fBint getnetgrent_r(char **\fP\fIhost\fP\fB, char **\fP\fIuser\fP\fB,\fP +\fB char **\fP\fIdomain\fP\fB, char *\fP\fIbuf\fP\fB, int \fP\fIbuflen\fP\fB);\fP -.BI "int innetgr(const char *" netgroup ", const char *" host "," -.BI " const char *" user ", const char *" domain ); +\fBint innetgr(const char *\fP\fInetgroup\fP\fB, const char *\fP\fIhost\fP\fB,\fP +\fB const char *\fP\fIuser\fP\fB, const char *\fP\fIdomain\fP\fB);\fP .fi .sp .in -4n -.\"O Feature Test Macro Requirements for glibc (see -.\"O .BR feature_test_macros (7)): -glibc 向けの機能検査マクロの要件 -.RB ( feature_test_macros (7) -参照): +glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参照): .in .sp .ad l -.BR setnetgrent (), -.BR endnetgrent (), -.BR getnetgrent (), -.BR getnetgrent_r (), -.BR innetgr (): -_BSD_SOURCE || _SVID_SOURCE +\fBsetnetgrent\fP(), \fBendnetgrent\fP(), \fBgetnetgrent\fP(), \fBgetnetgrent_r\fP(), +\fBinnetgr\fP(): _BSD_SOURCE || _SVID_SOURCE .ad b -.\"O .SH DESCRIPTION .SH 説明 -.\"O The -.\"O .I netgroup -.\"O is a SunOS invention. -.\"O A netgroup database is a list of string triples -.\"O .RI ( hostname ", " username ", " domainname ) -.\"O or other netgroup names. -.\"O Any of the elements in a triple can be empty, -.\"O which means that anything matches. -.\"O The functions described here allow access to the netgroup databases. -.\"O The file -.\"O .I /etc/nsswitch.conf -.\"O defines what database is searched. -.I netgroup -は SunOS で考案されたものである。ネットグループのデータベースの -エントリは、 3 つの文字列のリスト -.RI ( hostname ", " username ", " domainname ) -もしくはネットグループ名である。 -前記のリストの各要素は空であってもよい。 -空は何とでも一致することを意味する。 -本ページで説明する関数を使うことで、ネットグループのデータベースに -アクセスすることができる。どのデータベースが検索されるかは -.I /etc/nsswitch.conf -ファイルで定義されている。 +\fInetgroup\fP は SunOS で考案されたものである。ネットグループのデータベースの エントリは、 3 つの文字列のリスト +(\fIhostname\fP, \fIusername\fP, \fIdomainname\fP) もしくはネットグループ名である。 +前記のリストの各要素は空であってもよい。 空は何とでも一致することを意味する。 本ページで説明する関数を使うことで、ネットグループのデータベースに +アクセスすることができる。どのデータベースが検索されるかは \fI/etc/nsswitch.conf\fP ファイルで定義されている。 .PP -.\"O The -.\"O .BR setnetgrent () -.\"O call defines the netgroup that will be searched by subsequent -.\"O .BR getnetgrent () -.\"O calls. -.\"O The -.\"O .BR getnetgrent () -.\"O function retrieves the next netgroup entry, and returns pointers in -.\"O .IR host , -.\"O .IR user , -.\"O .IR domain . -.BR setnetgrent () -コールは、この後で呼ばれる -.BR getnetgrent () -コールが検索するネットグループを定める。 -.BR getnetgrent () -関数はネットグループの次のエントリを取得し、 -.IR host , -.IR user , -.I domain -にポインタを入れて返る。 -.\"O A NULL pointer means that the corresponding entry matches any string. -.\"O The pointers are valid only as long as there is no call to other -.\"O netgroup-related functions. -.\"O To avoid this problem you can use the GNU function -.\"O .BR getnetgrent_r () -.\"O that stores the strings in the supplied buffer. -.\"O To free all allocated buffers use -.\"O .BR endnetgrent (). -NULL ポインタは、対応するエントリがどんな文字列とも一致することを意味する。 -得られたポインタは、ネットグループ関係の関数のいずれかが呼ばれるまでの -間だけ有効である。この問題を避けるためには GNU 拡張の関数 -.BR getnetgrent_r () -を使うとよい。この関数は呼び出し側が用意したバッファに -文字列を格納する。割り当て済のバッファを全て解放するには -.BR endnetgrent () -を使用する。 +\fBsetnetgrent\fP() コールは、この後で呼ばれる \fBgetnetgrent\fP() コールが検索するネットグループを定める。 +\fBgetnetgrent\fP() 関数はネットグループの次のエントリを取得し、 \fIhost\fP, \fIuser\fP, \fIdomain\fP +にポインタを入れて返る。 NULL ポインタは、対応するエントリがどんな文字列とも一致することを意味する。 +得られたポインタは、ネットグループ関係の関数のいずれかが呼ばれるまでの 間だけ有効である。この問題を避けるためには GNU 拡張の関数 +\fBgetnetgrent_r\fP() を使うとよい。この関数は呼び出し側が用意したバッファに 文字列を格納する。割り当て済のバッファを全て解放するには +\fBendnetgrent\fP() を使用する。 .PP -.\"O In most cases you only want to check if the triplet -.\"O .RI ( hostname ", " username ", " domainname ) -.\"O is a member of a netgroup. -.\"O The function -.\"O .BR innetgr () -.\"O can be used for this without calling the above three functions. -.\"O Again, a NULL pointer is a wildcard and matches any string. -.\"O The function is thread-safe. -ほとんどの場合、 -.RI ( hostname ", " username ", " domainname ) -の3要素の組がネットグループのメンバーかどうかを確認したいだけであろう。 -.BR innetgr () -関数を使うと、上記の3つの関数を呼び出さずにこの目的を達成できる。 -もう一度書いておくが、NULL ポインタはワイルドカードであり、 +ほとんどの場合、 (\fIhostname\fP, \fIusername\fP, \fIdomainname\fP) +の3要素の組がネットグループのメンバーかどうかを確認したいだけであろう。 \fBinnetgr\fP() +関数を使うと、上記の3つの関数を呼び出さずにこの目的を達成できる。 もう一度書いておくが、NULL ポインタはワイルドカードであり、 あらゆる文字列と一致する。この関数はスレッドセーフである。 -.\"O .SH "RETURN VALUE" .SH 返り値 -.\"O These functions return 1 on success and 0 for failure. これらの関数は成功すると 1 を、失敗すると 0 を返す。 -.\"O .SH FILES .SH ファイル -.I /etc/netgroup +\fI/etc/netgroup\fP .br -.I /etc/nsswitch.conf -.\"O .SH CONFORMING TO +\fI/etc/nsswitch.conf\fP .SH 準拠 -.\"O These functions are not in POSIX.1-2001, but -.\"O .BR setnetgrent (), -.\"O .BR endnetgrent (), -.\"O .BR getnetgrent (), -.\"O and -.\"O .BR innetgr () -.\"O are available on most UNIX systems. -.\"O .BR getnetgrent_r () -.\"O is not widely available on other systems. -これらの関数は POSIX.1-2001 にはないが、 -setnetgrent (), -endnetgrent (), -getnetgrent (), -innetgr () -はほとんどの UNIX システムで利用可能である。 -.BR getnetgrent_r () -は広く他のシステムで利用できるわけではない。 .\" getnetgrent_r() is on Solaris 8 and AIX 5.1, but not the BSDs. -.\"O .SH NOTES +これらの関数は POSIX.1\-2001 にはないが、 setnetgrent (), endnetgrent (), getnetgrent (), +innetgr () はほとんどの UNIX システムで利用可能である。 \fBgetnetgrent_r\fP() +は広く他のシステムで利用できるわけではない。 .SH 注意 -.\"O In the BSD implementation, -.\"O .BR setnetgrent () -.\"O returns void. -BSD の実装では -.BR setnetgrent () -は void を返す。 -.\"O .SH "SEE ALSO" +BSD の実装では \fBsetnetgrent\fP() は void を返す。 .SH 関連項目 -.BR sethostent (3), -.BR setprotoent (3), -.BR setservent (3) +\fBsethostent\fP(3), \fBsetprotoent\fP(3), \fBsetservent\fP(3)