]> git.samba.org - ira/wip.git/blobdiff - source3/lib/sysacls.c
r3693: Correctly detect errno for no acl/ea support.
[ira/wip.git] / source3 / lib / sysacls.c
index 00d06e4a5aead067301bc9e8a707ef4d3e346400..9b5bef00e8acc1250112c63a6361cee850a34a03 100644 (file)
@@ -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;
+}