diff options
-rw-r--r-- | cli/src/cli-cmd-parser.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c index 1a4c2f59f1a..8fb78230935 100644 --- a/cli/src/cli-cmd-parser.c +++ b/cli/src/cli-cmd-parser.c @@ -12,6 +12,7 @@ #include <stdlib.h> #include <stdint.h> #include <pthread.h> +#include <fnmatch.h> #ifndef _CONFIG_H #define _CONFIG_H @@ -1520,9 +1521,11 @@ cli_cmd_volume_set_parse (struct cli_state *state, const char **words, count++; - ret = gf_strip_whitespace (value, strlen (value)); - if (ret == -1) - goto out; + if (fnmatch ("user.*", key, FNM_NOESCAPE) != 0) { + ret = gf_strip_whitespace (value, strlen (value)); + if (ret == -1) + goto out; + } if (strlen (value) == 0) { ret = -1; |