]> arthur.barton.de Git - netatalk.git/commitdiff
Revert "Enhance handling of nested volume paths"
authorFrank Lahm <franklahm@googlemail.com>
Thu, 15 Nov 2012 16:53:31 +0000 (17:53 +0100)
committerFrank Lahm <franklahm@googlemail.com>
Thu, 15 Nov 2012 16:53:31 +0000 (17:53 +0100)
This reverts commit 949ba93384843d13099dd467aefc61e3b7185997.

libatalk/util/netatalk_conf.c

index 8b060e5f6949573e14e18e337535340dff1f5d52..fd7ebfd124777e99af77c2748f4f59ca7814e319 100644 (file)
@@ -571,9 +571,6 @@ static struct vol *creatvol(AFPObj *obj,
     uint16_t    flags;
     const char  *val;
     char        *p, *q;
-    bool        new_vol_nested = false; /* flag whether the new volume path is a subdirectory
-                                        *  of an existing directory in which case we force
-                                        * "last" cnidsheme and read only behaviour */
 
     strlcpy(path, path_in, MAXPATHLEN);
 
@@ -613,21 +610,12 @@ static struct vol *creatvol(AFPObj *obj,
                     shorter_path = path;
                     longer_path = vol->v_path;
                 } else {
-                    new_vol_nested = true;
                     shorter_len = another_pathlen;
                     shorter_path = vol->v_path;
                     longer_path = path;
                 }
-                if (longer_path[shorter_len] == '/') {
-                    if (!new_vol_nested && STRCMP(vol->v_cnidscheme, !=, "last")) {
-                        /* the volume "vol" is nested, we must force cnidscheme "last" and read-only */
-                        LOG(log_warning, logtype_afpd, "volume \"%s\" path \"%s\" is nested, set to read-only",
-                            vol->v_configname, vol->v_path);
-                        vol->v_flags = AFPVOL_RO;
-                        free(vol->v_cnidscheme);
-                        vol->v_cnidscheme = strdup("last");
-                    }
-                }
+                if (longer_path[shorter_len] == '/')
+                    LOG(log_info, logtype_afpd, "volume \"%s\" paths are nested: \"%s\" and \"%s\"", name, path, vol->v_path);
             }
         }
     }
@@ -795,14 +783,6 @@ static struct vol *creatvol(AFPObj *obj,
     if (getoption_bool(obj->iniconfig, section, "root preexec close", preset, 0))
         volume->v_root_preexec_close = 1;
 
-    /* Fixup for nested volume */
-    if (new_vol_nested && strcmp(volume->v_cnidscheme, "last")) {
-        LOG(log_note, logtype_afpd, "volume \"%s\" is changed into cnid last and read only. path is nested: \"%s\"",
-            name, path);
-        free(volume->v_cnidscheme);
-        volume->v_cnidscheme = strdup("last");
-    }
-
     /*
      * Handle read-only behaviour. semantics:
      * 1) neither the rolist nor the rwlist exist -> rw