MentOS
0.8.0
The Mentoring Operating System
|
Defines the structures and functions for managing groups. More...
Go to the source code of this file.
Classes | |
struct | group |
Contains user group informations. More... | |
Macros | |
#define | MAX_MEMBERS_PER_GROUP 64 |
Maximum number of users per group. | |
Typedefs | |
typedef struct group | group_t |
Contains user group informations. | |
Functions | |
group_t * | getgrgid (gid_t gid) |
Provides access to the group database entry for uid . More... | |
group_t * | getgrnam (const char *name) |
Provides access to the group database entry for name . More... | |
int | getgrgid_r (gid_t gid, group_t *group, char *buf, size_t buflen, group_t **result) |
Provides the same information as getgrgid but it stores the results inside group, and the string information are store store inside buf . More... | |
int | getgrnam_r (const char *name, group_t *group, char *buf, size_t buflen, group_t **result) |
Provides the same information as getgrnam but it stores the results inside group, and the string information are store store inside buf . More... | |
group_t * | getgrent (void) |
Returns a pointer to a structure containing the broken-out fields of an entry in the group database. More... | |
void | endgrent (void) |
Rewinds the group database to allow repeated searches. | |
void | setgrent (void) |
May be called to close the group database when processing is complete. | |
Defines the structures and functions for managing groups.
group_t* getgrent | ( | void | ) |
Returns a pointer to a structure containing the broken-out fields of an entry in the group database.
When first called returns a pointer to a group structure containing the first entry in the group database. Thereafter, it returns a pointer to a group structure containing the next group structure in the group database, so successive calls may be used to search the entire database.
Provides access to the group database entry for uid
.
gid | The gid to search inside the database. |
Provides the same information as getgrgid but it stores the results inside group, and the string information are store store inside buf
.
gid | The uid to search inside the database. |
group | The structure containing pointers to the entry fields. |
buf | The buffer where the strings should be stored. |
buflen | The lenght of the buffer. |
result | A pointer to the result or NULL is stored here. |
group_t* getgrnam | ( | const char * | name | ) |
Provides access to the group database entry for name
.
name | The name to search inside the database. |
Provides the same information as getgrnam but it stores the results inside group, and the string information are store store inside buf
.
name | The name to search inside the database. |
group | The structure containing pointers to the entry fields. |
buf | The buffer where the strings should be stored. |
buflen | The lenght of the buffer. |
result | A pointer to the result or NULL is stored here. |