openbsd-20030417
authorJim Rees <rees@umich.edu>
Thu, 17 Apr 2003 23:14:30 +0000 (23:14 +0000)
committerJim Rees <rees@umich.edu>
Thu, 17 Apr 2003 23:14:30 +0000 (23:14 +0000)
use the correct group list entries (1,2) for pag (duh)

src/afs/OBSD/osi_groups.c

index 0ab2fe2..73aef9d 100644 (file)
@@ -85,7 +85,7 @@ setpag(struct proc *proc, struct ucred **cred, afs_uint32 pagvalue,
 
     AFS_STATCNT(setpag);
     ngroups = afs_getgroups(*cred, NGROUPS, gidset);
-    if (afs_get_pag_from_groups(gidset[0], gidset[1]) == NOPAG) {
+    if (afs_get_pag_from_groups(gidset[1], gidset[2]) == NOPAG) {
        /* We will have to shift grouplist to make room for pag */
        if (ngroups + 2 > NGROUPS) {
            return (E2BIG);
@@ -96,7 +96,7 @@ setpag(struct proc *proc, struct ucred **cred, afs_uint32 pagvalue,
        ngroups += 2;
     }
     *newpag = (pagvalue == -1 ? genpag(): pagvalue);
-    afs_get_groups_from_pag(*newpag, &gidset[0], &gidset[1]);
+    afs_get_groups_from_pag(*newpag, &gidset[1], &gidset[2]);
     code = afs_setgroups(proc, cred, ngroups, gidset, change_parent);
     return code;
 }