[BACK]Return to kern_auth.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / kern

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/kern/kern_auth.c between version 1.60 and 1.61

version 1.60, 2008/04/28 20:24:02 version 1.61, 2008/08/15 01:31:02
Line 434  kauth_cred_setgroups(kauth_cred_t cred, 
Line 434  kauth_cred_setgroups(kauth_cred_t cred, 
         KASSERT(cred != NULL);          KASSERT(cred != NULL);
         KASSERT(cred->cr_refcnt == 1);          KASSERT(cred->cr_refcnt == 1);
   
         if (len > sizeof(cred->cr_groups) / sizeof(cred->cr_groups[0]))          if (len > __arraycount(cred->cr_groups))
                 return EINVAL;                  return EINVAL;
   
         if (len) {          if (len) {
Line 663  kauth_cred_toucred(kauth_cred_t cred, st
Line 663  kauth_cred_toucred(kauth_cred_t cred, st
         uc->cr_ref = cred->cr_refcnt;          uc->cr_ref = cred->cr_refcnt;
         uc->cr_uid = cred->cr_euid;          uc->cr_uid = cred->cr_euid;
         uc->cr_gid = cred->cr_egid;          uc->cr_gid = cred->cr_egid;
         uc->cr_ngroups = min(cred->cr_ngroups,          uc->cr_ngroups = min(cred->cr_ngroups, __arraycount(uc->cr_groups));
                              sizeof(uc->cr_groups) / sizeof(uc->cr_groups[0]));  
         memcpy(uc->cr_groups, cred->cr_groups,          memcpy(uc->cr_groups, cred->cr_groups,
                uc->cr_ngroups * sizeof(uc->cr_groups[0]));                 uc->cr_ngroups * sizeof(uc->cr_groups[0]));
 }  }

Legend:
Removed from v.1.60  
changed lines
  Added in v.1.61

CVSweb <webmaster@jp.NetBSD.org>