summaryrefslogtreecommitdiff
path: root/tests/test-file-has-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-file-has-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-file-has-acl.sh')
-rwxr-xr-xtests/test-file-has-acl.sh24
1 files changed, 22 insertions, 2 deletions
diff --git a/tests/test-file-has-acl.sh b/tests/test-file-has-acl.sh
index db6738870a..3f49e8d9e3 100755
--- a/tests/test-file-has-acl.sh
+++ b/tests/test-file-has-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.
@@ -286,6 +292,20 @@ cd "$builddir" ||
fi
;;
+ nsk)
+
+ # Set an ACL for a user.
+ setacl -m user:$auid:1 tmpfile0
+
+ func_test_has_acl tmpfile0 yes
+
+ # Remove the ACL for the user.
+ setacl -d user:$auid tmpfile0
+
+ func_test_has_acl tmpfile0 no
+
+ ;;
+
aix)
# Set an ACL for a user.