]> arthur.barton.de Git - netatalk.git/commitdiff
Another fix for ACL and symlinks
authorFrank Lahm <franklahm@googlemail.com>
Tue, 16 Nov 2010 16:41:46 +0000 (17:41 +0100)
committerFrank Lahm <franklahm@googlemail.com>
Tue, 16 Nov 2010 16:41:46 +0000 (17:41 +0100)
libatalk/acl/unix.c

index 9b9e394b86b79b866d939bdb83f23b02b12a1fef..be422aac38c7498d89e56c0f004f8cbe0374cff2 100644 (file)
@@ -47,7 +47,12 @@ int get_nfsv4_acl(const char *name, ace_t **retAces)
         LOG(log_warning, logtype_afpd, "get_nfsv4_acl(\"%s/%s\"): %s", getcwdpath(), name, strerror(errno));
         return -1;
     }
-    if ( ! (S_ISREG(st.st_mode) || S_ISDIR(st.st_mode) || S_ISLNK(st.st_mode))) {
+
+    if (S_ISLNK(st.st_mode))
+        /* sorry, no ACLs for symlinks */
+        return 0;
+
+    if ( ! (S_ISREG(st.st_mode) || S_ISDIR(st.st_mode))) {
         LOG(log_warning, logtype_afpd, "get_nfsv4_acl(\"%s/%s\"): special", getcwdpath(), name);
         return 0;
     }