UNIX file setuid sucurity hole?

kdavies at dalcsug.UUCP kdavies at dalcsug.UUCP
Mon Mar 16 02:37:58 AEST 1987


In article <1772 at hi.uucp> josh at hi.UUCP (Josh Siegel) writes:
>
>I cannot be sure but don't you have to be root to use chown?
>

Under Xenix 5, I believe BSD does as well, chown can be
executed by anyone, BUT, when they do a chown on a file,
any setuid permissions on the file are cleared when it
puts in the new owner. Then only the NEW owner can
set the setuid again.

Not sure what happens if there is a setgid, and the original owner
and the new owner are of different groups. I would suspect that it
would clear the setgid bits (but we can't _assume_ around here :-)

---------------------------------------------------------------
Kevin Davies	 ...{seismo|watmath|utai|garfield} !dalcs!dalcsug!kdavies

Kirk :  "Spock, I do wish you'd stop using those colourful metaphors"
Spock:  "The _hell_ I will, Captain"
---------------------------------------------------------------



More information about the Comp.unix.questions mailing list