提交 7bdf7415 编写于 作者: S Steve Dickson 提交者: Trond Myklebust

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: NSteve Dickson <steved@redhat.com>
Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
上级 3617e503
...@@ -242,12 +242,13 @@ EXPORT_SYMBOL_GPL(gss_mech_get_by_pseudoflavor); ...@@ -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(&registered_mechs_lock); spin_lock(&registered_mechs_lock);
list_for_each_entry(pos, &registered_mechs, gm_list) { list_for_each_entry(pos, &registered_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(&registered_mechs_lock); spin_unlock(&registered_mechs_lock);
return i; return i;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册