Tor
0.4.7.0-alpha-dev
|
#include "orconfig.h"
#include <sys/types.h>
Go to the source code of this file.
Functions | |
const struct passwd * | tor_getpwnam (const char *username) |
const struct passwd * | tor_getpwuid (uid_t uid) |
char * | get_user_homedir (const char *username) |
char* get_user_homedir | ( | const char * | username | ) |
const struct passwd* tor_getpwnam | ( | const char * | username | ) |
Wrapper around getpwnam() that caches result. Used so that we don't need to give the sandbox access to /etc/passwd.
The following fields alone will definitely be copied in the output: pw_uid, pw_gid, pw_name, pw_dir. Other fields are not present in cached values.
When called with a NULL argument, this function clears storage associated with static variables it uses.
Definition at line 70 of file userdb.c.
Referenced by get_user_homedir().
const struct passwd* tor_getpwuid | ( | uid_t | uid | ) |
Wrapper around getpwnam() that can use cached result from tor_getpwnam(). Used so that we don't need to give the sandbox access to /etc/passwd.
The following fields alone will definitely be copied in the output: pw_uid, pw_gid, pw_name, pw_dir. Other fields are not present in cached values.