Skip to contentSkip to conversation

generic/375: clarify flipping the write bit

PATCH In review Matthew Broomfield 2 participants 3 messages Aug 1, 2024 – Sep 16, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 generic/375: clarify flipping the write bit

When checking if SGID is cleared upon chmod / setfacl the write bit is flipped just to make sure permission changes are happening. This is orthogonal to testing SGID.

Added this information to the test description.

---
 tests/generic/375 | 3 +++
 1 file changed, 3 insertions(+)
tests/generic/375 +3 -0
index eb675144..44670350 100755
@@ -7,6 +7,9 @@
 # Check if SGID is cleared upon chmod / setfacl when the owner is not in the
 # owning group.
 #
+# The test flips the write bit to easily observe that chmod / setfacl are
+# successful. This is unrelated to testing SGID.
+#
 . ./common/preamble
 _begin_fstest auto quick acl perms
 
Signature · 1 line
2.46.0.rc2.264.g509ed76dc8-goog
#1 lore raw
Quoted 27 lines · Matthew Broomfield

When checking if SGID is cleared upon chmod / setfacl the write bit is flipped just to make sure permission changes are happening. This is orthogonal to testing SGID.

Added this information to the test description.

---
 tests/generic/375 | 3 +++
 1 file changed, 3 insertions(+)
tests/generic/375 +3 -1
index eb675144..44670350 100755
@@ -7,6 +7,9 @@
 # Check if SGID is cleared upon chmod / setfacl when the owner is not in the
 # owning group.
 #
+# The test flips the write bit to easily observe that chmod / setfacl are
+# successful. This is unrelated to testing SGID.
+#
 . ./common/preamble
 _begin_fstest auto quick acl perms
 
--
Quoted 2 lines

2.46.0.rc2.264.g509ed76dc8-goog

Hello, can someone review if the comment in this patch is accurate? Thanks in advance for your time.

#2 lore raw
Quoted 28 lines · Matthew Broomfield
Quoted 26 lines · Matthew Broomfield

When checking if SGID is cleared upon chmod / setfacl the write bit is flipped just to make sure permission changes are happening. This is orthogonal to testing SGID.

Added this information to the test description.

---
 tests/generic/375 | 3 +++
 1 file changed, 3 insertions(+)
tests/generic/375 +3 -0
index eb675144..44670350 100755
@@ -7,6 +7,9 @@
 # Check if SGID is cleared upon chmod / setfacl when the owner is not in the
 # owning group.
 #
+# The test flips the write bit to easily observe that chmod / setfacl are
+# successful. This is unrelated to testing SGID.
+#
 . ./common/preamble
 _begin_fstest auto quick acl perms
 
Quoted 6 lines
Quoted 3 lines

--
2.46.0.rc2.264.g509ed76dc8-goog

Hello, can someone review if the comment in this patch is accurate? Thanks in advance for your time.

I don't understand this new comment -- "flipping the write bit" is what the chmod does, and that's what clears setgid.

--D