summaryrefslogtreecommitdiff
path: root/user
diff options
context:
space:
mode:
authorwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2001-06-06 20:04:43 +0000
committerwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2001-06-06 20:04:43 +0000
commitbe7851e7c8f54270ac5c683be4dd65533443c078 (patch)
treefc34fcdc4d14c28e449b71f324a1130627f27cb6 /user
parente12055ffc7fd52117a28d58b93675f034307be49 (diff)
downloadlibapr-be7851e7c8f54270ac5c683be4dd65533443c078.tar.gz
Whoops, APR_BADARG is bogus [my doing.] Still return APR_EINVAL since
we don't know where the id came from, and if it's safe to pass to the kernel. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@61722 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'user')
-rw-r--r--user/win32/groupinfo.c8
-rw-r--r--user/win32/userinfo.c10
2 files changed, 9 insertions, 9 deletions
diff --git a/user/win32/groupinfo.c b/user/win32/groupinfo.c
index b66853e15..6b8b74cff 100644
--- a/user/win32/groupinfo.c
+++ b/user/win32/groupinfo.c
@@ -66,12 +66,12 @@ APR_DECLARE(apr_status_t) apr_get_groupname(char **groupname, apr_gid_t groupid,
char name[MAX_PATH], domain[MAX_PATH];
DWORD cbname = sizeof(name), cbdomain = sizeof(domain);
if (!groupid)
- return APR_BADARG;
+ return APR_EINVAL;
if (!LookupAccountSid(NULL, groupid, name, &cbname, domain, &cbdomain, &type))
return apr_get_os_error();
if (type != SidTypeGroup && type != SidTypeWellKnownGroup
&& type != SidTypeAlias)
- return APR_BADARG;
+ return APR_EINVAL;
*groupname = apr_pstrdup(p, name);
return APR_SUCCESS;
}
@@ -79,9 +79,9 @@ APR_DECLARE(apr_status_t) apr_get_groupname(char **groupname, apr_gid_t groupid,
APR_DECLARE(apr_status_t) apr_compare_groups(apr_gid_t left, apr_gid_t right)
{
if (!left || !right)
- return APR_BADARG;
+ return APR_EINVAL;
if (!IsValidSid(left) || !IsValidSid(right))
- return APR_BADARG;
+ return APR_EINVAL;
if (!EqualSid(left, right))
return APR_EMISMATCH;
return APR_SUCCESS;
diff --git a/user/win32/userinfo.c b/user/win32/userinfo.c
index f07154e06..3c160728e 100644
--- a/user/win32/userinfo.c
+++ b/user/win32/userinfo.c
@@ -109,11 +109,11 @@ APR_DECLARE(apr_status_t) apr_get_username(char **username, apr_uid_t userid, ap
char name[MAX_PATH], domain[MAX_PATH];
DWORD cbname = sizeof(name), cbdomain = sizeof(domain);
if (!userid)
- return APR_BADARG;
+ return APR_EINVAL;
if (!LookupAccountSid(NULL, userid, name, &cbname, domain, &cbdomain, &type))
return apr_get_os_error();
- if (type != SidTypeUser && type != SidTypeAlias)
- return APR_BADARG;
+ if (type != SidTypeUser && type != SidTypeAlias && type != SidTypeWellKnownGroup)
+ return APR_EINVAL;
*username = apr_pstrdup(p, name);
return APR_SUCCESS;
}
@@ -121,9 +121,9 @@ APR_DECLARE(apr_status_t) apr_get_username(char **username, apr_uid_t userid, ap
APR_DECLARE(apr_status_t) apr_compare_users(apr_uid_t left, apr_uid_t right)
{
if (!left || !right)
- return APR_BADARG;
+ return APR_EINVAL;
if (!IsValidSid(left) || !IsValidSid(right))
- return APR_BADARG;
+ return APR_EINVAL;
if (!EqualSid(left, right))
return APR_EMISMATCH;
return APR_SUCCESS;