diff options
author | Ben Collins-Sussman <sussman@apache.org> | 2001-07-26 21:49:32 +0000 |
---|---|---|
committer | Ben Collins-Sussman <sussman@apache.org> | 2001-07-26 21:49:32 +0000 |
commit | cc044638a4b04c2a3709c59aef21640c6208f967 (patch) | |
tree | 6c409834b16ab6198aebf8ea77ec0ebaaa0c327b /user | |
parent | 276c4061c53f7c40e8ed60beed604abe18a308fd (diff) | |
download | apr-cc044638a4b04c2a3709c59aef21640c6208f967.tar.gz |
* apr_user.h (apr_current_userid): new declaration.
* userinfo.c (apr_current_userid): implement Unix version.
Somebody want to write a Win32 equivalent?
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@62037 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'user')
-rw-r--r-- | user/unix/userinfo.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/user/unix/userinfo.c b/user/unix/userinfo.c index 4dade21a0..27445e4ee 100644 --- a/user/unix/userinfo.c +++ b/user/unix/userinfo.c @@ -111,6 +111,21 @@ APR_DECLARE(apr_status_t) apr_get_home_directory(char **dirname, return APR_SUCCESS; } + + +APR_DECLARE(apr_status_t) apr_current_userid(apr_uid_t *uid, + apr_gid_t *gid, + apr_pool_t *p) +{ + *uid = getuid(); + *gid = getgid(); + + return APR_SUCCESS; +} + + + + APR_DECLARE(apr_status_t) apr_get_userid(apr_uid_t *uid, apr_gid_t *gid, const char *username, apr_pool_t *p) { |