Description of problem: chown() should clear setuid, and if not group executable must clear setgid as well. glusterfs does not do so. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. chmod +s file 2. chown newuser file 3. ls -l file Actual results: setuid bit is still there Expected results: setuid bit should not be there Additional info:
REVIEW: http://review.gluster.org/6436 (posix-acl: clear SUID and SGID bits on chown() by non-root) posted (#1) for review on master by Anand Avati (avati)
Steps to Reproduce: 1. chmod +s dir 2. chown newuser dir 3. ls -ld dir
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions
REVIEW: https://review.gluster.org/6436 (posix-acl: clear SUID and SGID bits on chown() by non-root) posted (#2) for review on master by Raghavendra G (rgowdapp)
The posted patch would need a rebase to handle clang-format changes etc.
REVIEW: https://review.gluster.org/6436 (posix-acl: clear SUID and SGID bits on chown() by non-root) posted (#3) for review on master by Varsha Rao
This bug is already fixed and patch is no longer required. With or without the patch setuid bit is cleared by chown. The test case introduced by the patch for this bug is successful without the patch too.