]> arthur.barton.de Git - netatalk.git/blobdiff - libatalk/vfs/acl.c
Spotlight: use async Tracker SPARQL API
[netatalk.git] / libatalk / vfs / acl.c
index c936f178d79bbd8bbbafc8c0269a07275ac550a7..027aba1b27a1112abb781138a7cf47189b02a395 100644 (file)
@@ -30,7 +30,7 @@
 #include <atalk/errchk.h>
 #include <atalk/acl.h>
 
-#ifdef HAVE_SOLARIS_ACLS
+#ifdef HAVE_NFSV4_ACLS
 
 /* Removes all non-trivial ACLs from object. Returns full AFPERR code. */
 int remove_acl_vfs(const char *name)
@@ -86,7 +86,7 @@ exit:
     return ret;
 }
 
-#endif  /* HAVE_SOLARIS_ACLS */
+#endif  /* HAVE_NFSV4_ACLS */
 
 #ifdef HAVE_POSIX_ACLS
 /*!
@@ -108,7 +108,7 @@ int remove_acl_vfs(const char *name)
 
 
     /* Remove default ACL if it's a dir */
-    EC_ZERO_LOG_ERR(stat(name, &st), AFPERR_MISC);
+    EC_ZERO_ERR(stat(name, &st), AFPERR_MISC);
     if (S_ISDIR(st.st_mode)) {
         EC_NULL_LOG_ERR(acl = acl_init(0), AFPERR_MISC);
         EC_ZERO_LOG_ERR(acl_set_file(name, ACL_TYPE_DEFAULT, acl), AFPERR_MISC);
@@ -129,6 +129,7 @@ int remove_acl_vfs(const char *name)
     EC_ZERO_LOG_ERR(acl_set_file(name, ACL_TYPE_ACCESS, acl), AFPERR_MISC);
 
 EC_CLEANUP:
+    if (errno == ENOENT) EC_STATUS(0);
     if (acl) acl_free(acl);
 
     EC_EXIT;