summaryrefslogtreecommitdiffstats
path: root/xlators/nfs/lib
diff options
context:
space:
mode:
authorSachidananda <sac@gluster.com>2010-08-17 01:46:43 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-08-17 02:23:55 -0700
commitead92558ee8ec71442b2fa2da1a0df197ee78467 (patch)
treee12af0729ef8057398f3316cf3dce57be1548593 /xlators/nfs/lib
parentd552322816e82b3bc14533ecec9b770a213e7530 (diff)
xlators/nfs: rpcsvc-auth.c - clean up dead assignments.
Signed-off-by: Sachidananda Urs <sac@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1119 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1119
Diffstat (limited to 'xlators/nfs/lib')
-rw-r--r--xlators/nfs/lib/src/rpcsvc-auth.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/xlators/nfs/lib/src/rpcsvc-auth.c b/xlators/nfs/lib/src/rpcsvc-auth.c
index b3e2e36a3..7ff2d793d 100644
--- a/xlators/nfs/lib/src/rpcsvc-auth.c
+++ b/xlators/nfs/lib/src/rpcsvc-auth.c
@@ -72,9 +72,8 @@ nfs_rpcsvc_auth_add_initers (rpcsvc_t *svc)
goto err;
}
- ret = 0;
err:
- return 0;
+ return ret;
}
@@ -131,11 +130,23 @@ nfs_rpcsvc_auth_init_auths (rpcsvc_t *svc, dict_t *options)
* it by default. This is a globally default rule, the user is still
* allowed to disable the two for particular subvolumes.
*/
- if (!dict_get (options, "rpc-auth.auth-null"))
+ if (!dict_get (options, "rpc-auth.auth-null")) {
ret = dict_set_dynstr (options, "rpc-auth.auth-null", "on");
+ if (ret < 0) {
+ gf_log (GF_RPCSVC, GF_LOG_ERROR,
+ "Failed to set dict value.");
+ goto err;
+ }
+ }
- if (!dict_get (options, "rpc-auth.auth-unix"))
+ if (!dict_get (options, "rpc-auth.auth-unix")) {
ret = dict_set_dynstr (options, "rpc-auth.auth-unix", "on");
+ if (ret < 0) {
+ gf_log (GF_RPCSVC, GF_LOG_ERROR,
+ "Failed to set dict value.");
+ goto err;
+ }
+ }
list_for_each_entry_safe (auth, tmp, &svc->authschemes, authlist) {
ret = nfs_rpcsvc_auth_init_auth (svc, options, auth);
@@ -177,7 +188,6 @@ out:
rpcsvc_auth_t *
__nfs_rpcsvc_auth_get_handler (rpcsvc_request_t *req)
{
- int ret = -1;
struct rpcsvc_auth_list *auth = NULL;
struct rpcsvc_auth_list *tmp = NULL;
rpcsvc_t *svc = NULL;
@@ -188,7 +198,6 @@ __nfs_rpcsvc_auth_get_handler (rpcsvc_request_t *req)
svc = nfs_rpcsvc_request_service (req);
if (list_empty (&svc->authschemes)) {
gf_log (GF_RPCSVC, GF_LOG_WARNING, "No authentication!");
- ret = 0;
goto err;
}