diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-05-14 13:50:43 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-05-14 13:50:43 -0400 |
commit | e12af2adb0919d0de6d6ba44462d9255f63fca5b (patch) | |
tree | 816b20d4a52ca5a891eabbfb9c71f6b9585a5f1b /src/common/compat.h | |
parent | 747f368c6d72cc6a68bb0a12c4209c534517b656 (diff) | |
download | tor-e12af2adb0919d0de6d6ba44462d9255f63fca5b.tar.gz tor-e12af2adb0919d0de6d6ba44462d9255f63fca5b.zip |
Add a pair of wrapper functions: tor_getpwnam() and tor_getpwuid()
We'll use these to deal with being unable to access the user DB
after we install the sandbox, to fix bug 11946.
Diffstat (limited to 'src/common/compat.h')
-rw-r--r-- | src/common/compat.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/common/compat.h b/src/common/compat.h index 314b1aa001..683c4d0897 100644 --- a/src/common/compat.h +++ b/src/common/compat.h @@ -633,6 +633,11 @@ int switch_id(const char *user); char *get_user_homedir(const char *username); #endif +#ifndef _WIN32 +const struct passwd *tor_getpwnam(const char *username); +const struct passwd *tor_getpwuid(uid_t uid); +#endif + int get_parent_directory(char *fname); char *make_path_absolute(char *fname); |