MentOS
0.8.0
The Mentoring Operating System
|
Functions | |
static void | __parse_line (passwd_t *pwd, char *buf) |
Parses the input buffer and fills pwd with its details. More... | |
static char * | __search_entry (int fd, char *buffer, int buflen, const char *name, uid_t uid) |
Searches for the given entry inside the buffer. More... | |
passwd_t * | getpwnam (const char *name) |
Provides access to the password database entry for name . More... | |
passwd_t * | getpwuid (uid_t uid) |
Provides access to the password database entry for uid . More... | |
int | getpwnam_r (const char *name, passwd_t *pwd, char *buf, size_t buflen, passwd_t **result) |
Provides the same information as getpwnam but it stores the results inside pwd, and the string information are store store inside buf . More... | |
int | getpwuid_r (uid_t uid, passwd_t *pwd, char *buf, size_t buflen, passwd_t **result) |
Provides the same information as getpwuid but it stores the results inside pwd, and the string information are store store inside buf . More... | |
|
inlinestatic |
Parses the input buffer and fills pwd with its details.
pwd | the structure we need to fill. |
buf | the buffer from which we extract the information. |
|
inlinestatic |
Searches for the given entry inside the buffer.
fd | the file descriptor of the file. |
buffer | the support buffer we use to read the file. |
buflen | the length of the support buffer. |
name | the username we are looking for. |
uid | the user-id of the user we are looking for. |
passwd_t* getpwnam | ( | const char * | name | ) |
Provides access to the password database entry for name
.
name | The name to search inside the database. |
Provides the same information as getpwnam but it stores the results inside pwd, and the string information are store store inside buf
.
name | The name to search inside the database. |
pwd | 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. |
Provides access to the password database entry for uid
.
uid | The uid to search inside the database. |
Provides the same information as getpwuid but it stores the results inside pwd, and the string information are store store inside buf
.
uid | The uid to search inside the database. |
pwd | 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. |