endgrent man page on OPENSTEP

Man page or keyword search:  
man Server   1419 pages
apropos Keyword Search (all sections)
Output format
OPENSTEP logo
[printable version]


GETGRGID(3)							   GETGRGID(3)

NAME
       getgrgid,  getgrnam,  getgrent,	setgrent,  endgrent  -	group database
       access

SYNOPSIS
       #include <sys/types.h>
       #include <grp.h>

       struct group *getgrgid(gid_t gid);

       struct group *getgrnam(const char *name);

(ALSO AVAILABLE IN BSD)
       void setgrent(void);

       struct group *getgrent(void);

       void endgrent(void);

DESCRIPTION
       The getgrgid and getgrnam functions both return a pointer  to  a	 group
       structure  containing  an entry from the system's group database with a
       matching numeric group ID (gid) or group name (name).

       The group structure is defined in the header <grp.h> and	 includes  the
       following members:

	      Member Type    Member Name	 Description

	      char *	     gr_name		 The name of the group.

	      gid_t	     gr_gid		 The numerical group ID.

	      char **	     gr_mem		 A  null-terminated  vector of
						 pointers  to  the  individual
						 member names.

       The  value  returned points to a static area.  So if the information is
       to be saved, it must be copied.

       The BSD routines setgrent, getgrent, and endgrent permit an application
       to scan the groups sequentially.	 setgrent resets the group file to the
       beginning, getgrent reads the next group entry, and endgrent closes the
       group  file when processing is complete.	 Calls to getgrgid or getgrnam
       set the current location in the group file with	respect	 to  calls  to
       getgrent.

RETURN VALUE
       A  NULL	pointer	 is returned on error or if the requested entry is not
       found.

FILES
       /etc/group - if NetInfo is not running.

SEE ALSO
       getlogin(3), getpwent(3), group(5), netinfo(5)

BUGS
       All information is contained in a static area so it must be  copied  if
       it is to be saved.

7th Edition			August 1, 1992			   GETGRGID(3)
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server OPENSTEP

List of man pages available for OPENSTEP

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net