Re: setfsuid on ext2 weirdness (2.4)

2001-01-08 Thread Kai Henningsen
[EMAIL PROTECTED] (Linus Torvalds) wrote on 08.01.01 in <93d7fr$429$[EMAIL PROTECTED]>: > And hey, if you think the above is confusing, try making your /dev/null > a regular (writable) file by mistake. Now THAT will be confusing as > hell: things will actually work surprisingly well, but some

Re: setfsuid on ext2 weirdness (2.4)

2001-01-08 Thread Bjorn Wesen
On Mon, 8 Jan 2001, Linus Torvalds wrote: > Please show them, anyway. What does "ls -ld / /etc /etc/passwd" say? Heh... /etc and /etc/passwd were allright... but / was fscked (or not, maybe :) drwx- 500 0 both locked from other users and 500 as owner.. > 99% says that one of the

Re: setfsuid on ext2 weirdness (2.4)

2001-01-08 Thread Linus Torvalds
In article <[EMAIL PROTECTED]>, Bjorn Wesen <[EMAIL PROTECTED]> wrote: > >in fact, 0 and 500 are the ONLY ones who let a filesystem op through after >the setfsuid call. all other cause an EACCESS error on the open (or any >other fs op). and yes, the actual filepermissions on /etc and /etc/passwd

Re: setfsuid on ext2 weirdness (2.4)

2001-01-08 Thread Alan Cox
> Ok.. I'm going bananas. It could be a 4am braindeath or a rh7.0 bungholio > but this is annoying: There are lots of corner cases in the kernel that are probably a bit off > main(int argc, char **argv) > { > int fd; > setfsuid(atoi(argv[1])); > fd = open("/etc/passwd",

Re: setfsuid on ext2 weirdness (2.4)

2001-01-08 Thread Alan Cox
Ok.. I'm going bananas. It could be a 4am braindeath or a rh7.0 bungholio but this is annoying: There are lots of corner cases in the kernel that are probably a bit off main(int argc, char **argv) { int fd; setfsuid(atoi(argv[1])); fd = open("/etc/passwd", O_RDONLY);

Re: setfsuid on ext2 weirdness (2.4)

2001-01-08 Thread Linus Torvalds
In article [EMAIL PROTECTED], Bjorn Wesen [EMAIL PROTECTED] wrote: in fact, 0 and 500 are the ONLY ones who let a filesystem op through after the setfsuid call. all other cause an EACCESS error on the open (or any other fs op). and yes, the actual filepermissions on /etc and /etc/passwd are

Re: setfsuid on ext2 weirdness (2.4)

2001-01-08 Thread Bjorn Wesen
On Mon, 8 Jan 2001, Linus Torvalds wrote: Please show them, anyway. What does "ls -ld / /etc /etc/passwd" say? Heh... /etc and /etc/passwd were allright... but / was fscked (or not, maybe :) drwx- 500 0 both locked from other users and 500 as owner.. 99% says that one of the

setfsuid on ext2 weirdness (2.4)

2001-01-07 Thread Bjorn Wesen
Ok.. I'm going bananas. It could be a 4am braindeath or a rh7.0 bungholio but this is annoying: main(int argc, char **argv) { int fd; setfsuid(atoi(argv[1])); fd = open("/etc/passwd", O_RDONLY); printf("got fd %d\n", fd); } [root@wizball /root]# ./setfstest 0

setfsuid on ext2 weirdness (2.4)

2001-01-07 Thread Bjorn Wesen
Ok.. I'm going bananas. It could be a 4am braindeath or a rh7.0 bungholio but this is annoying: main(int argc, char **argv) { int fd; setfsuid(atoi(argv[1])); fd = open("/etc/passwd", O_RDONLY); printf("got fd %d\n", fd); } [root@wizball /root]# ./setfstest 0