apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: apr/user/win32 groupinfo.c userinfo.c
Date Wed, 06 Jun 2001 20:04:47 GMT
wrowe       01/06/06 13:04:46

  Modified:    user/win32 groupinfo.c userinfo.c
  Log:
    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.
  
  Revision  Changes    Path
  1.5       +4 -4      apr/user/win32/groupinfo.c
  
  Index: groupinfo.c
  ===================================================================
  RCS file: /home/cvs/apr/user/win32/groupinfo.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- groupinfo.c	2001/02/25 20:39:41	1.4
  +++ groupinfo.c	2001/06/06 20:04:42	1.5
  @@ -66,12 +66,12 @@
       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_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;
  
  
  
  1.8       +5 -5      apr/user/win32/userinfo.c
  
  Index: userinfo.c
  ===================================================================
  RCS file: /home/cvs/apr/user/win32/userinfo.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- userinfo.c	2001/04/12 13:48:53	1.7
  +++ userinfo.c	2001/06/06 20:04:43	1.8
  @@ -109,11 +109,11 @@
       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_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;
  
  
  

Mime
View raw message