]> arthur.barton.de Git - netatalk.git/commitdiff
Changing UNIX privs doesn't require adouble access. Fixes #2863424
authorfranklahm <franklahm>
Mon, 21 Sep 2009 12:35:04 +0000 (12:35 +0000)
committerfranklahm <franklahm>
Mon, 21 Sep 2009 12:35:04 +0000 (12:35 +0000)
NEWS
etc/afpd/file.c

diff --git a/NEWS b/NEWS
index f4c61c46aa715f61367fa0e197e625d34276c870..63a191a0a872440fc8775ea5f91c45396e574d7f 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,7 @@ Changes in 2.1
        AppleTalk is legacy.
 * UPD: cdb/dbd CNID backend requires BerkeleyDB >= 4.6
 * FIX: rewritten logger
+* FIX: afpd: UNIX permissions handling
 * NEW: cnid_metad: options -l and -f to configure logging
 * NEW: CNID database maintanance utility dbd
 * NEW: support BerkeleyDB upgrade. Starting with the next release
index 5bd632407ec1ded2ac3103c56095da4e5bd99a79..38672a738a4129d4247658edd5cf5365d7728d60 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: file.c,v 1.109 2009-07-20 18:31:04 didg Exp $
+ * $Id: file.c,v 1.110 2009-09-21 12:35:05 franklahm Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -890,10 +890,17 @@ int setfilparams(struct vol *vol,
     /* second try with adouble open 
     */
     if ( ad_open_metadata( upath, vol_noadouble(vol), O_CREAT, adp) < 0) {
-        /* for some things, we don't need an adouble header */
-        if (f_bitmap & ~(1<<FILPBIT_MDATE)) {
+        LOG(log_debug, logtype_afpd, "setfilparams: ad_open_metadata error");
+        /*
+         * For some things, we don't need an adouble header:
+         * - change of modification date
+         * - UNIX privs (Bug-ID #2863424)
+         */
+        if ( (f_bitmap & ~(1<<FILPBIT_MDATE | 1<<FILPBIT_UNIXPR))) {
+            LOG(log_debug, logtype_afpd, "setfilparams: need adouble access");
             return vol_noadouble(vol) ? AFP_OK : AFPERR_ACCESS;
         }
+        LOG(log_debug, logtype_afpd, "setfilparams: no adouble perms, but only FILPBIT_MDATE and/or FILPBIT_UNIXPR");
         isad = 0;
     } else if ((ad_get_HF_flags( adp ) & O_CREAT) ) {
         ad_setname(adp, path->m_name);