git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 2/5] t/t1304: set the Default ACL base entries

From
Brandon Casey <casey@nrlssc.navy.mil>
Date
Mar 15, 2010, 17:14 UTC
Message-ID
<YowxgPZqaOkg2MZzY1CxL62AYRaulAaBTuVJyBy21GtGshrh3yFvpwnH4N2NnyXFt4HiCe6vR8E@cipher.nrlssc.navy.mil>
In-Reply-To
<YowxgPZqaOkg2MZzY1CxL1fbmUZ7CMUf5DgqI3S0X83DgqLNI9AGfI83JRNT8LWYHqXBB-PGS1Q@cipher.nrlssc.navy.mil>
From: Brandon Casey <drafnel@gmail.com>

According to the Linux setfacl man page, in order for an ACL to be valid, the following rules must be satisfied:

   * Whenever an ACL contains any Default ACL entries, the three Default
     ACL base entries (default owner, default group, and default others)
     must also exist.
   * Whenever a Default ACL contains named user entries or named group
     objects, it must also contain a default effective rights mask.

Some implementations of setfacl (Linux) do this automatically when necessary, some (Solaris) do not. Solaris's setfacl croaks when trying to create a default user ACL if the above rules are not satisfied. So, create them before modifying the default user ACL's.

Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
---
 t/t1304-default-acl.sh |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/t/t1304-default-acl.sh b/t/t1304-default-acl.sh
index 415a2dd..3a1532b 100755
--- a/t/t1304-default-acl.sh
+++ b/t/t1304-default-acl.sh
@@ -45,6 +45,7 @@ check_perms_and_acl () {
 dirs_to_set="./ .git/ .git/objects/ .git/objects/pack/"
 
 test_expect_success 'Setup test repo' '
+	setfacl -m d:u::rwx,d:g::---,d:o:---,d:m:rwx $dirs_to_set &&
 	setfacl -m u:root:rwx          $dirs_to_set &&
 	setfacl -m d:u:"$LOGNAME":rwx  $dirs_to_set &&
 	setfacl -m d:u:root:rwx        $dirs_to_set &&
-- 
1.6.6.2
Previous: Brandon CaseyNext: Brandon Casey
Message 3 of 12 in “tweak t1304 ACL tests so they work on Solaris”
  1. 0/5 tweak t1304 ACL tests so they work on SolarisBrandon Casey, Mar 15, 2010
  2. 1/5 t/t1304: avoid -d option to setfaclBrandon Casey, Mar 15, 2010
  3. 2/5 t/t1304: set the Default ACL base entriesBrandon Casey, Mar 15, 2010
  4. 3/5 t/t1304: use 'test -r' to test readability rather than looking at mode bitsBrandon Casey, Mar 15, 2010
  5. Matthieu MoyMar 15, 2010
  6. Brandon CaseyMar 15, 2010
  7. 4/5 t/t1304: set the mask ACL that is checked in check_perms_and_aclBrandon Casey, Mar 15, 2010
  8. Matthieu MoyMar 15, 2010
  9. Brandon CaseyMar 15, 2010
  10. 4/5 t/t1304: set the ACL effective rights maskBrandon Casey, Mar 15, 2010
  11. Matthieu MoyMar 15, 2010
  12. 5/5 t/t1304: make a second colon optional in the mask ACL checkBrandon Casey, Mar 15, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.