Subject: Re: single user mode file comparisons
To: NetBSD-current Discussion List <current-users@netbsd.org>
From: Greywolf <greywolf@starwolf.com>
List: current-users
Date: 06/08/2003 17:26:42
Thus spake Greg A. Woods ("GAW> ") sometime Today...

GAW> As I understand it "chgrp" is only kept separately defined and has not
GAW> been deprecated in POSIX-1003.1 so that it can be put in a directory
GAW> that is by default in the user's path while "chown" can be put off out
GAW> of harm's way in a "system" directory (/sbin or /usr/sbin) on those
GAW> systems where non-privileged users are not allowed to change user
GAW> ownership but rather only group ownership.

This implies that if one were to allow mortal chown via some definition in
the kernel, chown would be installed in /usr/bin?  This makes no sense.

You might argue it moot, but as I understand it, the only reason that
chown is not allowed by a mortal user to give files away is under the
conditions that quota operates.  Since the set[ug]id bits are cleared
upon donation, I see no reason not to allow the owner of a file to give
away a file (but I'm sure I'm missing something).  I remember going into
the code surrounding the "if (suser()) {" and its closing brace, and
surrounding both with "#ifdef QUOTA" back in the day simply because
there was no pressing need to keep ownership of a file restricted.

Granted that cp'ing the file somewhere else by the receiving user is
probably a better idea, but we had a mixed environment in which we were
actually running SVR[023], and chown(2) was not restricted to the super-
user on those machines so long as it was exercised by the owner of a
file.

Comments are requested as to why, in this particular scenario, I am off
my nut.

				--*greywolf;
--
NetBSD: The free OS with a money back guarantee!