posix-next API 0.1.0
Out-of-tree Zephyr POSIX module
Loading...
Searching...
No Matches
POSIX_SYSTEM_DATABASE
Implementation completeness: 100.0%100IMPLLine coverage: 71.4%71COVLinux compatibility tests: passing🐧

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)
getgrgid line coverage: 66.7%67Linux compatibility tests: passing🐧

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)
getgrnam line coverage: 75.0%75Linux compatibility tests: passing🐧

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)
getpwnam line coverage: 75.0%75Linux compatibility tests: passing🐧

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)
getpwuid line coverage: 66.7%67Linux compatibility tests: passing🐧

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.