Re: Odd filesystem permission handling

Wakko Warner (wakko@animx.eu.org)
Sat, 19 Jun 1999 09:42:41 -0400


> > >> This must be stopped:
> > >>
> > >> ln /etc/passwd ~/passwd
> > >> chown user.group ~/passwd
> > >
> > > doesn't work:
> >
> > Yes, because Linux prevents operation 2.
> >
> > It would be more logical (but less traditional)
> > to prevent operation 1 instead.
>
> Don't *wham* keep *WHAM* homedirs *WHAM* on root fs *WHAM* *WHAM* *WHAM*
> That's it. And don't let users create anything on critical filesystems.
> Otherwise you are in for much more straightforward fsckups.

I would agree, except that some people either don't have the space for
splitting up, or have too much space and cant figure out where to put it w/o
waisting a lot of space. Someone I know has a 4gb drive and just made one
big partition. He got tired of having to repartition becuase /usr or /home
got full. I did the same on my laptop since I wanted to put a cdimage on it
for transport (Before I got a burner). I didn't want to split it up so I
have enough for /, enough for /usr and enough for /home. Another machine I
have, I didn't have the space for it, only 270mb drive (not used much <g>)
Another machine I have has / and /home the same partition for the same
reason, but /usr is seperate. On my primary machine and on my sparc, / /usr
/home and /usr/src (I don't back that one up since it's only the kernel) are
seperate.

I think the point of the above disabling ln for non-owners/non-root would be
the simple fact that the 'sendmail hole of the week' (I don't know if it
happens now or not, I haven't used sendmail in years) could be exploited
when new holes came out when a user did 'ln /usr/lib/sendmail /tmp/.test'

Maybe it would be ok to allow ln except check for non-root/non-owner status
with setuid/setgid bit set. This imo would be worse. (as the case above)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/