From owner-cvs-sys Sun Jul 13 09:27:42 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id JAA26257 for cvs-sys-outgoing; Sun, 13 Jul 1997 09:27:42 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id JAA26222; Sun, 13 Jul 1997 09:27:20 -0700 (PDT) From: Bruce Evans Received: (from bde@localhost) by freefall.freebsd.org (8.8.6/8.8.5) id JAA26019; Sun, 13 Jul 1997 09:26:42 -0700 (PDT) Date: Sun, 13 Jul 1997 09:26:42 -0700 (PDT) Message-Id: <199707131626.JAA26019@freefall.freebsd.org> To: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-sys@FreeBSD.ORG Subject: cvs commit: src/sys/ufs/ufs ufs_vnops.c Sender: owner-cvs-sys@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk bde 1997/07/13 09:26:42 PDT Modified files: sys/ufs/ufs ufs_vnops.c Log: Always mark st_ctime for update upon successful completion of chown(). Previously, it wasn't marked for null chown()'s. We permit null chown()s as a special case of "appropriate privilege" - everyone has enough priviilege to not change ids (this is a better argument than the one I gave for rev.1.13, that null changes aren't really changes). However, POSIX.1 requires the update independently of whether anything has changed. Clear both the setuid and the setgid bits upon successful completion of non-null chown()s by non-root. Previously, the setuid bit was only changed for non-null changes of the uid, etc. POSIX.1 requires clearing both unless the call was made by a process with "appropriate privilege", in which case altering the bits is implementation-defined. We define appropriate privilege as `process is root, or the change is null', and the implementation-defined behaviour as not altering the bits. There is no interpretation that permits clearing only one of the bits. Reviewed by: jdp Revision Changes Path 1.52 +4 -7 src/sys/ufs/ufs/ufs_vnops.c