posix-next API 0.1.0
Out-of-tree Zephyr POSIX module
Loading...
Searching...
No Matches
POSIX_SYSTEM_DATABASE

POSIX System Database option group. More...

Data Structures

struct  group
 POSIX group database entry. More...
 
struct  passwd
 POSIX password database entry. More...
 

Functions

void endgrent (void)
 Close the group database.
 
struct groupgetgrent (void)
 Read the next group entry from the group database.
 
struct groupgetgrgid (gid_t gid)
 Look up a group entry by group ID.
 
struct groupgetgrnam (const char *name)
 Look up a group entry by name.
 
void setgrent (void)
 Rewind to the beginning of the group database.
 
void endpwent (void)
 Close the password database.
 
struct passwdgetpwent (void)
 Read the next password entry from the password database.
 
struct passwdgetpwnam (const char *name)
 Look up a password entry by name.
 
struct passwdgetpwuid (uid_t uid)
 Look up a password entry by user ID.
 
void setpwent (void)
 Rewind to the beginning of the password database.
 

Detailed Description

POSIX System Database option group.

Covers getpwnam(), getpwuid(), getgrnam(), and getgrgid().

Function Documentation

◆ endgrent()

void endgrent ( void  )

Close the group database.

◆ endpwent()

void endpwent ( void  )

Close the password database.

◆ getgrent()

struct group * getgrent ( void  )

Read the next group entry from the group database.

◆ getgrgid()

struct group * getgrgid ( gid_t  gid)

Look up a group entry by group ID.

Parameters
gidGroup ID to search for.
Returns
Pointer to a static group structure, or NULL on failure or if not found.
See also
https://pubs.opengroup.org/onlinepubs/9699919799/functions/getgrgid.html

◆ getgrnam()

struct group * getgrnam ( const char *  name)

Look up a group entry by name.

Parameters
nameGroup name to search for.
Returns
Pointer to a static group structure, or NULL on failure or if not found.
See also
https://pubs.opengroup.org/onlinepubs/9699919799/functions/getgrnam.html

◆ getpwent()

struct passwd * getpwent ( void  )

Read the next password entry from the password database.

◆ getpwnam()

struct passwd * getpwnam ( const char *  name)

Look up a password entry by name.

Parameters
nameUser login name to search for.
Returns
Pointer to a static passwd structure, or NULL on failure or if not found.
See also
https://pubs.opengroup.org/onlinepubs/9699919799/functions/getpwnam.html

◆ getpwuid()

struct passwd * getpwuid ( uid_t  uid)

Look up a password entry by user ID.

Parameters
uidNumerical user ID to search for.
Returns
Pointer to a static passwd structure, or NULL on failure or if not found.
See also
https://pubs.opengroup.org/onlinepubs/9699919799/functions/getpwuid.html

◆ setgrent()

void setgrent ( void  )

Rewind to the beginning of the group database.

◆ setpwent()

void setpwent ( void  )

Rewind to the beginning of the password database.