Work around deficient /usr/bin/id program on Solaris.
authorBruno Haible <bruno@clisp.org>
Sun, 30 Aug 2009 15:36:32 +0000 (17:36 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 30 Aug 2009 15:36:32 +0000 (17:36 +0200)
ChangeLog
tests/test-copy-acl.sh
tests/test-copy-file.sh
tests/test-file-has-acl.sh
tests/test-set-mode-acl.sh

index 31aff13..17549e2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2009-08-30  Bruno Haible  <bruno@clisp.org>
 
+       Work around deficient /usr/bin/id program on Solaris.
+       * tests/test-file-has-acl.sh (ID): New variable.
+       * tests/test-set-mode-acl.sh (ID): Likewise.
+       * tests/test-copy-acl.sh (ID): Likewise.
+       * tests/test-copy-file.sh (ID): Likewise.
+
+2009-08-30  Bruno Haible  <bruno@clisp.org>
+
        New module 'xstriconveh'.
        * lib/xstriconveh.h: New file.
        * lib/xstriconveh.c: New file.
index 9e20e77..a16990b 100755 (executable)
@@ -187,10 +187,16 @@ cd "$builddir" ||
   func_test_copy tmpfile0 tmpfile1
 
   if test $acl_flavor != none; then
+    # A POSIX compliant 'id' program.
+    if test -f /usr/xpg4/bin/id; then
+      ID=/usr/xpg4/bin/id
+    else
+      ID=id
+    fi
     # Use a user and group id different from the current one, to avoid
     # redundant/ambiguous ACLs.
-    myuid=`id -u`
-    mygid=`id -g`
+    myuid=`$ID -u`
+    mygid=`$ID -g`
     auid=1
     if test "$auid" = "$myuid"; then auid=2; fi
     agid=1
index ad7da7b..bf71b3b 100755 (executable)
@@ -181,10 +181,16 @@ cd "$builddir" ||
   func_test_copy tmpfile0 tmpfile1
 
   if test "$USE_ACL" != 0 && test $acl_flavor != none; then
+    # A POSIX compliant 'id' program.
+    if test -f /usr/xpg4/bin/id; then
+      ID=/usr/xpg4/bin/id
+    else
+      ID=id
+    fi
     # Use a user and group id different from the current one, to avoid
     # redundant/ambiguous ACLs.
-    myuid=`id -u`
-    mygid=`id -g`
+    myuid=`$ID -u`
+    mygid=`$ID -g`
     auid=1
     if test "$auid" = "$myuid"; then auid=2; fi
     agid=1
index 7064c1c..db67388 100755 (executable)
@@ -187,10 +187,16 @@ cd "$builddir" ||
   func_test_has_acl tmpdir0 no
 
   if test $acl_flavor != none; then
+    # A POSIX compliant 'id' program.
+    if test -f /usr/xpg4/bin/id; then
+      ID=/usr/xpg4/bin/id
+    else
+      ID=id
+    fi
     # Use a user and group id different from the current one, to avoid
     # redundant/ambiguous ACLs.
-    myuid=`id -u`
-    mygid=`id -g`
+    myuid=`$ID -u`
+    mygid=`$ID -g`
     auid=1
     if test "$auid" = "$myuid"; then auid=2; fi
     agid=1
index 4e58e0b..5d3d225 100755 (executable)
@@ -107,10 +107,16 @@ cd "$builddir" ||
   fi
 
   if test $acl_flavor != none; then
+    # A POSIX compliant 'id' program.
+    if test -f /usr/xpg4/bin/id; then
+      ID=/usr/xpg4/bin/id
+    else
+      ID=id
+    fi
     # Use a user and group id different from the current one, to avoid
     # redundant/ambiguous ACLs.
-    myuid=`id -u`
-    mygid=`id -g`
+    myuid=`$ID -u`
+    mygid=`$ID -g`
     auid=1
     if test "$auid" = "$myuid"; then auid=2; fi
     agid=1