libcfe  0.12.1
some useful C-functions
uname_gname.h File Reference
#include <pwd.h>
Include dependency graph for uname_gname.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

char * get_uname (uid_t uid)
 
char * get_gname (gid_t gid)
 

Function Documentation

◆ get_gname()

char* get_gname ( gid_t  gid)

Search for the corresponding group name with a given group id.

Parameters
[in]gidThe numeric group id.
Returns
Pointer to a newly allocated string, containing the group name (this should be freed with free()).

Definition at line 37 of file uname_gname.c.

◆ get_uname()

char* get_uname ( uid_t  uid)

Search for the corresponding user name with a given user id.

Parameters
[in]uidThe numeric user id.
Returns
Pointer to a newly allocated string, containing the user name (this should be freed with free()).

Definition at line 16 of file uname_gname.c.