setnetgrent

Autres langues

Langue: ja

Version: 2002-08-20 (openSuse - 09/10/07)

Section: 3 (Bibliothèques de fonctions)

̾Á°

setnetgrent, endnetgrent, getnetgrent, getnetgrent_r, innetgr - ¥Í¥Ã¥È¥ï¡¼¥¯¡¦¥°¥ë¡¼¥×¤Î¥¨¥ó¥È¥ê¤òÁàºî¤¹¤ë

½ñ¼°

#include <netdb.h>

int setnetgrent(const char *netgroup);
void endnetgrent(void);
int getnetgrent(char **host, char **user, char **domain);

int getnetgrent_r(char **host, char **user, char **domain, char *buf, int buflen);

int innetgr(const char *netgroup, const char *host, const char *user, const char *domain);

ÀâÌÀ

netgroup ¤Ï SunOS ¤Ç¹Í°Æ¤µ¤ì¤¿¤â¤Î¤Ç¤¢¤ë¡£¥Í¥Ã¥È¥°¥ë¡¼¥×¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¤Î ¥¨¥ó¥È¥ê¤Ï¡¢ 3 ¤Ä¤Îʸ»úÎó¤Î¥ê¥¹¥È (hostname,username,domainname) ¤â¤·¤¯¤Ï¥Í¥Ã¥È¥°¥ë¡¼¥×̾¤Ç¤¢¤ë¡£ Á°µ­¤Î¥ê¥¹¥È¤Î³ÆÍ×ÁǤ϶õ¤Ç¤¢¤Ã¤Æ¤â¤è¤¤¡£ ¶õ¤Ï²¿¤È¤Ç¤â°ìÃפ¹¤ë¤³¤È¤ò°ÕÌ£¤¹¤ë¡£ ËÜ¥Ú¡¼¥¸¤ÇÀâÌÀ¤¹¤ë´Ø¿ô¤ò»È¤¦¤³¤È¤Ç¡¢¥Í¥Ã¥È¥°¥ë¡¼¥×¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¤Ë ¥¢¥¯¥»¥¹¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£¤É¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¤¬¸¡º÷¤µ¤ì¤ë¤«¤Ï /etc/nsswitch.conf ¥Õ¥¡¥¤¥ë¤ÇÄêµÁ¤µ¤ì¤Æ¤¤¤ë¡£

setnetgrent() ¥³¡¼¥ë¤Ï¡¢¤³¤Î¸å¤Ç¸Æ¤Ð¤ì¤ë getnetgrent() ¥³¡¼¥ë¤¬¸¡º÷¤¹¤ë¥Í¥Ã¥È¥°¥ë¡¼¥×¤òÄê¤á¤ë¡£ getnetgrent() ´Ø¿ô¤Ï¥Í¥Ã¥È¥°¥ë¡¼¥×¤Î¼¡¤Î¥¨¥ó¥È¥ê¤ò¼èÆÀ¤·¡¢ host, user, domain ¤Ë¥Ý¥¤¥ó¥¿¤òÆþ¤ì¤ÆÊ֤롣 NULL ¥Ý¥¤¥ó¥¿¤Ï¡¢Âбþ¤¹¤ë¥¨¥ó¥È¥ê¤¬¤É¤ó¤Êʸ»úÎó¤È¤â°ìÃפ¹¤ë¤³¤È¤ò°ÕÌ£¤¹¤ë¡£ ÆÀ¤é¤ì¤¿¥Ý¥¤¥ó¥¿¤Ï¡¢¥Í¥Ã¥È¥°¥ë¡¼¥×´Ø·¸¤Î´Ø¿ô¤Î¤¤¤º¤ì¤«¤¬¸Æ¤Ð¤ì¤ë¤Þ¤Ç¤Î ´Ö¤À¤±Í­¸ú¤Ç¤¢¤ë¡£¤³¤ÎÌäÂê¤òÈò¤±¤ë¤¿¤á¤Ë¤Ï GNU ³ÈÄ¥¤Î´Ø¿ô getnetgrent_r() ¤ò»È¤¦¤È¤è¤¤¡£¤³¤Î´Ø¿ô¤Ï¸Æ¤Ó½Ð¤·Â¦¤¬ÍÑ°Õ¤·¤¿¥Ð¥Ã¥Õ¥¡¤Ë ʸ»úÎó¤ò³ÊǼ¤¹¤ë¡£³ä¤êÅö¤ÆºÑ¤Î¥Ð¥Ã¥Õ¥¡¤òÁ´¤Æ²òÊü¤¹¤ë¤Ë¤Ï endnetgrent() ¤ò»ÈÍѤ¹¤ë¡£

¤Û¤È¤ó¤É¤Î¾ì¹ç¡¢ (hostname,username,domainname) ¤Î3Í×ÁǤÎÁȤ¬¥Í¥Ã¥È¥°¥ë¡¼¥×¤Î¥á¥ó¥Ð¡¼¤«¤É¤¦¤«¤ò³Îǧ¤·¤¿¤¤¤À¤±¤Ç¤¢¤í¤¦¡£ innetgr() ´Ø¿ô¤ò»È¤¦¤È¡¢¾åµ­¤Î3¤Ä¤Î´Ø¿ô¤ò¸Æ¤Ó½Ð¤µ¤º¤Ë¤³¤ÎÌÜŪ¤òãÀ®¤Ç¤­¤ë¡£ ¤â¤¦°ìÅÙ½ñ¤¤¤Æ¤ª¤¯¤¬¡¢NULL ¥Ý¥¤¥ó¥¿¤Ï¥ï¥¤¥ë¥É¥«¡¼¥É¤Ç¤¢¤ê¡¢ ¤¢¤é¤æ¤ëʸ»úÎó¤È°ìÃפ¹¤ë¡£¤³¤Î´Ø¿ô¤Ï¥¹¥ì¥Ã¥É¥»¡¼¥Õ¤Ç¤¢¤ë¡£

ÊÖ¤êÃÍ

¤³¤ì¤é¤Î´Ø¿ô¤ÏÀ®¸ù¤¹¤ë¤È 1 ¤ò¡¢¼ºÇÔ¤¹¤ë¤È 0 ¤òÊÖ¤¹¡£

¥Õ¥¡¥¤¥ë

/etc/netgroup
/etc/nsswitch.conf

Ãí°Õ

BSD ¤Î¼ÂÁõ¤Ç¤Ï setnetgrent() ¤Ï void ¤òÊÖ¤¹¡£

´ØÏ¢¹àÌÜ

sethostent(3), setservent(3), setprotoent(3)