From 107515dc545426fd81fee053243e02113f28cb8c Mon Sep 17 00:00:00 2001 From: Frank Lahm Date: Thu, 15 Nov 2012 17:53:31 +0100 Subject: [PATCH] Revert "Enhance handling of nested volume paths" This reverts commit 949ba93384843d13099dd467aefc61e3b7185997. --- libatalk/util/netatalk_conf.c | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/libatalk/util/netatalk_conf.c b/libatalk/util/netatalk_conf.c index 8b060e5f..fd7ebfd1 100644 --- a/libatalk/util/netatalk_conf.c +++ b/libatalk/util/netatalk_conf.c @@ -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 -- 2.39.2