getgrent

GETGRENT(3)                Linux Programmer's Manual               GETGRENT(3)



åå
       getgrent, setgrent, endgrent - ã°ã«ã¼ããã¡ã¤ã«ã¨ã³ããªã®åãåºã

æ¸å¼
       #include <grp.h>
       #include <sys/types.h>

       struct group *getgrent(void);

       void setgrent(void);

       void endgrent(void);

説æ
       getgrent() é¢æ°ã¯ã/etc/group ããåãåºããã°ã«ã¼ãæå ±
       ãå«ãæ§é ä½ã¸ã®ãã¤ã³ã¿ãè¿ããæåã«å¼ã³åºãããæã¯
       æåã®ã¨ã³ããªãè¿ãããã以éã¯ã次ã®ã¨ã³ããªãè¿ãã

       setgrent() é¢æ°ã¯ããã¡ã¤ã«ãã¤ã³ã¿ã /etc/group ãã¡ã¤ã«ã® åé ã¸å·»ãæ»ãã

       endgrent() é¢æ°ã¯ã/etc/group ãã¡ã¤ã«ãã¯ãã¼ãºããã

       group æ§é ä½ã¯ã<grp.h> ã§ä»¥ä¸ã®ããã«å®ç¾©ããã¦ãã:

              struct group {
                      char    *gr_name;        /* ã°ã«ã¼ãå */
                      char    *gr_passwd;      /* ã°ã«ã¼ãã®ãã¹ã¯ã¼ã */
                      gid_t   gr_gid;          /* ã°ã«ã¼ã ID */
                      char    **gr_mem;        /* ã°ã«ã¼ãã®ã¡ã³ã */
              };

è¿ãå¤
       getgrent() é¢æ°ã¯ã°ã«ã¼ãæå ±æ§é ä½ã¸ã®ãã¤ã³ã¿ãè¿ãã
       ãã以ä¸ã¨ã³ããªãç¡ãããã¨ã©ã¼ãçºçããå ´å㯠NULL ãè¿ãã

ã¨ã©ã¼
       ENOMEM ã°ã«ã¼ãæå ±æ§é ä½ãå²ãå½ã¦ãããã®ã¡ã¢ãªãä¸ååã

ãã¡ã¤ã«
       /etc/group
              ã°ã«ã¼ããã¼ã¿ãã¼ã¹ãã¡ã¤ã«

æºæ
       SVID 3, BSD 4.3

é¢é£é ç®
       fgetgrent(3), getgrnam(3), getgrgid(3)




GNU                              April 4, 1993                     GETGRENT(3)