Subject: Re: chown, quotas and security
To: Michael Graff <explorer@vorpal.com>
From: I can teach you how to fish... <greywolf@autodesk.com>
List: current-users
Date: 11/07/1994 10:16:21
"cp" is not necessarily "smart" in this regard; in fact, the opposite is
true: the smarts comes from the fact that it looks at the mode at all,
and it doesn't appear to exactly preserve the mode (except for maybe the
execute bit) -- note that the umask(2) has a distinct effect on what
"cp" does.
#define AUTHOR "explorer@vorpal.com ("Michael Graff")"
/*
*
* >For most sites this is a bad thing to do...
* >
* >% cp /bin/sh /tmp/igetroot
* >% chmod u+s /tmp/igetroot
* >% /usr/sbin/chown root /tmp/igetroot
* >% /tmp/igetroot
*
* Unless chown would do something smart, like strip off setuid bits, like cp
* does:
*
* % ls -l /bin/ps
* -r-xr-sr-x 1 bin kmem 143360 Oct 23 03:40 /bin/ps
* % cp /bin/ps myps
* % ls -l myps
* -r-xr-x--- 1 explorer explorer 143360 Nov 7 00:47 myps
*
*
* --Michael
*
* --
* Michael Graff <explorer@vorpal.com> NetBSD is the way to go!
* PGP key on a key-server near you! Rayshade the world!
*
*
*
*
*
*/
#undef AUTHOR /* "explorer@vorpal.com ("Michael Graff")" */
--
_______Wizardry is dead._____ _____WHO: Greywolf (my nameplate even says so)
/ ___\ _ \ __\ V / \ / /__ \| | __/WHAT: UNIX System Mangler...er, Admin
\ \| | < _| ` ' \ '` / \/ /|_| _/ WHERE: Autodesk, Inc. 3 Harbor Dr.
\___|_|\_\__\|_| \/\/ \__/___/_| Sausalito, CA 94965 (415) 332-2344 x4219
see also: gandalf@netcom.com