diff options
| author | Raghavendra Bhat <raghavendra@redhat.com> | 2013-03-26 14:15:58 +0530 | 
|---|---|---|
| committer | Vijay Bellur <vbellur@redhat.com> | 2013-04-01 02:29:39 -0700 | 
| commit | d5c3024f9fb4e1671d8e0a969934350bb08e2db9 (patch) | |
| tree | 5e2bd48c15e329286925986dd0ccb3754fc9f33b /rpc | |
| parent | fdb05c6f84054ca640e3da1c19ea7d536d2751e0 (diff) | |
rpc: disable root-squash dynamically upon volume set command
Change-Id: I2ba9ca339ffbe07cb74833165a46a941225b623d
BUG: 927616
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-on: http://review.gluster.org/4722
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'rpc')
| -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 ");  | 
