public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: setfacl on Cygwin
       [not found] <200805220105.21773.bruno@clisp.org>
@ 2008-05-22 12:35 ` Eric Blake
  2008-05-22 12:44   ` Corinna Vinschen
  0 siblings, 1 reply; 6+ messages in thread
From: Eric Blake @ 2008-05-22 12:35 UTC (permalink / raw)
  To: Bruno Haible, cygwin

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Bruno Haible on 5/21/2008 5:05 PM:
| Hi Eric,
|
| I'm looking at ACL support for gnulib. Can you reproduce this with a
| recent Cygwin? With a two-year-old Cygwin I got this:

I reproduced the same symptoms with cygwin 1.5.25-11.

|
| $ touch foo
|
| $ getfacl foo
| # file: foo
| # owner: haible
| # group: None
| user::rw-
| group::r--
| mask:rwx
| other:r--
|
| $ setfacl -m user:4:--x foo
| setfacl: No error
|
| $ echo $?
| 0
|
| $ getfacl foo
| # file: foo
| # owner: haible
| # group: None
| user::rw-
| group::r--
| mask:rwx
| other:r--
|
| The setfacl program
|   1. complained about "No error",
|   2. exited with exit code 0 although it did not execute the requested
change.
|
| Bruno
|
|

- --
Don't work too hard, make some time for fun as well!

Eric Blake             ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkg1XVsACgkQ84KuGfSFAYDZ3wCeMRFdZ4W2Li56pAJkTPJY16ry
QygAnA8TDzi/fNw3Agy0w2qEV6RmFefY
=5bUN
-----END PGP SIGNATURE-----

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: setfacl on Cygwin
  2008-05-22 12:35 ` setfacl on Cygwin Eric Blake
@ 2008-05-22 12:44   ` Corinna Vinschen
  2008-05-22 13:06     ` Corinna Vinschen
  0 siblings, 1 reply; 6+ messages in thread
From: Corinna Vinschen @ 2008-05-22 12:44 UTC (permalink / raw)
  To: cygwin; +Cc: Bruno Haible

On May 22 05:47, Eric Blake wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> According to Bruno Haible on 5/21/2008 5:05 PM:
> | Hi Eric,
> |
> | I'm looking at ACL support for gnulib. Can you reproduce this with a
> | recent Cygwin? With a two-year-old Cygwin I got this:
>
> I reproduced the same symptoms with cygwin 1.5.25-11.
>
> |
> | $ touch foo
> |
> | $ getfacl foo
> | # file: foo
> | # owner: haible
> | # group: None
> | user::rw-
> | group::r--
> | mask:rwx
> | other:r--
> |
> | $ setfacl -m user:4:--x foo
> | setfacl: No error
> |
> | $ echo $?
> | 0
> |
> | $ getfacl foo
> | # file: foo
> | # owner: haible
> | # group: None
> | user::rw-
> | group::r--
> | mask:rwx
> | other:r--
> |
> | The setfacl program
> |   1. complained about "No error",
> |   2. exited with exit code 0 although it did not execute the requested
> change.

The problem is that the request can't be executed because we have no
mapping from uid 4 to a Windows SID.  OTOH, the underlying Solaris
function acl() does not define any error code for a non-existant user
because it's not an error on Solaris. 

What error code do you want?  EINVAL?


Corinna

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

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: setfacl on Cygwin
  2008-05-22 12:44   ` Corinna Vinschen
@ 2008-05-22 13:06     ` Corinna Vinschen
  2008-05-22 16:44       ` Bruno Haible
  0 siblings, 1 reply; 6+ messages in thread
From: Corinna Vinschen @ 2008-05-22 13:06 UTC (permalink / raw)
  To: cygwin, Bruno Haible

On May 22 14:34, Corinna Vinschen wrote:
> On May 22 05:47, Eric Blake wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > According to Bruno Haible on 5/21/2008 5:05 PM:
> > | Hi Eric,
> > |
> > | I'm looking at ACL support for gnulib. Can you reproduce this with a
> > | recent Cygwin? With a two-year-old Cygwin I got this:
> >
> > I reproduced the same symptoms with cygwin 1.5.25-11.
> >
> > |
> > | $ touch foo
> > |
> > | $ getfacl foo
> > | # file: foo
> > | # owner: haible
> > | # group: None
> > | user::rw-
> > | group::r--
> > | mask:rwx
> > | other:r--
> > |
> > | $ setfacl -m user:4:--x foo
> > | setfacl: No error
> > |
> > | $ echo $?
> > | 0
> > |
> > | $ getfacl foo
> > | # file: foo
> > | # owner: haible
> > | # group: None
> > | user::rw-
> > | group::r--
> > | mask:rwx
> > | other:r--
> > |
> > | The setfacl program
> > |   1. complained about "No error",
> > |   2. exited with exit code 0 although it did not execute the requested
> > change.
> 
> The problem is that the request can't be executed because we have no
> mapping from uid 4 to a Windows SID.  OTOH, the underlying Solaris
> function acl() does not define any error code for a non-existant user
> because it's not an error on Solaris. 
> 
> What error code do you want?  EINVAL?

