]> arthur.barton.de Git - netatalk.git/commitdiff
remove a spurious error msg if noadouble option is set
authordidg <didg>
Wed, 16 May 2007 18:35:58 +0000 (18:35 +0000)
committerdidg <didg>
Wed, 16 May 2007 18:35:58 +0000 (18:35 +0000)
etc/afpd/auth.c
etc/afpd/unix.c
etc/afpd/vfs_adouble.c

index 9349468ddd99349bf96b891e3ea2b69d395eb830..5ae5246d51d3ffe655f190d2602f755f89c73be2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: auth.c,v 1.48 2005-04-28 20:49:40 bfernhomberg Exp $
+ * $Id: auth.c,v 1.49 2007-05-16 18:35:58 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -76,7 +76,8 @@ static struct afp_versions    afp_versions[] = {
             { "AFP2.2",        22 },
 #ifdef AFP3x
             { "AFPX03", 30 },
-            { "AFP3.1", 31 }
+            { "AFP3.1", 31 },
+            { "AFP3.2", 32 }
 #endif            
         };
 
@@ -186,6 +187,7 @@ static int set_auth_switch(int expired)
     else {
         afp_switch = postauth_switch;
         switch (afp_version) {
+        case 32:
         case 31:
            uam_afpserver_action(AFP_ENUMERATE_EXT2, UAM_AFPSERVER_POSTAUTH, afp_enumerate_ext2, NULL); 
         case 30:
index 03be770315f9be3efeff822065fd156ea920b6f5..5fd15f1c9bc93cf91f874af2988b04acfcaadd65 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: unix.c,v 1.48 2005-06-02 12:32:18 didg Exp $
+ * $Id: unix.c,v 1.49 2007-05-16 18:35:58 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -270,7 +270,7 @@ const int dropbox;
 
 #ifdef DROPKLUDGE
     /* Turn on the sticky bit if this is a drop box, also turn off the setgid bit */
-    if (dropbox) {
+    if ((dropbox & AFPVOL_DROPBOX)) {
         int uid;
 
         if ( ( (mode & S_IWOTH) && !(mode & S_IROTH)) ||
@@ -297,7 +297,9 @@ const int dropbox;
      *  Ignore EPERM errors:  We may be dealing with a directory that is
      *  group writable, in which case chmod will fail.
      */
-    if ( (chmod( name, (DIRBITS | mode) & ~default_options.umask ) < 0) && errno != EPERM)  {
+    if ( (chmod( name, (DIRBITS | mode) & ~default_options.umask ) < 0) && errno != EPERM && 
+               !(errno == ENOENT && (dropbox & AFPVOL_NOADOUBLE)) )  
+    {
         LOG(log_error, logtype_afpd, "stickydirmode: chmod \"%s\": %s", fullpathname(name), strerror(errno) );
         retval = -1;
     }
index 57ce312b6af055f05a88db05cd971c13f6b56731..8e9768c6688c594cf9a4c152400c2f1542a3a882 100644 (file)
@@ -214,18 +214,18 @@ static int RF_setdirunixmode_ads(const struct vol *vol, const char * name, mode_
 {
     char *adouble = vol->vfs->ad_path( name, ADFLAGS_DIR );
     char   ad_p[ MAXPATHLEN + 1];
-    int dropbox = (vol->v_flags & AFPVOL_DROPBOX);
+    int dropbox = vol->v_flags;
 
     strlcpy(ad_p,ad_dir(adouble), MAXPATHLEN + 1);
 
     if (dir_rx_set(mode)) {
 
         /* .AppleDouble */
-        if (stickydirmode(ad_dir(ad_p), DIRBITS | mode, dropbox) < 0 && !vol_noadouble(vol)
+        if (stickydirmode(ad_dir(ad_p), DIRBITS | mode, dropbox) < 0) 
             return -1;
 
         /* .AppleDouble/.Parent */
-        if (stickydirmode(ad_p, DIRBITS | mode, dropbox) < 0 && !vol_noadouble(vol)
+        if (stickydirmode(ad_p, DIRBITS | mode, dropbox) < 0) 
             return -1;
     }
 
@@ -233,9 +233,9 @@ static int RF_setdirunixmode_ads(const struct vol *vol, const char * name, mode_
         return -1;
 
     if (!dir_rx_set(mode)) {
-        if (stickydirmode(ad_p, DIRBITS | mode, dropbox) < 0 && !vol_noadouble(vol)
+        if (stickydirmode(ad_p, DIRBITS | mode, dropbox) < 0) 
             return  -1 ;
-        if (stickydirmode(ad_dir(ad_p), DIRBITS | mode, dropbox) < 0 && !vol_noadouble(vol)
+        if (stickydirmode(ad_dir(ad_p), DIRBITS | mode, dropbox) < 0) 
             return -1;
     }
     return 0;
@@ -282,13 +282,13 @@ static int RF_setdirmode_ads(const struct vol *vol, const char * name, mode_t mo
     struct dir_mode param;
 
     param.mode = mode;
-    param.dropbox = (vol->v_flags & AFPVOL_DROPBOX);
+    param.dropbox = vol->v_flags;
 
     strlcpy(ad_p,ad_dir(adouble), sizeof(ad_p));
 
     if (dir_rx_set(mode)) {
         /* .AppleDouble */
-        if (stickydirmode(ad_dir(ad_p), DIRBITS | mode, param.dropbox) < 0 && !vol_noadouble(vol)
+        if (stickydirmode(ad_dir(ad_p), DIRBITS | mode, param.dropbox) < 0) 
             return -1;
     }
 
@@ -296,7 +296,7 @@ static int RF_setdirmode_ads(const struct vol *vol, const char * name, mode_t mo
         return -1;
 
     if (!dir_rx_set(mode)) {
-        if (stickydirmode(ad_dir(ad_p), DIRBITS | mode, param.dropbox) < 0 && !vol_noadouble(vol)
+        if (stickydirmode(ad_dir(ad_p), DIRBITS | mode, param.dropbox) < 0 ) 
             return -1;
     }
     return 0;
@@ -496,10 +496,10 @@ static int RF_setfilmode_adouble(const struct vol *vol, const char * name, mode_
 static int RF_setdirunixmode_adouble(const struct vol *vol, const char * name, mode_t mode, struct stat *st)
 {
     char *adouble = vol->vfs->ad_path( name, ADFLAGS_DIR );
-    int  dropbox = (vol->v_flags & AFPVOL_DROPBOX);
+    int  dropbox = vol->v_flags;
 
     if (dir_rx_set(mode)) {
-        if (stickydirmode(ad_dir(adouble), DIRBITS | mode, dropbox) < 0 && !vol_noadouble(vol)
+        if (stickydirmode(ad_dir(adouble), DIRBITS | mode, dropbox) < 0 ) 
             return -1;
     }
 
@@ -507,7 +507,7 @@ static int RF_setdirunixmode_adouble(const struct vol *vol, const char * name, m
         return -1;
 
     if (!dir_rx_set(mode)) {
-        if (stickydirmode(ad_dir(adouble), DIRBITS | mode, dropbox) < 0 && !vol_noadouble(vol)
+        if (stickydirmode(ad_dir(adouble), DIRBITS | mode, dropbox) < 0 ) 
             return  -1 ;
     }
     return 0;
@@ -534,13 +534,13 @@ static int setdirmode_adouble_loop(struct dirent *de _U_, char *name, void *data
 
 static int RF_setdirmode_adouble(const struct vol *vol, const char * name, mode_t mode, struct stat *st _U_)
 {
-    int   dropbox = (vol->v_flags & AFPVOL_DROPBOX);
+    int   dropbox = vol->v_flags;
     mode_t hf_mode = ad_hf_mode(mode);
     char  *adouble = vol->vfs->ad_path( name, ADFLAGS_DIR );
     char  *adouble_p = ad_dir(adouble);
 
     if (dir_rx_set(mode)) {
-        if (stickydirmode(ad_dir(adouble), DIRBITS | mode, dropbox) < 0 && !vol_noadouble(vol)
+        if (stickydirmode(ad_dir(adouble), DIRBITS | mode, dropbox) < 0) 
             return -1;
     }
 
@@ -548,7 +548,7 @@ static int RF_setdirmode_adouble(const struct vol *vol, const char * name, mode_
         return -1;
 
     if (!dir_rx_set(mode)) {
-        if (stickydirmode(ad_dir(adouble), DIRBITS | mode, dropbox) < 0 && !vol_noadouble(vol)
+        if (stickydirmode(ad_dir(adouble), DIRBITS | mode, dropbox) < 0) 
             return  -1 ;
     }
     return 0;