drop printfs
[unix-history] / usr / src / sys / kern / kern_prot.c
index d6972e0..55c69d2 100644 (file)
@@ -1,4 +1,4 @@
-/*     kern_prot.c     5.4     82/08/24        */
+/*     kern_prot.c     5.7     82/09/12        */
 
 /*
  * System calls related to processes and protection
 
 /*
  * System calls related to processes and protection
@@ -11,7 +11,6 @@
 #include "../h/reg.h"
 #include "../h/inode.h"
 #include "../h/proc.h"
 #include "../h/reg.h"
 #include "../h/inode.h"
 #include "../h/proc.h"
-#include "../h/clock.h"
 #include "../h/mtpr.h"
 #include "../h/timeb.h"
 #include "../h/times.h"
 #include "../h/mtpr.h"
 #include "../h/timeb.h"
 #include "../h/times.h"
@@ -154,7 +153,7 @@ setgroups()
        } *uap = (struct a *)u.u_ap;
        register int *gp;
 
        } *uap = (struct a *)u.u_ap;
        register int *gp;
 
-       if (suser())
+       if (!suser())
                return;
        if (uap->gidsetsize > sizeof (u.u_groups) / sizeof (u.u_groups[0])) {
                u.u_error = EINVAL;
                return;
        if (uap->gidsetsize > sizeof (u.u_groups) / sizeof (u.u_groups[0])) {
                u.u_error = EINVAL;
@@ -216,7 +215,7 @@ leavegroup(gid)
 found:
        for (; gp < &u.u_groups[NGROUPS-1]; gp++)
                *gp = *(gp+1);
 found:
        for (; gp < &u.u_groups[NGROUPS-1]; gp++)
                *gp = *(gp+1);
-       *gp = 0;
+       *gp = -1;
 }
 
 entergroup(gid)
 }
 
 entergroup(gid)