I applied a patch to CVS so this situation will return an "Invalid argument"
error message now.


Thanks for the report,
Corinna

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

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: setfacl on Cygwin
  2008-05-22 13:06     ` Corinna Vinschen
@ 2008-05-22 16:44       ` Bruno Haible
  2008-05-22 18:57         ` Mark J. Reed
  2008-05-22 19:05         ` Corinna Vinschen
  0 siblings, 2 replies; 6+ messages in thread
From: Bruno Haible @ 2008-05-22 16:44 UTC (permalink / raw)
  To: cygwin, Corinna Vinschen

Corinna Vinschen wrote:
> > What error code do you want?  EINVAL?

EINVAL sounds right, yes. The Solaris manual page [1] also mentions it:

  "EINVAL
    ... the cmd argument is SETACL or ACE_SETACL and the ACL specified in
    aclbufp is not valid."

> I applied a patch to CVS so this situation will return an "Invalid argument"
> error message now.

Thanks. Will the setfacl program then exit with non-zero exit code (since it
could not set the requested ACL)?

Bruno


[1] http://docs.sun.com/app/docs/doc/816-5167/acl-2?l=en&a=view


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: setfacl on Cygwin
  2008-05-22 16:44       ` Bruno Haible
@ 2008-05-22 18:57         ` Mark J. Reed
  2008-05-22 19:05         ` Corinna Vinschen
  1 sibling, 0 replies; 6+ messages in thread
From: Mark J. Reed @ 2008-05-22 18:57 UTC (permalink / raw)
  To: cygwin; +Cc: Corinna Vinschen

On Thu, May 22, 2008 at 12:36 PM, Bruno Haible <bruno@clisp.org> wrote:
> Corinna Vinschen wrote:
>> > What error code do you want?  EINVAL?
>
> EINVAL sounds right, yes. The Solaris manual page [1] also mentions it:
>
>  "EINVAL
>    ... the cmd argument is SETACL or ACE_SETACL and the ACL specified in
>    aclbufp is not valid."

Right.  That's the thing - this is a different error condition, one
that could not possibly arise on Solaris (since there is only one
concept of user there).  The question is, what should the error code
be for this new condition that can only arise on Cygwin?  Since it's
an invalid user identity for the requested operation, EINVAL seems
appropriate; it's just not what the man page says EINVAL means in this
context.

The only other standard error code that leaps out at me as possibly
appropriate is EPERM ("Operation not permitted").

Sadly, the "no such thing exists" errors are all quite specific as to
the thing in question: ENOENT for files, ESRCH for processes, ENXIO
for devices, etc.




-- 
Mark J. Reed <markjreed@gmail.com>

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

* Re: setfacl on Cygwin
  2008-05-22 16:44       ` Bruno Haible
  2008-05-22 18:57         ` Mark J. Reed
@ 2008-05-22 19:05         ` Corinna Vinschen
  1 sibling, 0 replies; 6+ messages in thread
From: Corinna Vinschen @ 2008-05-22 19:05 UTC (permalink / raw)
  To: cygwin

On May 22 18:36, Bruno Haible wrote:
> Corinna Vinschen wrote:
> > > What error code do you want?  EINVAL?
> 
> EINVAL sounds right, yes. The Solaris manual page [1] also mentions it:
> 
>   "EINVAL
>     ... the cmd argument is SETACL or ACE_SETACL and the ACL specified in
>     aclbufp is not valid."
> 
> > I applied a patch to CVS so this situation will return an "Invalid argument"
> > error message now.
> 
> Thanks. Will the setfacl program then exit with non-zero exit code (since it
> could not set the requested ACL)?

It will now, I just applied a patch.


Corinna

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

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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

end of thread, other threads:[~2008-05-22 18:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <200805220105.21773.bruno@clisp.org>
2008-05-22 12:35 ` setfacl on Cygwin Eric Blake
2008-05-22 12:44   ` Corinna Vinschen
2008-05-22 13:06     ` Corinna Vinschen
2008-05-22 16:44       ` Bruno Haible
2008-05-22 18:57         ` Mark J. Reed
2008-05-22 19:05         ` 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).