2004-12-11 02:25:46

by Kenneth Sumrall

[permalink] [raw]
Subject: NFSD SGID permission problem

Index: linux/fs/nfsd/vfs.c
===================================================================
RCS file: /cvsdev/mvl-kernel/linux/fs/nfsd/vfs.c,v
retrieving revision 1.3
diff -u -r1.3 vfs.c
--- linux/fs/nfsd/vfs.c 17 Dec 2002 18:21:16 -0000 1.3
+++ linux/fs/nfsd/vfs.c 11 Dec 2004 01:56:26 -0000
@@ -277,18 +277,6 @@
imode = iap->ia_mode |= (imode & ~S_IALLUGO);
}

- /* Revoke setuid/setgid bit on chown/chgrp */
- if ((iap->ia_valid & ATTR_UID) && (imode & S_ISUID)
- && iap->ia_uid != inode->i_uid) {
- iap->ia_valid |= ATTR_MODE;
- iap->ia_mode = imode &= ~S_ISUID;
- }
- if ((iap->ia_valid & ATTR_GID) && (imode & S_ISGID)
- && iap->ia_gid != inode->i_gid) {
- iap->ia_valid |= ATTR_MODE;
- iap->ia_mode = imode &= ~S_ISGID;
- }
-
/* Change the attributes. */



Attachments:
nfsd.chown.patch (783.00 B)