Whamcloud - gitweb
Revert "LU-4924 llite: Only kill SGID/SUID bits" 51/10151/2
authorOleg Drokin <oleg.drokin@intel.com>
Tue, 29 Apr 2014 17:57:19 +0000 (17:57 +0000)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 29 Apr 2014 17:57:30 +0000 (17:57 +0000)
Did not notice that this introduces 100% failure all in itself.

This reverts commit 70c37954649fbc4fc2d0820d5d422f96144071f9.

Change-Id: If27762e2ffa9afc3857446a733ee3a8751fe6292
Reviewed-on: http://review.whamcloud.com/10151
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Tested-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/llite/llite_lib.c
lustre/tests/acl/4924.test [deleted file]
lustre/tests/sanity.sh

index 8cf1e31..40961da 100644 (file)
@@ -1787,14 +1787,12 @@ int ll_setattr(struct dentry *de, struct iattr *attr)
              !(attr->ia_mode & S_ISGID))))
                attr->ia_valid |= ATTR_FORCE;
 
-       if ((attr->ia_valid & ATTR_MODE) &&
-           (mode & S_ISUID) &&
+       if ((mode & S_ISUID) &&
            !(attr->ia_mode & S_ISUID) &&
            !(attr->ia_valid & ATTR_KILL_SUID))
                attr->ia_valid |= ATTR_KILL_SUID;
 
-       if ((attr->ia_valid & ATTR_MODE) &&
-           ((mode & (S_ISGID|S_IXGRP)) == (S_ISGID|S_IXGRP)) &&
+       if (((mode & (S_ISGID|S_IXGRP)) == (S_ISGID|S_IXGRP)) &&
            !(attr->ia_mode & S_ISGID) &&
            !(attr->ia_valid & ATTR_KILL_SGID))
                attr->ia_valid |= ATTR_KILL_SGID;
diff --git a/lustre/tests/acl/4924.test b/lustre/tests/acl/4924.test
deleted file mode 100644 (file)
index 9b8a0c2..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-LU-4924 - chmod g+s, touch should not clear sgid bit
-
-       $ mkdir 4924
-       $ cd 4924
-       $ touch f
-       $ chmod u=rwx,g=rwxs f
-       $ ls -l f | awk -- '{ print $1, $3, $4 }'
-       > -rwxrwsr-- root root
-       $ touch f
-       $ ls -l f | awk -- '{ print $1, $3, $4 }'
-       > -rwxrwsr-- root root
-       $ cd ..
-       $ rm -rf 4924
index 42d8eff..57fbe1a 100644 (file)
@@ -6699,8 +6699,6 @@ test_103 () {
                run_acl_subtest 2561_zfs || error "LU-2561 zfs test failed"
        fi
 
-       run_acl_subtest 4924 || error "LU-4924 test failed"
-
        cd $SAVE_PWD
        umask $SAVE_UMASK