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

Re: Bugreport on Ubuntu LTS: not ok - 2 Objects creation does not break ACLs with restrictive umask

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 5, 2012, 16:31 UTC
Message-ID
<7vpq9dpvnp.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20120605150550.GA19843@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 28 quoted lines
> [+cc ecryptfs@vger, as I think this is an ecryptfs bug]
>
> On Tue, Jun 05, 2012 at 10:28:13AM -0400, Jeff King wrote:
>
>> OK, here's the _real_ issue. Git creates with mode 0444, which should
>> still allow read in the mask. But it's the restrictive umask at the top
>> of the test script that causes the problem. Try this:
>> 
>>   setfacl -m m:rwx .
>>   perl -MFcntl -e 'sysopen(X, "a", O_WRONLY|O_CREAT, 0444)'
>>   umask 077
>>   perl -MFcntl -e 'sysopen(X, "b", O_WRONLY|O_CREAT, 0444)'
>>   getfacl a b
>> 
>> On ext4, both files will have the read bit set in the mask. On ecryptfs,
>> "b" will have an empty mask. I think the wrong thing is that we should
>> not be respecting umask at all when default ACLs are in play, and
>> ecryptfs is getting that wrong. But I'm having trouble digging up an
>> authoritative source.
>
> Reading the withdrawn posix 1003.1e and "man 5 acl", it seems pretty
> clear that if a default ACL is present, it should be used, and umask
> consulted only if it is not (so the umask should not be making a
> difference in this case).
>
> The reproduction recipe above shows the minimum required to trigger it;
> adding a more realistic default ACL (with actual entries for users) does
> not seem to make a difference.
Thanks; so combining the above with your earlier patch to 1304 we
would have a good detection for SETFACL prerequisite?
 
Previous: Jeff KingNext: Jeff King
Message 15 of 26 in “Bugreport on Ubuntu LTS: not ok - 2 Objects creation does not break ACLs with restrictive umask”
  1. Stefan BellerJun 4, 2012
  2. Junio C HamanoJun 4, 2012
  3. Junio C HamanoJun 4, 2012
  4. Matthieu MoyJun 5, 2012
  5. Stefan BellerJun 5, 2012
  6. Stefan BellerJun 5, 2012
  7. Jeff KingJun 5, 2012
  8. Matthieu MoyJun 5, 2012
  9. Stefan BellerJun 5, 2012
  10. Matthieu MoyJun 5, 2012
  11. Jeff KingJun 5, 2012
  12. Jeff KingJun 5, 2012
  13. Jeff KingJun 5, 2012
  14. Jeff KingJun 5, 2012
  15. Junio C HamanoJun 5, 2012
  16. Jeff KingJun 5, 2012
  17. Junio C HamanoJun 5, 2012
  18. t1304: improve setfacl prerequisite setupJeff King, Jun 6, 2012
  19. Stefan BellerJun 6, 2012
  20. Junio C HamanoJun 6, 2012
  21. Jeff KingJun 7, 2012
  22. Junio C HamanoJun 7, 2012
  23. Brandon CaseyJun 8, 2012
  24. Tyler HicksJun 5, 2012
  25. Stefan BellerJun 5, 2012
  26. Jeff KingJun 5, 2012

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.