diff options
Diffstat (limited to 'rpc/rpc-lib')
-rw-r--r-- | rpc/rpc-lib/src/rpcsvc-auth.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/rpc/rpc-lib/src/rpcsvc-auth.c b/rpc/rpc-lib/src/rpcsvc-auth.c index 907ae1ec9af..04b66091f73 100644 --- a/rpc/rpc-lib/src/rpcsvc-auth.c +++ b/rpc/rpc-lib/src/rpcsvc-auth.c @@ -206,11 +206,16 @@ rpcsvc_set_allow_insecure (rpcsvc_t *svc, dict_t *options) int rpcsvc_set_root_squash (rpcsvc_t *svc, dict_t *options) { + int ret = -1; + GF_ASSERT (svc); GF_ASSERT (options); - if (dict_get_str_boolean (options, "root-squash", 0)) - svc->root_squash = _gf_true; + ret = dict_get_str_boolean (options, "root-squash", 0); + if (ret != -1) + svc->root_squash = ret; + else + svc->root_squash = _gf_false; if (svc->root_squash) gf_log (GF_RPCSVC, GF_LOG_DEBUG, "root squashing enabled "); |