diff options
author | Kaushal M <kaushal@redhat.com> | 2012-04-09 12:17:16 +0530 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2012-04-13 00:55:51 -0700 |
commit | 28f373d89fba7266473c952d9c2bf6ec5f02628c (patch) | |
tree | 9ae99010e5c2d2add91f4d510d0f2a321d9cee04 /rpc/rpc-lib/src | |
parent | b19a7fee17ddedfc6692deb5a8dc8df927a2cf7b (diff) |
xlator/server,xlator/nfs : Fix authentication for address lists
Fixes authentication problems when address lists are given for
auth.{allow,reject} and nfs.rpc-auth-{allow,reject}.
Change-Id: I9959ebfa6820aef52c883372e1085660560e1e73
BUG: 810179
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.com/3104
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'rpc/rpc-lib/src')
-rw-r--r-- | rpc/rpc-lib/src/rpcsvc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/rpc/rpc-lib/src/rpcsvc.c b/rpc/rpc-lib/src/rpcsvc.c index 515ec672732..a4f74d8b5ae 100644 --- a/rpc/rpc-lib/src/rpcsvc.c +++ b/rpc/rpc-lib/src/rpcsvc.c @@ -1884,6 +1884,7 @@ rpcsvc_transport_peer_check_search (dict_t *options, char *pattern, char *clstr) int ret = -1; char *addrtok = NULL; char *addrstr = NULL; + char *dup_addrstr = NULL; char *svptr = NULL; if ((!options) || (!clstr)) @@ -1903,7 +1904,8 @@ rpcsvc_transport_peer_check_search (dict_t *options, char *pattern, char *clstr) goto err; } - addrtok = strtok_r (addrstr, ",", &svptr); + dup_addrstr = gf_strdup (addrstr); + addrtok = strtok_r (dup_addrstr, ",", &svptr); while (addrtok) { /* CASEFOLD not present on Solaris */ @@ -1920,6 +1922,8 @@ rpcsvc_transport_peer_check_search (dict_t *options, char *pattern, char *clstr) ret = -1; err: + if (dup_addrstr) + GF_FREE (dup_addrstr); return ret; } |