summaryrefslogtreecommitdiffstats
path: root/net/sunrpc/auth_gss/gss_mech_switch.c
diff options
context:
space:
mode:
authorSteve Dickson2012-05-03 17:47:08 +0200
committerTrond Myklebust2012-05-03 18:35:33 +0200
commit7bdf7415a6b8ec31f86b3ad3eaa241257ecb7c4c (patch)
tree36cabe5902b163a66f94d7971ddba72d9aeaf0ff /net/sunrpc/auth_gss/gss_mech_switch.c
parentNFSv4.1: Use the correct hostname in the client identifier string (diff)
downloadkernel-qcow2-linux-7bdf7415a6b8ec31f86b3ad3eaa241257ecb7c4c.tar.gz
kernel-qcow2-linux-7bdf7415a6b8ec31f86b3ad3eaa241257ecb7c4c.tar.xz
kernel-qcow2-linux-7bdf7415a6b8ec31f86b3ad3eaa241257ecb7c4c.zip
auth_gss: the list of pseudoflavors not being parsed correctly
gss_mech_list_pseudoflavors() parses a list of registered mechanisms. On that list contains a list of pseudo flavors which was not being parsed correctly, causing only the first pseudo flavor to be found. Signed-off-by: Steve Dickson <steved@redhat.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/auth_gss/gss_mech_switch.c')
-rw-r--r--net/sunrpc/auth_gss/gss_mech_switch.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/sunrpc/auth_gss/gss_mech_switch.c b/net/sunrpc/auth_gss/gss_mech_switch.c
index ca8cad8251c7..782bfe1b6465 100644
--- a/net/sunrpc/auth_gss/gss_mech_switch.c
+++ b/net/sunrpc/auth_gss/gss_mech_switch.c
@@ -242,12 +242,13 @@ EXPORT_SYMBOL_GPL(gss_mech_get_by_pseudoflavor);
int gss_mech_list_pseudoflavors(rpc_authflavor_t *array_ptr)
{
struct gss_api_mech *pos = NULL;
- int i = 0;
+ int j, i = 0;
spin_lock(&registered_mechs_lock);
list_for_each_entry(pos, &registered_mechs, gm_list) {
- array_ptr[i] = pos->gm_pfs->pseudoflavor;
- i++;
+ for (j=0; j < pos->gm_pf_num; j++) {
+ array_ptr[i++] = pos->gm_pfs[j].pseudoflavor;
+ }
}
spin_unlock(&registered_mechs_lock);
return i;