git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jeff King <peff@peff.net>
Cc: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>,
	ecryptfs@vger.kernel.org,
	Stefan Beller <stefanbeller@googlemail.com>,
	git@vger.kernel.org
Subject: Re: Bugreport on Ubuntu LTS: not ok - 2 Objects creation does not break ACLs with restrictive umask
Date: Tue, 05 Jun 2012 09:31:54 -0700	[thread overview]
Message-ID: <7vpq9dpvnp.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <20120605150550.GA19843@sigill.intra.peff.net> (Jeff King's message of "Tue, 5 Jun 2012 11:05:50 -0400")

Jeff King <peff@peff.net> writes:

> [+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?
 

  reply	other threads:[~2012-06-05 16:32 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-04 15:40 Bugreport on Ubuntu LTS: not ok - 2 Objects creation does not break ACLs with restrictive umask Stefan Beller
2012-06-04 20:18 ` Junio C Hamano
     [not found]   ` <CALbm-EatNCPjFRO4NyGfZuSa72-FXwZcd_7cFe-f_iMOdGL4MQ@mail.gmail.com>
2012-06-04 22:19     ` Junio C Hamano
2012-06-05  6:02       ` Matthieu Moy
2012-06-05  7:23         ` Stefan Beller
2012-06-05  7:43           ` Stefan Beller
2012-06-05  7:56           ` Jeff King
2012-06-05 11:29             ` Matthieu Moy
2012-06-05 12:23               ` Stefan Beller
2012-06-05 13:28                 ` Matthieu Moy
2012-06-05 14:04                   ` Jeff King
2012-06-05 14:10                     ` Jeff King
2012-06-05 14:28                       ` Jeff King
2012-06-05 15:05                         ` Jeff King
2012-06-05 16:31                           ` Junio C Hamano [this message]
2012-06-05 16:44                             ` Jeff King
2012-06-05 17:27                               ` Junio C Hamano
2012-06-06 13:28                                 ` [PATCH] t1304: improve setfacl prerequisite setup Jeff King
2012-06-06 16:11                                   ` Stefan Beller
2012-06-06 16:58                                   ` Junio C Hamano
2012-06-07  9:02                                     ` Jeff King
2012-06-07 16:16                                       ` Junio C Hamano
2012-06-08  1:18                                         ` Brandon Casey
2012-06-05 19:16                               ` Bugreport on Ubuntu LTS: not ok - 2 Objects creation does not break ACLs with restrictive umask Tyler Hicks
2012-06-05 20:45                                 ` Stefan Beller
2012-06-05 13:29                 ` Jeff King
  -- strict thread matches above, loose matches on Subject: below --
2012-06-04 20:49 Stefan Beller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vpq9dpvnp.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=Matthieu.Moy@grenoble-inp.fr \
    --cc=ecryptfs@vger.kernel.org \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=stefanbeller@googlemail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).