bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

acl: test failure on AIX


From: Bruno Haible
Subject: acl: test failure on AIX
Date: Sun, 5 Jun 2011 20:09:39 +0200
User-agent: KMail/1.9.9

On AIX 7.1, an ACL test fails:

  ./test-copy-acl.sh[5]: 12189730 Segmentation fault(coredump)
  FAIL: test-copy-acl.sh

It's due to a bug in the 'test-sameacls' program. This fixes it. Thanks to
Jørn Amundsen, who reported it already in
<http://lists.gnu.org/archive/html/bug-coreutils/2009-04/msg00022.html>.


2011-06-05  Bruno Haible  <address@hidden>

        acl: Fix test failure on AIX 7.
        * tests/test-sameacls.c (main) [AIX]: Fix aclx_printStr invocation.
        Based on a patch by Jørn Amundsen <address@hidden>.

--- tests/test-sameacls.c.orig  Sun Jun  5 20:06:09 2011
+++ tests/test-sameacls.c       Sun Jun  5 20:00:33 2011
@@ -430,11 +430,13 @@
   size_t aclsize1 = sizeof (acl1);
   mode_t mode1;
   char text1[1000];
+  size_t textsize1 = sizeof (text1);
   acl_type_t type2;
   char acl2[1000];
   size_t aclsize2 = sizeof (acl2);
   mode_t mode2;
   char text2[1000];
+  size_t textsize2 = sizeof (text2);
 
   /* The docs say that type1 being 0 is equivalent to ACL_ANY, but it is not
      true, in AIX 5.3.  */
@@ -445,7 +447,7 @@
       fflush (stderr);
       abort ();
     }
-  if (aclx_printStr (text1, sizeof (text1), acl1, aclsize1, type1, file1, 0) < 
0)
+  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);
@@ -461,7 +463,7 @@
       fflush (stderr);
       abort ();
     }
-  if (aclx_printStr (text2, sizeof (text2), acl2, aclsize2, type2, file2, 0) < 
0)
+  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);
-- 
In memoriam Eduard Lederer <http://de.wikipedia.org/wiki/Eduard_Lederer>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]