The manual
ginnOS
The reference: libc, the libraries and the kernel
Toggle main menu visibility
Loading...
Searching...
No Matches
grp.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <
sys/types.h
>
4
5
/**
6
* @file grp.h
7
* @brief the group database (/etc/group: name:password:gid:members).
8
*/
9
10
struct
group
11
{
12
char
*
gr_name
;
13
char
*
gr_passwd
;
14
gid_t
gr_gid
;
15
char
*
gr_mem_list
;
// the members, comma separated (no gr_mem array yet)
16
};
17
18
/**
19
* look up a group by id or name. the result is overwritten by the next call.
20
* @return the entry, or NULL if there is none.
21
*/
22
struct
group
*
getgrgid
(
gid_t
gid);
23
struct
group
*
getgrnam
(
const
char
*name);
getgrnam
struct group * getgrnam(const char *name)
getgrgid
struct group * getgrgid(gid_t gid)
look up a group by id or name.
group
Definition
grp.h:11
group::gr_gid
gid_t gr_gid
Definition
grp.h:14
group::gr_passwd
char * gr_passwd
Definition
grp.h:13
group::gr_name
char * gr_name
Definition
grp.h:12
group::gr_mem_list
char * gr_mem_list
Definition
grp.h:15
types.h
basic system types.
gid_t
unsigned int gid_t
Definition
types.h:18
src
libc
include
grp.h
Generated by
1.18.0