This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [ANNOUNCEMENT] TEST RELEASE: Cygwin 2.0.0-0.7


On Apr 18 11:47, Achim Gratz wrote:
> Corinna Vinschen writes:
> > In theory, the access(2)/faccessat(2) functions should not rely at all
> > on the new code.  The reason is that they are implemented using the
> > underlying OS function to evaluate ACLs.  That means, they provide the
> > actual access the OS grants.
> 
> That means they do not lie to the user like the mode bits do.  Which
> breaks all sorts of assumptions that POSIX programs are allowed to make.
> In turn one will almost universally have to remove the corresponding ACL
> grants (the inherited ACL will always have rwx modes) when using an
> administrator account (in this particular instance that's an easy thing
> to do, luckily).  This kind of brings us back to where we started with
> the discussion of whether to handle SYSTEM and Administrators specially,
> only that the point of decision is now moved from mode check to
> (f)access(at).  The outcome is the same: if you can't remove those ACL,
> then correct POSIX semantics aren't possible.

Right.  It's a compromise.  I take it you don't like the extra behaviour
for SYSTEM/Admins.  Neither do I.  Others are desperately waiting for
more.  The problem with compromises is, they are usually best if nobody
is completely satisfied ;)

As I said before, this behaviour is not necessarily the last word.
We have to see how this works out.  The point you're making here
is certainly a point against this implementation.  But I'm willing
to defend it to get more testing.

> > In the above case, SYSTEM and Administrators both have execute
> > permissions, because they are never masked if they are secondary
> > accounts, as outlined in the test release announcement.
> 
> A POSIX program trying to shortcut the ACL handling would conclude it
> doesn't need to look beyond the mode bits.  A program that checks with
> faccessat anyway gets told a different story.  The only analogue to this
> is with root having implicit access to files on UN*X systems, but I
> think "executable" would still be determined from the mode bits in this
> case.

Uh, not quite.  POSIX defines

   If any access permissions are checked, each shall be checked
   individually, as described in XBD File Access Permissions , except
   that where that description refers to execute permission for a
   process with appropriate privileges, an implementation may indicate
   success for X_OK even if execute permission is not granted to any
   user.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: pgpPX8RP_iv5h.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]