Merge tag 'nfs-for-3.4-5' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Pull a NFS client bugfix from Trond Myklebust: "Fix for the NFSv4 security negotiation: ensure that the security negotiation tries all registered security flavours" * tag 'nfs-for-3.4-5' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: auth_gss: the list of pseudoflavors not being parsed correctly
This commit is contained in:
@@ -242,12 +242,13 @@ EXPORT_SYMBOL_GPL(gss_mech_get_by_pseudoflavor);
|
|||||||
int gss_mech_list_pseudoflavors(rpc_authflavor_t *array_ptr)
|
int gss_mech_list_pseudoflavors(rpc_authflavor_t *array_ptr)
|
||||||
{
|
{
|
||||||
struct gss_api_mech *pos = NULL;
|
struct gss_api_mech *pos = NULL;
|
||||||
int i = 0;
|
int j, i = 0;
|
||||||
|
|
||||||
spin_lock(®istered_mechs_lock);
|
spin_lock(®istered_mechs_lock);
|
||||||
list_for_each_entry(pos, ®istered_mechs, gm_list) {
|
list_for_each_entry(pos, ®istered_mechs, gm_list) {
|
||||||
array_ptr[i] = pos->gm_pfs->pseudoflavor;
|
for (j=0; j < pos->gm_pf_num; j++) {
|
||||||
i++;
|
array_ptr[i++] = pos->gm_pfs[j].pseudoflavor;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
spin_unlock(®istered_mechs_lock);
|
spin_unlock(®istered_mechs_lock);
|
||||||
return i;
|
return i;
|
||||||
|
Reference in New Issue
Block a user