]> arthur.barton.de Git - netatalk.git/commitdiff
Fix a bug where copying packages to a Netatalk share fails
authorFrank Lahm <franklahm@googlemail.com>
Sat, 17 Nov 2012 11:30:18 +0000 (12:30 +0100)
committerFrank Lahm <franklahm@googlemail.com>
Mon, 19 Nov 2012 14:32:41 +0000 (15:32 +0100)
The bug was caused by the 10.6 client trying to set the creation
date on a symlink in the package. This caused our setmetadata
routine to require a valid adouble handle for the symlink which is
not possible as symlink may not allow creating an EA, depending
on the filesystem. At least ZFS on Solaris doesnt.
The fix is to check whether the adouble handle creation failed
on a symlink and ignore the error.

Fixes bug #469.

NEWS
etc/afpd/file.c

diff --git a/NEWS b/NEWS
index 8e192ea05c119849fddc068e5ee5d3cedfaa110c..b87cf65183a0de28803e3f63748fe4dc8f90918c 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,7 @@ Changes in 3.0.2
 * FIX: "basedir regex" was never able to treat symlink.
        If /home -> /usr/home, set "basedir regex = /usr/home".
 * FIX: Memory leak
+* FIX: Copying packages to a Netatalk share could fail, bug #469
 
 Changes in 3.0.1
 ================
index 940304549c331799f691f739a16436eb6a22a765..c4c55fb8290a68f5e434952dfba44d21ff46bfc5 100644 (file)
@@ -838,7 +838,7 @@ int setfilparams(const AFPObj *obj, struct vol *vol,
     uint16_t           bitmap = f_bitmap;
     uint32_t           cdate,bdate;
     u_char              finder_buf[32];
-    int symlinked = 0;
+    int symlinked = S_ISLNK(path->st.st_mode);
 
 #ifdef DEBUG
     LOG(log_debug9, logtype_afpd, "begin setfilparams:");