# HG changeset patch # User Bruno Haible # Date 1251646592 -7200 # Node ID e9cf9c46ad7a2dc375024c4a8abdfb66f184d299 # Parent 4d4630e8627ab6ee6da243b1f8feb5821c5169b0 Work around deficient /usr/bin/id program on Solaris. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-08-30 Bruno Haible + + 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 New module 'xstriconveh'. diff --git a/tests/test-copy-acl.sh b/tests/test-copy-acl.sh --- a/tests/test-copy-acl.sh +++ b/tests/test-copy-acl.sh @@ -187,10 +187,16 @@ 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 diff --git a/tests/test-copy-file.sh b/tests/test-copy-file.sh --- a/tests/test-copy-file.sh +++ b/tests/test-copy-file.sh @@ -181,10 +181,16 @@ 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 diff --git a/tests/test-file-has-acl.sh b/tests/test-file-has-acl.sh --- a/tests/test-file-has-acl.sh +++ b/tests/test-file-has-acl.sh @@ -187,10 +187,16 @@ 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 diff --git a/tests/test-set-mode-acl.sh b/tests/test-set-mode-acl.sh --- a/tests/test-set-mode-acl.sh +++ b/tests/test-set-mode-acl.sh @@ -107,10 +107,16 @@ 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