all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Gnulib ACL wrappers
@ 2014-08-27 17:15 Ken Brown
  2014-08-27 17:32 ` Paul Eggert
  0 siblings, 1 reply; 5+ messages in thread
From: Ken Brown @ 2014-08-27 17:15 UTC (permalink / raw
  To: Paul Eggert; +Cc: Eric Blake, emacs-devel

Paul,

This is a followup to a discussion on the Cygwin list.  See 
https://cygwin.com/ml/cygwin/2014-08/msg00531.html, and perhaps one or 
two earlier messages in the thread if you need more context.

Although Cygwin has Solaris ACL functions, emacs doesn't use these in 
fileio.c.  Shouldn't the Gnulib ACL wrappers provide support for these? 
  Or is there something needed in Cygwin to make this work?

Here's what's in config.h concerning ACLs:

#define EMACS_CONFIG_FEATURES "DBUS ACL GNUTLS LIBXML2 ZLIB"
/* #undef HAVE_ACLSORT */
/* #undef HAVE_ACLV_H */
/* #undef HAVE_ACLX_GET */
/* #undef HAVE_ACL_COPY_EXT_NATIVE */
/* #undef HAVE_ACL_CREATE_ENTRY_NP */
/* #undef HAVE_ACL_DELETE_DEF_FILE */
/* #undef HAVE_ACL_DELETE_FD_NP */
/* #undef HAVE_ACL_DELETE_FILE_NP */
/* #undef HAVE_ACL_ENTRIES */
/* #undef HAVE_ACL_EXTENDED_FILE */
/* #undef HAVE_ACL_FIRST_ENTRY */
/* #undef HAVE_ACL_FREE */
/* #undef HAVE_ACL_FREE_TEXT */
/* #undef HAVE_ACL_FROM_MODE */
/* #undef HAVE_ACL_FROM_TEXT */
/* #undef HAVE_ACL_GET_FD */
/* #undef HAVE_ACL_GET_FILE */
/* #undef HAVE_ACL_LIBACL_H */
/* #undef HAVE_ACL_SET_FD */
/* #undef HAVE_ACL_SET_FILE */
/* #undef HAVE_ACL_TO_SHORT_TEXT */
/* #undef HAVE_ACL_TRIVIAL */
/* #undef HAVE_ACL_TYPE_EXTENDED */
#define HAVE_FACL 1
/* #undef HAVE_GETACL */
/* #undef HAVE_STATACL */
#define HAVE_SYS_ACL_H 1
#define USE_ACL 1

Ken



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

* Re: Gnulib ACL wrappers
  2014-08-27 17:15 Gnulib ACL wrappers Ken Brown
@ 2014-08-27 17:32 ` Paul Eggert
  2014-08-28 17:51   ` Ken Brown
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Eggert @ 2014-08-27 17:32 UTC (permalink / raw
  To: Ken Brown; +Cc: Eric Blake, emacs-devel

Ken Brown wrote:
> Although Cygwin has Solaris ACL functions, emacs doesn't use these in
> fileio.c.  Shouldn't the Gnulib ACL wrappers provide support for these?
> Or is there something needed in Cygwin to make this work?

Sorry, I don't know, as I don't use Cygwin.  However, if the Cygwin ACL 
functions are compatible with Solaris's, it should be easy to modify the 
Gnulib code to use them on Cygwin too.



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

* Re: Gnulib ACL wrappers
  2014-08-27 17:32 ` Paul Eggert
@ 2014-08-28 17:51   ` Ken Brown
  2014-08-28 18:33     ` Paul Eggert
  0 siblings, 1 reply; 5+ messages in thread
