]> arthur.barton.de Git - netatalk.git/commitdiff
volume name must not contain ":"
authorHAT <hat@fa2.so-net.ne.jp>
Thu, 2 Aug 2012 16:04:31 +0000 (01:04 +0900)
committerHAT <hat@fa2.so-net.ne.jp>
Thu, 2 Aug 2012 16:04:31 +0000 (01:04 +0900)
libatalk/iniparser/iniparser.c
libatalk/util/netatalk_conf.c

index 735812cd5b651edecefbf219b37016327ea0fc03..6e89472b34be54aff750f48a3c53b073fedd04b4 100644 (file)
@@ -598,6 +598,8 @@ dictionary * iniparser_load(const char * ininame)
         case LINE_COMMENT:
             break ;
         case LINE_SECTION:
+            if (strchr(section, ':') != NULL)
+                LOG(log_error, logtype_default, "iniparser: syntax error \"%s\" section name must not contain \":\".", section);
             errs = dictionary_set(dict, section, NULL, NULL);
             break ;
         case LINE_VALUE:
index fdb18f27e5cd2d1a3e113d9b24a89f99d502bc6d..3ec1a1f00d105d1aa5b34336f118b1b375fd0053 100644 (file)
@@ -1025,6 +1025,10 @@ static int readvolfile(AFPObj *obj, const struct passwd *pwent)
                 LOG(log_warning, logtype_afpd, "home name must contain $u.");
                 p = "$u's home";
             }
+            if (strchr(p, ':') != NULL) {
+                LOG(log_warning, logtype_afpd, "home name must not contain \":\".");
+                p = "$u's home";
+            }
             strlcpy(tmp, p, MAXPATHLEN);
         } else {
             strlcpy(tmp, secname, AFPVOL_U8MNAMELEN);