summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cli/src/cli-cmd-parser.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c
index e37408ddb37..a3d46b60231 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>
#include "cli.h"
#include "cli-cmd.h"
@@ -1510,9 +1511,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;