diff options
author | Amar Tumballi <amar@gluster.com> | 2012-01-17 05:28:51 +0530 |
---|---|---|
committer | Anand Avati <avati@gluster.com> | 2012-01-24 20:14:17 -0800 |
commit | b02afc6d008f9959db28244eb2b9dd3b9ef92393 (patch) | |
tree | c0bad790fb34f8ab2747b480d334cf9af75c5514 /rpc/rpc-lib/src/rpcsvc-auth.c | |
parent | 0694749c3e5039be327110a64dd66619b5d9121c (diff) |
core: change lk-owner as a 1k buffer
so, NLM can send the lk-owner field directly to the locks translators,
while doing the same effort, also enabled sending maximum of 500 aux gid
over protocol.
Change-Id: I87c2514392748416f7ffe21d5154faad2e413969
Signed-off-by: Amar Tumballi <amar@gluster.com>
BUG: 767229
Reviewed-on: http://review.gluster.com/779
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@gluster.com>
Diffstat (limited to 'rpc/rpc-lib/src/rpcsvc-auth.c')
-rw-r--r-- | rpc/rpc-lib/src/rpcsvc-auth.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/rpc/rpc-lib/src/rpcsvc-auth.c b/rpc/rpc-lib/src/rpcsvc-auth.c index d62bd100be5..930eabdda74 100644 --- a/rpc/rpc-lib/src/rpcsvc-auth.c +++ b/rpc/rpc-lib/src/rpcsvc-auth.c @@ -29,6 +29,8 @@ rpcsvc_auth_unix_init (rpcsvc_t *svc, dict_t *options); extern rpcsvc_auth_t * rpcsvc_auth_glusterfs_init (rpcsvc_t *svc, dict_t *options); +extern rpcsvc_auth_t * +rpcsvc_auth_glusterfs_v2_init (rpcsvc_t *svc, dict_t *options); int rpcsvc_auth_add_initer (struct list_head *list, char *idfier, @@ -66,6 +68,16 @@ rpcsvc_auth_add_initers (rpcsvc_t *svc) goto err; } + + ret = rpcsvc_auth_add_initer (&svc->authschemes, "auth-glusterfs-v2", + (rpcsvc_auth_initer_t) + rpcsvc_auth_glusterfs_v2_init); + if (ret == -1) { + gf_log (GF_RPCSVC, GF_LOG_ERROR, + "Failed to add AUTH_GLUSTERFS-v2"); + goto err; + } + ret = rpcsvc_auth_add_initer (&svc->authschemes, "auth-unix", (rpcsvc_auth_initer_t) rpcsvc_auth_unix_init); @@ -434,8 +446,12 @@ rpcsvc_auth_unix_auxgids (rpcsvc_request_t *req, int *arrlen) return NULL; /* In case of AUTH_NULL auxgids are not used */ - if ((req->cred.flavour != AUTH_UNIX) && - (req->cred.flavour != AUTH_GLUSTERFS)) { + switch (req->cred.flavour) { + case AUTH_UNIX: + case AUTH_GLUSTERFS: + case AUTH_GLUSTERFS_v2: + break; + default: gf_log ("rpc", GF_LOG_DEBUG, "auth type not unix or glusterfs"); return NULL; } |