Re: Strangeness in 2.1.31

John Gotts (jgotts@umich.edu)
Thu, 03 Apr 1997 05:16:20 -0500


In message <199704030921.EAA00453@linux.reshall.umich.edu>, John Gotts writes:

>What's going on here?

>linux(test)% ls -la
>total 2
>drwxrwxr-x 2 root src 1024 Apr 3 04:17 ./
>drwxr-xr-x 6 jgotts users 1024 Apr 3 04:17 ../
>linux(test)% touch foo
>touch: foo: Permission denied
>linux(test)% groups
>users src floppy dos vibe
>linux(test)%

With Andi Kleen's help, here's a patch (which, like my APM patch, backs out of
a change in 2.1.31):

diff -u --recursive --new-file v2.1.30/linux/kernel/sys.c linux/kernel/sys.c
--- v2.1.30/linux/kernel/sys.c Thu Mar 27 14:40:12 1997
+++ linux/kernel/sys.c Mon Mar 31 12:52:31 1997
@@ -893,13 +893,14 @@
gid_t *groups = current->groups;
do {
if (*groups == grp)
- break;
+ goto out;
groups++;
i--;
} while (i);
}
return 0;
}
+out:
return 1;
}

--
John GOTTS <jgotts@engin.umich.edu> http://www-personal.engin.umich.edu/~jgotts
Senior, EE/Motif Programmer/SysAdmin/Linux Hacker/Amateur Radio Callsign N8QDW