summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-11-12 02:16:00 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:53:14 -0500
commitecd1b0fffd414b7b6e28a741e9367eb92dd031d4 (patch)
treefbfdfbcb30253e71cb03145a7f6168b734e5a024 /source3/lib
parent5cb9d9286134ff5c75fc7b71cb9cf5216f309320 (diff)
downloadsamba-ecd1b0fffd414b7b6e28a741e9367eb92dd031d4.tar.gz
samba-ecd1b0fffd414b7b6e28a741e9367eb92dd031d4.tar.bz2
samba-ecd1b0fffd414b7b6e28a741e9367eb92dd031d4.zip
r3693: Correctly detect errno for no acl/ea support.
Jeremy (This used to be commit 089a76f611187e2ba4c3363b657905d04576109e)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/sysacls.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/source3/lib/sysacls.c b/source3/lib/sysacls.c
index 00d06e4a5a..9b5bef00e8 100644
--- a/source3/lib/sysacls.c
+++ b/source3/lib/sysacls.c
@@ -3196,3 +3196,23 @@ int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype)
}
#endif /* No ACLs. */
+
+/************************************************************************
+ Deliberately outside the ACL defines. Return 1 if this is a "no acls"
+ errno, 0 if not.
+************************************************************************/
+
+int no_acl_syscall_error(int err)
+{
+#if defined(ENOSYS)
+ if (err == ENOSYS) {
+ return 1;
+ }
+#endif
+#if defined(ENOTSUP)
+ if (err == ENOTSUP) {
+ return 1;
+ }
+#endif
+ return 0;
+}