Skip to content

Commit

Permalink
auth_gss: the list of pseudoflavors not being parsed correctly
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Steve Dickson authored and Trond Myklebust committed May 3, 2012
1 parent 3617e50 commit 7bdf741
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions net/sunrpc/auth_gss/gss_mech_switch.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 7bdf741

Please sign in to comment.