Subject: Re: chown, quotas and security
To: I can teach you how to fish... <greywolf@autodesk.com>
From: Greg A. Woods <woods@kuma.web.net>
List: current-users
Date: 11/07/1994 13:40:36
[ On Mon, November  7, 1994 at 10:29:34 (-0800), I can teach you how to fish... wrote: ]
> Subject: Re: chown, quotas and security
>
> If you enable chown(2) for normal users in the kernel, you will find that
> the set?id bits will be stripped.  The reason your experiment is not valid
> is because chown(8) was made setuid.  If you fool chown into thinking
> you're root, expect it to behave accordingly.

Well, then it (or its documentation) is broken.  I didn't fool chown(2)
by making chown(8) setuid.  Chown(2) should be checking the real uid,
not effective.

In fact, the documentation completely misses a whole raft of "features"
in chown(2), and implies that it simply returns EPERM if "the effective
user ID is not the super-user."

-- 
						Greg A. Woods

+1 416 443-1734			VE3TCP		robohack!woods
Planix, Inc. <woods@planix.com>; UniForum Canada <woods@uniforum.ca>