summaryrefslogtreecommitdiff
path: root/tests/test-set-mode-acl.sh
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2010-10-03 18:03:48 +0200
committerBruno Haible <bruno@clisp.org>2010-10-03 18:03:48 +0200
commit7c2e36888a6f0d63557fc2b98a8c8f3d3cb73aa3 (patch)
tree627129ba0c858500cfb12ff618ac8583f2da877a /tests/test-set-mode-acl.sh
parent866be158c16d00da1ecd020c28b78a993f2e75dc (diff)
downloadgnulib-7c2e36888a6f0d63557fc2b98a8c8f3d3cb73aa3.tar.gz
acl: Add support for ACLs on NonStop Kernel.
* m4/acl.m4 (gl_FUNC_ACL): For Solaris, test for facl(), not for acl(). Check whether the function aclsort() exists. * lib/acl-internal.h: For Solaris, test HAVE_FACL, not HAVE_ACL. (acl_nontrivial) [HAVE_ACLSORT]: New declaration. * lib/file-has-acl.c: For Solaris, test HAVE_FACL, not HAVE_ACL. (acl_nontrivial [HAVE_ACLSORT]: New function. (file_has_acl): Implement for NonStop Kernel. * lib/set-mode-acl.c: For Solaris, test HAVE_FACL, not HAVE_ACL. (qset_acl): Implement for NonStop Kernel. * lib/copy-acl.c (qcopy_acl): Implement for NonStop Kernel. * tests/test-sameacls.c: For Solaris, test HAVE_FACL, not HAVE_ACL. (main): Implement for NonStop Kernel. * tests/test-file-has-acl.sh (acl_flavor): Set to 'nsk' on NonStop Kernel. Handle this flavor. * tests/test-set-mode-acl.sh: Likewise. * tests/test-copy-acl.sh: Likewise. * tests/test-copy-file.sh: Likewise.
Diffstat (limited to 'tests/test-set-mode-acl.sh')
-rwxr-xr-xtests/test-set-mode-acl.sh13
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/test-set-mode-acl.sh b/tests/test-set-mode-acl.sh
index ef2b716074..56fde29e51 100755
--- a/tests/test-set-mode-acl.sh
+++ b/tests/test-set-mode-acl.sh
@@ -91,8 +91,14 @@ cd "$builddir" ||
acl_flavor=hpux
else
if (getacl tmpfile0 >/dev/null) 2>/dev/null; then
- # Tru64.
- acl_flavor=osf1
+ # Tru64, NonStop Kernel.
+ if (getacl -m tmpfile0 >/dev/null) 2>/dev/null; then
+ # Tru64.
+ acl_flavor=osf1
+ else
+ # NonStop Kernel.
+ acl_flavor=nsk
+ fi
else
if (aclget tmpfile0 >/dev/null) 2>/dev/null; then
# AIX.
@@ -175,6 +181,9 @@ cd "$builddir" ||
osf1)
setacl -u user:$auid:1 tmpfile0
;;
+ nsk)
+ setacl -m user:$auid:1 tmpfile0
+ ;;
aix)
{ aclget tmpfile0 | sed -e 's/disabled$/enabled/'; echo " permit --x u:$auid"; } | aclput tmpfile0
;;