Messages in this thread | | | Date | Mon, 11 Jan 1999 21:10:44 +0100 (MET) | From | (Guest section DW) | Subject | Re: odd chown difference between 2.0 and 2.1pre kernels |
| |
From: "Brandon S. Allbery KF8NH" <allbery@kf8nh.apk.net>
In message <19990109215152.C32046@kitenet.net>, Joey Hess writes: +----- | On a 2.1pre4 machine: | root@kite:~>ls -l foo | -rwsrw-r-- 1 root joey 0 Jan 9 17:13 foo* | root@kite:~> chown root.root foo; ls -l foo | -rwsrw-r-- 1 root root 0 Jan 9 17:13 foo* +--->8
GAK!!! Security flaw here, methinks. chown should unconditionally clear setuid and setgid.
Well, there is the system call and the utility.
About the system call: POSIX.1 (5.6.5.2) paraphrased: suid and sgid bits shall be cleared unless the chown was invoked by root, in which case it is implementation dependent whether these bits are cleared or not.
(Single Unix Spec says the same.)
About the utility: it should do what the call does.
So, yes you may be right about the security. Both behaviours are allowed by the standards.
-- brandon s. allbery [os/2][linux][solaris][japh] allbery@kf8nh.apk.net
We are Linux. Resistance is an indication that you missed the point.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |