[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
ACLs on newer AIX
From: |
Bruno Haible |
Subject: |
ACLs on newer AIX |
Date: |
Tue, 6 Sep 2011 11:26:10 +0200 |
User-agent: |
KMail/1.13.6 (Linux/2.6.37.6-0.5-desktop; KDE/4.6.0; x86_64; ; ) |
> acl: Try unit tests on more file systems.
> * tests/test-file-has-acl-1.sh: New file.
> * tests/test-file-has-acl-2.sh: New file.
> * tests/test-set-mode-acl-1.sh: New file.
> * tests/test-set-mode-acl-2.sh: New file.
> * tests/test-copy-acl-1.sh: New file.
> * tests/test-copy-acl-2.sh: New file.
> * modules/acl-tests (Files): Add them.
> (Makefile.am): Add them to TESTS.
These new tests fails on AIX 5.3, 6.1, 7.1, on an NFS file system:
error accessing the ACLs of file tmpfile0
./test-copy-acl.sh[5]: 1216752 IOT/Abort trap(coredump)
FAIL: test-copy-acl-2.sh
error accessing the ACLs of file tmpfile0
./test-copy-file.sh[4]: 1052700 IOT/Abort trap(coredump)
FAIL: test-copy-file-2.sh
This fixes it:
2011-09-06 Bruno Haible <address@hidden>
acl: Fix a test failure on AIX >= 5.3 with NFS.
* tests/test-sameacls.c (main): Interpret aclx_get failure with ENOSYS
as no ACL.
--- tests/test-sameacls.c.orig Tue Sep 6 11:22:47 2011
+++ tests/test-sameacls.c Tue Sep 6 11:19:37 2011
@@ -523,32 +523,44 @@
type1.u64 = ACL_ANY;
if (aclx_get (file1, 0, &type1, acl1, &aclsize1, &mode1) < 0)
{
- fprintf (stderr, "error accessing the ACLs of file %s\n", file1);
- fflush (stderr);
- abort ();
- }
- if (aclx_printStr (text1, &textsize1, acl1, aclsize1, type1, file1, 0) < 0)
- {
- fprintf (stderr, "cannot convert the ACLs of file %s to text\n", file1);
- fflush (stderr);
- abort ();
+ if (errno == ENOSYS)
+ text1[0] = '\0';
+ else
+ {
+ fprintf (stderr, "error accessing the ACLs of file %s\n", file1);
+ fflush (stderr);
+ abort ();
+ }
}
+ else
+ if (aclx_printStr (text1, &textsize1, acl1, aclsize1, type1, file1, 0) < 0)
+ {
+ fprintf (stderr, "cannot convert the ACLs of file %s to text\n",
file1);
+ fflush (stderr);
+ abort ();
+ }
/* The docs say that type2 being 0 is equivalent to ACL_ANY, but it is not
true, in AIX 5.3. */
type2.u64 = ACL_ANY;
if (aclx_get (file2, 0, &type2, acl2, &aclsize2, &mode2) < 0)
{
- fprintf (stderr, "error accessing the ACLs of file %s\n", file2);
- fflush (stderr);
- abort ();
- }
- if (aclx_printStr (text2, &textsize2, acl2, aclsize2, type2, file2, 0) < 0)
- {
- fprintf (stderr, "cannot convert the ACLs of file %s to text\n", file2);
- fflush (stderr);
- abort ();
+ if (errno == ENOSYS)
+ text2[0] = '\0';
+ else
+ {
+ fprintf (stderr, "error accessing the ACLs of file %s\n", file2);
+ fflush (stderr);
+ abort ();
+ }
}
+ else
+ if (aclx_printStr (text2, &textsize2, acl2, aclsize2, type2, file2, 0) < 0)
+ {
+ fprintf (stderr, "cannot convert the ACLs of file %s to text\n",
file2);
+ fflush (stderr);
+ abort ();
+ }
if (strcmp (text1, text2) != 0)
{
--
In memoriam Andre Spitzer <http://en.wikipedia.org/wiki/Andre_Spitzer>
Efat Ghazi <http://en.wikipedia.org/wiki/Efat_Ghazi>
David Mark Berger <http://en.wikipedia.org/wiki/David_Mark_Berger>
Ze'ev Friedman <http://en.wikipedia.org/wiki/Ze'ev_Friedman>
Yossef Gutfreund <http://en.wikipedia.org/wiki/Yossef_Gutfreund>
Eliezer Halfin <http://en.wikipedia.org/wiki/Eliezer_Halfin>
Amitzur Shapira <http://en.wikipedia.org/wiki/Amitzur_Shapira>
Kehat Shorr <http://en.wikipedia.org/wiki/Kehat_Shorr>
Mark Slavin <http://en.wikipedia.org/wiki/Mark_Slavin>
Yakov Springer <http://en.wikipedia.org/wiki/Yakov_Springer>
- Re: coreutils-8.12.178-df9cd on Solaris 10, (continued)
- Re: coreutils-8.12.178-df9cd on Solaris 10, Bruno Haible, 2011/09/05
- Re: coreutils-8.12.178-df9cd on Solaris 10, Jim Meyering, 2011/09/06
- Re: coreutils-8.12.178-df9cd on Solaris 10, Jim Meyering, 2011/09/06
- Re: coreutils-8.12.178-df9cd on Solaris 10, Bruno Haible, 2011/09/06
- Re: coreutils-8.12.178-df9cd on Solaris 10, Bruno Haible, 2011/09/06
- Re: coreutils-8.12.178-df9cd on Solaris 10, Jim Meyering, 2011/09/06
- Re: coreutils-8.12.178-df9cd on Solaris 10, Ben Walton, 2011/09/06
- Re: coreutils-8.12.178-df9cd on Solaris 10, Pádraig Brady, 2011/09/06
- Re: coreutils-8.12.178-df9cd on Solaris 10, Ben Walton, 2011/09/06
ACLs on IRIX, Bruno Haible, 2011/09/06
ACLs on newer AIX,
Bruno Haible <=
Re: coreutils-8.12.178-df9cd on Solaris 10, Bruno Haible, 2011/09/11