summaryrefslogtreecommitdiff
path: root/include/apr_user.h
diff options
context:
space:
mode:
authorCliff Woolley <jwoolley@apache.org>2001-02-21 18:41:29 +0000
committerCliff Woolley <jwoolley@apache.org>2001-02-21 18:41:29 +0000
commit60ea2d762ddbee601ea05cf6e444b8f518e91a55 (patch)
treef84a6fe1474ef9377f60875441697fd937427e3f /include/apr_user.h
parent0e21821dc0cae1147173fc4d8fa8de7ba4cafb4e (diff)
downloadapr-60ea2d762ddbee601ea05cf6e444b8f518e91a55.tar.gz
Added apr_get_userid() as a companion to apr_get_username().
PR: Needed to fix Apache PR7271. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@61275 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include/apr_user.h')
-rw-r--r--include/apr_user.h32
1 files changed, 22 insertions, 10 deletions
diff --git a/include/apr_user.h b/include/apr_user.h
index a4e62e640..314803de3 100644
--- a/include/apr_user.h
+++ b/include/apr_user.h
@@ -91,31 +91,42 @@ typedef gid_t apr_gid_t;
/***
* Get the user name for a specified userid
- * @param dirname Pointer to new string containing user name (on output)
+ * @param username Pointer to new string containing user name (on output)
* @param userid The userid
* @param p The pool from which to allocate the string
- * @deffunc apr_status_t apr_get_username(char **username, apr_uid_t userid, apr_pool_t *p)
* @tip This function is available only if APR_HAS_USER is defined.
+ * @deffunc apr_status_t apr_get_username(char **username, apr_uid_t userid, apr_pool_t *p)
*/
APR_DECLARE(apr_status_t) apr_get_username(char **username, apr_uid_t userid, apr_pool_t *p);
/***
+ * Get the userid (and groupid) for the specified username
+ * @param userid Returns the user id
+ * @param groupid Returns the user's group id
+ * @param username The username to lookup
+ * @tip This function is available only if APR_HAS_USER is defined.
+ * @deffunc apr_status_t apr_get_userid(apr_uid_t *userid, apr_gid_t *groupid, const char *username)
+ */
+APR_DECLARE(apr_status_t) apr_get_userid(apr_uid_t *userid, apr_gid_t *groupid, const char *username);
+
+/***
* Get the home directory for the named user
* @param dirname Pointer to new string containing directory name (on output)
- * @param userid The named user
+ * @param username The named user
* @param p The pool from which to allocate the string
- * @deffunc apr_status_t apr_get_home_directory(char **dirname, const char *userid, apr_pool_t *p)
* @tip This function is available only if APR_HAS_USER is defined.
+ * @deffunc apr_status_t apr_get_home_directory(char **dirname, const char *username, apr_pool_t *p)
*/
-APR_DECLARE(apr_status_t) apr_get_home_directory(char **dirname, const char *userid, apr_pool_t *p);
+APR_DECLARE(apr_status_t) apr_get_home_directory(char **dirname, const char *username, apr_pool_t *p);
/***
* Compare two user identifiers for equality.
* @param left One uid to test
* @param right Another uid to test
- * @deffunc apr_status_t apr_compare_users(apr_uid_t left, apr_uid_t right)
- * @tip Returns APR_SUCCESS if the apr_uid_t strutures identify the same user,
+ * @return APR_SUCCESS if the apr_uid_t strutures identify the same user,
* APR_EMISMATCH if not, APR_BADARG if an apr_uid_t is invalid.
+ * @tip This function is available only if APR_HAS_USER is defined.
+ * @deffunc apr_status_t apr_compare_users(apr_uid_t left, apr_uid_t right)
*/
#if defined(WIN32)
APR_DECLARE(apr_status_t) apr_compare_users(apr_uid_t left, apr_uid_t right);
@@ -128,8 +139,8 @@ APR_DECLARE(apr_status_t) apr_compare_users(apr_uid_t left, apr_uid_t right);
* @param dirname Pointer to new string containing group name (on output)
* @param userid The groupid
* @param p The pool from which to allocate the string
- * @deffunc apr_status_t apr_get_groupname(char **groupname, apr_gid_t userid, apr_pool_t *p);
* @tip This function is available only if APR_HAS_USER is defined.
+ * @deffunc apr_status_t apr_get_groupname(char **groupname, apr_gid_t userid, apr_pool_t *p);
*/
APR_DECLARE(apr_status_t) apr_get_groupname(char **groupname, apr_gid_t groupid, apr_pool_t *p);
@@ -137,9 +148,10 @@ APR_DECLARE(apr_status_t) apr_get_groupname(char **groupname, apr_gid_t groupid,
* Compare two group identifiers for equality.
* @param left One gid to test
* @param right Another gid to test
- * @deffunc apr_status_t apr_compare_groups(apr_gid_t left, apr_gid_t right)
- * @tip Returns APR_SUCCESS if the apr_gid_t strutures identify the same group,
+ * @return APR_SUCCESS if the apr_gid_t strutures identify the same group,
* APR_EMISMATCH if not, APR_BADARG if an apr_gid_t is invalid.
+ * @tip This function is available only if APR_HAS_USER is defined.
+ * @deffunc apr_status_t apr_compare_groups(apr_gid_t left, apr_gid_t right)
*/
#if defined(WIN32)
APR_DECLARE(apr_status_t) apr_compare_groups(apr_gid_t left, apr_gid_t right);