]> andersk Git - moira.git/blobdiff - clients/moira/cluster.c
Allow spaces in container names.
[moira.git] / clients / moira / cluster.c
index 635000a61cb5fd5e709e6064bea6279eb3e54884..6ce6c0d1c26ab9cc377184a220b6a4ebf12affab 100644 (file)
@@ -2070,8 +2070,18 @@ int AddContainer(int argc, char **argv)
   char **args, *info[MAX_ARGS_SIZE], *name = argv[1];
   int stat;
 
-  if (!ValidName(name))
-    return DM_NORMAL;
+  /* Can't use ValidName() because spaces are allowed in container names */
+  if (IS_EMPTY(name))
+    {
+      Put_message("Please use a non-empty name.");
+      return DM_NORMAL;
+    }
+
+  if (strchr(name, '*') || strchr(name, '?'))
+    {
+      Put_message("Wildcards not accepted here.");
+      return DM_NORMAL;
+    }
 
   /* Check if this cluster already exists. */
   if ((stat = do_mr_query("get_container", 1, &name, NULL, NULL))
This page took 0.034821 seconds and 4 git commands to generate.