public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
* setup and getfacl
@ 2009-03-30  0:26 Charles Wilson
  2009-03-30  8:48 ` Corinna Vinschen
  0 siblings, 1 reply; 2+ messages in thread
From: Charles Wilson @ 2009-03-30  0:26 UTC (permalink / raw)
  To: CygWin-Apps

I ran across something odd today while testing my forthcoming inetutils
update. It seems that within the environment in which postinstall
scripts are run via setup (the old, 1.5 versions 2.573.2.3 or 2.588),
one is unable to accurately obtain the ACLs or permissions of files and
directories.

Now, this all works just fine in the cygwin-1.7 setup (2.609) -- so it's
probably a moot issue as 1.5 is nearing EOL -- but if there's a quick
explanation I'd like to know, so I can update the inetutils
documentation with that info.

What happens is that during postinstall, various permission checks are
done on /var/run, /var/empty, /etc, and the like.  With the cygwin-1.5's
setup.exe, those checks fail, even though running the postinstall script
"by hand" from an Administrator account under cygwin-1.5 works fine (I
always run setup.exe with 'Run as Administration' and privilege
elevation under UAC).

So, I stuck some debug output at the end of csih to simply dump the ACLs
of a file and a directory (dummy files that are not otherwise involved
in the inetutils postinstall).  In a normal context (e.g. NOT during
setup/postinstall), they look like this:

First the file:

$ getfacl /etc/bob
# file: /etc/bob
# owner: Administrator
# group: Users
user::rwx
group::rwx
group:SYSTEM:rwx
group:Administrators:rwx
mask:rwx
other:rwx

Then the directory:

$ getfacl /etc/bobd
# file: /etc/bobd
# owner: Administrator
# group: Users
user::rwx
group::rwx
group:SYSTEM:rwx
group:Administrators:rwx
mask:rwx
other:rwx
default:user:Administrator:rwx
default:group:SYSTEM:rwx
default:group:Administrators:rwx
default:group:Users:r-x
default:mask:rwx

However, when I stuck the following into csih, so that it got invoked
via the inetutils postinstall script:

echo getfacl /etc/bob
getfacl /etc/bob
echo getfacl /etc/bobd
getfacl /etc/bobd

I get the following in setup.log.full:

getfacl /etc/bob
# file: /etc/bob
# owner: Administrator
# group: Users
user::rw-
group::r--
other:r--
mask:rwx


getfacl /etc/bobd
# file: /etc/bobd
# owner: Administrator
# group: Users
user::rwx
group::r-x
other:r-x
mask:rwx


Huh?  Is this a bug, or just a known mis-feature?  What causes it?  And,
is it worth fixing in the cygwin-1.5 setup (most probably not, I'd guess).

--
Chuck

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: setup and getfacl
  2009-03-30  0:26 setup and getfacl Charles Wilson
@ 2009-03-30  8:48 ` Corinna Vinschen
  0 siblings, 0 replies; 2+ messages in thread
From: Corinna Vinschen @ 2009-03-30  8:48 UTC (permalink / raw)
  To: cygwin-apps

On Mar 29 20:26, Charles Wilson wrote:
> I ran across something odd today while testing my forthcoming inetutils
> update. It seems that within the environment in which postinstall
> scripts are run via setup (the old, 1.5 versions 2.573.2.3 or 2.588),
> one is unable to accurately obtain the ACLs or permissions of files and
> directories.
> 
> Now, this all works just fine in the cygwin-1.7 setup (2.609) -- so it's
> probably a moot issue as 1.5 is nearing EOL -- but if there's a quick
> explanation I'd like to know, so I can update the inetutils
> documentation with that info.
> [...]
> I get the following in setup.log.full:
> 
> getfacl /etc/bob
> # file: /etc/bob
> # owner: Administrator
> # group: Users
> user::rw-
> group::r--
> other:r--
> mask:rwx
> 
> 
> getfacl /etc/bobd
> # file: /etc/bobd
> # owner: Administrator
> # group: Users
> user::rwx
> group::r-x
> other:r-x
> mask:rwx

Looks like running in CYGWIN=nontsec mode.


Corinna

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-03-30  8:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-30  0:26 setup and getfacl Charles Wilson
2009-03-30  8:48 ` Corinna Vinschen

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).