[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ACLs on HP NonStop
From: |
Bruno Haible |
Subject: |
Re: ACLs on HP NonStop |
Date: |
Tue, 6 Sep 2011 00:36:30 +0200 |
User-agent: |
KMail/1.13.6 (Linux/2.6.37.6-0.5-desktop; KDE/4.6.0; x86_64; ; ) |
Hi Joachim,
> I know, it's been a while... but I think I found a problem in ACL support for
> NonStop. There are file systems and OS version that don't support them, and
> gnu-lib code thows an error for these. The code I'm referring to is in
> file-has-acl.c and goes like this:
>
> …
> # elif HAVE_ACLSORT /* NonStop Kernel */
>
> int count;
> struct acl entries[NACLENTRIES];
>
> for (;;)
> {
> count = acl ((char *) name, ACL_CNT, NACLENTRIES, NULL);
>
> if (count < 0)
> return -1;
>
> if (count == 0)
> return 0;
> …
>
> I think this could/should get changed to the following (which is very similar
> to how HPUX does it):
>
> …
> # elif HAVE_ACLSORT /* NonStop Kernel */
>
> int count;
> struct acl entries[NACLENTRIES];
>
> for (;;)
> {
> count = acl ((char *) name, ACL_CNT, NACLENTRIES, NULL);
>
> if (count < 0)
> return (errno == ENOSYS || errno == ENOTSUP ? 0 : -1);
>
> if (count == 0)
> return 0;
Makes sense. I've applied it as follows:
2011-09-05 Joachim Schmitz <address@hidden> (tiny change)
Bruno Haible <address@hidden>
acl: Avoid errors on NonStop Kernel.
* lib/file-has-acl.c (file_has_acl) [NonStop Kernel]: Ignore ENOSYS and
ENOTSUP errors.
--- lib/file-has-acl.c.orig Tue Sep 6 00:31:09 2011
+++ lib/file-has-acl.c Tue Sep 6 00:31:01 2011
@@ -810,7 +810,12 @@
count = acl ((char *) name, ACL_CNT, NACLENTRIES, NULL);
if (count < 0)
- return -1;
+ {
+ if (errno == ENOSYS || errno == ENOTSUP)
+ break;
+ else
+ return -1;
+ }
if (count == 0)
return 0;
--
In memoriam Moshe Weinberg <http://en.wikipedia.org/wiki/Moshe_Weinberg>