Allow a failure of EINVAL to mean no ACLs are available.
[rsync/rsync.git] / lib / sysacls.c
index 7334fd4..52314bc 100644 (file)
@@ -1815,7 +1815,11 @@ SMB_ACL_T sys_acl_get_file( const char *path_p, SMB_ACL_TYPE_T type)
 
        /* AIX has no DEFAULT */
        if  ( type == SMB_ACL_TYPE_DEFAULT ) {
+#ifdef ENOTSUP
                errno = ENOTSUP;
+#else
+               errno = ENOSYS;
+#endif
                return NULL;
        }
 
@@ -2777,6 +2781,11 @@ int no_acl_syscall_error(int err)
                return 1;
        }
 #endif
+       if (err == EINVAL) {
+               /* If the type of SMB_ACL_TYPE_ACCESS or SMB_ACL_TYPE_DEFAULT
+                * isn't valid, then the ACLs must be non-POSIX. */
+               return 1;
+       }
        return 0;
 }