Re: [Security-Discuss] Xine accessing /etc/passwd ????

Vincent Danen <vdanen-4qZELD6FgxhWk0Htik3J/[email protected]> Sun, 21 May 2006 21:24:39 -0600
Newsgroups gmane.linux.mandrake.security.general
Organization Mandriva
Message-ID <[email protected]>
* Tuxiq <tuxiq2304-FFYn/[email protected]> [2006-05-21 19:28:27 -0400]:

> > No idea about xine, but if there is a root:root owned file in your
> > homedir which is owned user:user, user will *always* be able to delete
> > it, regardless of permissions because it has rwx access to the
> > directory:
> >
> > vdanen@odin:~/ >% sudo su
> > Password:
> > odin:/Users/vdanen root# touch rootme
> > odin:/Users/vdanen root# ls -l rootme
> > -rw-r--r--    1 root     vdanen          0 May 21 14:06 rootme
> > odin:/Users/vdanen root# chown root:admin rootme
> > odin:/Users/vdanen root# chmod 600 rootme
> > odin:/Users/vdanen root# ls -l rootme
> > -rw-------    1 root     admin           0 May 21 14:06 rootme
> > odin:/Users/vdanen root#
> > odin:/Users/vdanen root# exit
> > exit
> > vdanen@odin:~/ >% ls -l rootme
> > -rw-------    1 root     admin           0 May 21 14:06 rootme
> > vdanen@odin:~/ >% cat rootme
> > cat: rootme: Permission denied
> > vdanen@odin:~/ >% rm rootme
> > remove rootme? y
> > vdanen@odin:~/ >% ls -l rootme
> > ls: rootme: No such file or directory
> > vdanen@odin:~/ >%
> >
> > The above is on my OS X box, but the principle is the same.
> 
> Thanks Vincent,
> 	completely forgot about access rights to the directory itself ;-)
> Allthough you have to admit it is kind of counterintuitive !!
> 
> Thanks again.

It is, but it also makes sense.  If I own my own directory and have full
read/write access to it, then I should be allowed to do whatever I want
in there.

Realistically speaking, root has no business putting files in my home
dir that he/she/it doesn't want me to do stuff with.  root has the rest
of the filesystem... leave my homedir alone... =)

-- 
"lynx -source http://linsec.ca/vdanen.asc | gpg --import"
{FEE30AD4 : 7F6C A60C 06C2 4811 FA1C  A2BC 2EBC 5E32 FEE3 0AD4}
Wasting time like it was free...
signature.asc (application/pgp-signature, 186 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (Darwin)

iD8DBQFEcS73LrxeMv7jCtQRAu2zAJ0VoqMgA+ggzLNLAuc934JRLFKQugCaAqHI
3GCNY3bQfsM5Z7e6vs8idpk=
=5J4t
-----END PGP SIGNATURE-----