summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorPavan T C <tcp@gluster.com>2011-07-12 00:25:53 +0000
committerAnand Avati <avati@gluster.com>2011-07-12 02:24:43 -0700
commit0d8235c7962e486cd0c1bad47613309aaa573b6b (patch)
treead442d465bc9d485fdbf38fe8fe251020d69fff5 /xlators
parent08f8f7ab1f6d45f1711d54660bcaa37aa0dcc877 (diff)
nfsrpc: Re-order NFS auth array contents
Some NFS client implementations can default to AUTH_NULL given a certain order of auth_array in MOUNT reply. We re-order it here to make sure that such clients (Example - 2.6.26), do not have such security loop holes. Signed-off-by: Pavan T C <tcp@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 3144 (permissions given in fuse mount don't have effect in nfs mount) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3144
Diffstat (limited to 'xlators')
-rw-r--r--xlators/nfs/lib/src/rpcsvc-auth.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/xlators/nfs/lib/src/rpcsvc-auth.c b/xlators/nfs/lib/src/rpcsvc-auth.c
index 6d07619e493..6c8d30ec009 100644
--- a/xlators/nfs/lib/src/rpcsvc-auth.c
+++ b/xlators/nfs/lib/src/rpcsvc-auth.c
@@ -56,19 +56,19 @@ nfs_rpcsvc_auth_add_initers (rpcsvc_t *svc)
{
int ret = -1;
- ret = nfs_rpcsvc_auth_add_initer (&svc->authschemes, "auth-unix",
+ ret = nfs_rpcsvc_auth_add_initer (&svc->authschemes, "auth-null",
(rpcsvc_auth_initer_t)
- nfs_rpcsvc_auth_unix_init);
+ nfs_rpcsvc_auth_null_init);
if (ret == -1) {
- gf_log (GF_RPCSVC, GF_LOG_ERROR, "Failed to add AUTH_UNIX");
+ gf_log (GF_RPCSVC, GF_LOG_ERROR, "Failed to add AUTH_NULL");
goto err;
}
- ret = nfs_rpcsvc_auth_add_initer (&svc->authschemes, "auth-null",
+ ret = nfs_rpcsvc_auth_add_initer (&svc->authschemes, "auth-unix",
(rpcsvc_auth_initer_t)
- nfs_rpcsvc_auth_null_init);
+ nfs_rpcsvc_auth_unix_init);
if (ret == -1) {
- gf_log (GF_RPCSVC, GF_LOG_ERROR, "Failed to add AUTH_NULL");
+ gf_log (GF_RPCSVC, GF_LOG_ERROR, "Failed to add AUTH_UNIX");
goto err;
}