path: root/t/
diff options
authorMatthieu Moy <>2010-02-22 22:32:14 (GMT)
committerJunio C Hamano <>2010-02-22 23:24:46 (GMT)
commitf80c7ae8fe9c0f3ce93c96a2dccaba34e456e33a (patch)
treeb3da9439a3440f062f0aa54e01ecb3f7598f1136 /t/
parentb862b61c03797fd00490bb8caf05be840b79c6cb (diff)
Use git_mkstemp_mode and xmkstemp_mode in odb_mkstemp, not chmod later.
We used to create 0600 files, and then use chmod to set the group and other permission bits to the umask. This usually has the same effect as a normal file creation with a umask. But in the presence of ACLs, the group permission plays the role of the ACL mask: the "g" bits of newly created files are chosen according to default ACL mask of the directory, not according to the umask, and doing a chmod() on these "g" bits affect the ACL's mask instead of actual group permission. In other words, creating files with 0600 and then doing a chmod to the umask creates files which are unreadable by users allowed in the default ACL. To create the files without breaking ACLs, we let the umask do it's job at the file's creation time, and get rid of the later chmod. Signed-off-by: Matthieu Moy <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 't/')
1 files changed, 1 insertions, 1 deletions
diff --git a/t/ b/t/
index 07dd6af..8472dbb 100755
--- a/t/
+++ b/t/
@@ -59,7 +59,7 @@ test_expect_failure 'Objects creation does not break ACLs with restrictive umask
check_perms_and_acl .git/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391
-test_expect_failure 'git gc does not break ACLs with restrictive umask' '
+test_expect_success 'git gc does not break ACLs with restrictive umask' '
git gc &&
check_perms_and_acl .git/objects/pack/*.pack