From: Ken Brown @ 2014-08-28 17:51 UTC (permalink / raw
  To: Paul Eggert; +Cc: Eric Blake, emacs-devel

On 8/27/2014 1:32 PM, Paul Eggert wrote:
> Ken Brown wrote:
>> Although Cygwin has Solaris ACL functions, emacs doesn't use these in
>> fileio.c.  Shouldn't the Gnulib ACL wrappers provide support for these?
>> Or is there something needed in Cygwin to make this work?
>
> Sorry, I don't know, as I don't use Cygwin.  However, if the Cygwin ACL
> functions are compatible with Solaris's, it should be easy to modify the
> Gnulib code to use them on Cygwin too.

I think I asked the wrong question.  It's clear from looking at the 
Gnulib sources that Gnulib supports Solaris ACL functions on Cygwin. 
But emacs doesn't use these functions.  AFAICT, fileio.c only uses ACL 
functions on systems that have POSIX ACL functions.  So the Gnulib code 
doesn't help.  Or am I misunderstanding something?

Ken



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

* Re: Gnulib ACL wrappers
  2014-08-28 17:51   ` Ken Brown
@ 2014-08-28 18:33     ` Paul Eggert
  2014-08-28 19:37       ` Ken Brown
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Eggert @ 2014-08-28 18:33 UTC (permalink / raw
  To: Ken Brown; +Cc: Eric Blake, emacs-devel

Ken Brown wrote:
> Or am I misunderstanding something?

Sorry, I don't know; again, I don't use Cygwin and so can be only of 
limited help debugging it.  For what it's worth, on Solaris 11 an Emacs 
trunk configure says this:

checking sys/acl.h usability... yes
checking sys/acl.h presence... yes
checking for sys/acl.h... yes
checking for library containing acl_get_file... no
checking for facl... yes
checking for library containing acl_trivial... -lsec
checking for acl_trivial... yes

and 'truss' says that (copy-file "/etc/passwd" "~/passwd" nil nil nil t) 
executed the following system calls:

facl(9, ACE_GETACLCNT, 0, 0x00000000)           = 3
facl(9, ACE_GETACL, 3, 0x087BA410)              = 3
facl(9, GETACLCNT, 0, 0x00000000)               Err#89 ENOSYS
facl(10, ACE_SETACL, 3, 0x087BA410)             = 0
fchmod(10, 0644)                                = 0

which seems to indicate that the ACL stuff is working on Solaris, at 
least to some extent.  Perhaps you can look at the corresponding output 
on Cygwin and see where things are going wrong there.



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

* Re: Gnulib ACL wrappers
  2014-08-28 18:33     ` Paul Eggert
@ 2014-08-28 19:37       ` Ken Brown
  0 siblings, 0 replies; 5+ messages in thread
From: Ken Brown @ 2014-08-28 19:37 UTC (permalink / raw
  To: Paul Eggert; +Cc: Eric Blake, emacs-devel

On 8/28/2014 2:33 PM, Paul Eggert wrote:
> Ken Brown wrote:
>> Or am I misunderstanding something?
>
> Sorry, I don't know; again, I don't use Cygwin and so can be only of
> limited help debugging it.  For what it's worth, on Solaris 11 an Emacs
> trunk configure says this:
>
> checking sys/acl.h usability... yes
> checking sys/acl.h presence... yes
> checking for sys/acl.h... yes
> checking for library containing acl_get_file... no
> checking for facl... yes
> checking for library containing acl_trivial... -lsec
> checking for acl_trivial... yes
>
> and 'truss' says that (copy-file "/etc/passwd" "~/passwd" nil nil nil t)
> executed the following system calls:
>
> facl(9, ACE_GETACLCNT, 0, 0x00000000)           = 3
> facl(9, ACE_GETACL, 3, 0x087BA410)              = 3
> facl(9, GETACLCNT, 0, 0x00000000)               Err#89 ENOSYS
> facl(10, ACE_SETACL, 3, 0x087BA410)             = 0
> fchmod(10, 0644)                                = 0
>
> which seems to indicate that the ACL stuff is working on Solaris, at
> least to some extent.  Perhaps you can look at the corresponding output
> on Cygwin and see where things are going wrong there.

I'm seeing something similar on Cygwin (except that Cygwin doesn't have 
acl_trivial), so I guess this is working as designed.  I was thrown off 
by the fact that so much of the ACL code in fileio.c is conditioned on 
HAVE_ACL_SET_FILE.  So I guess the functions that require this won't 
work on Solaris either.

Sorry for the noise, and thanks for your help.

Ken



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

end of thread, other threads:[~2014-08-28 19:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-27 17:15 Gnulib ACL wrappers Ken Brown
2014-08-27 17:32 ` Paul Eggert
2014-08-28 17:51   ` Ken Brown
2014-08-28 18:33     ` Paul Eggert
2014-08-28 19:37       ` Ken Brown

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.