diff options
author | Simo Sorce <simo@redhat.com> | 2012-02-05 18:16:28 -0500 |
---|---|---|
committer | Simo Sorce <simo@redhat.com> | 2012-02-05 20:43:13 -0500 |
commit | 78e9b122067c12cdf15746170d40049a03ddb394 (patch) | |
tree | 6753cae22c3663f5337479af1fa9a4b0b4f2e712 /proxy | |
parent | 09e04bcdf2a6da81f6a7edad8d105ed81205b151 (diff) | |
download | gss-proxy-78e9b122067c12cdf15746170d40049a03ddb394.tar.gz gss-proxy-78e9b122067c12cdf15746170d40049a03ddb394.tar.xz gss-proxy-78e9b122067c12cdf15746170d40049a03ddb394.zip |
Fix attr description set in gp_indicate_mechs()
Diffstat (limited to 'proxy')
-rw-r--r-- | proxy/src/gp_rpc_indicate_mechs.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/proxy/src/gp_rpc_indicate_mechs.c b/proxy/src/gp_rpc_indicate_mechs.c index 7a5f2c0..f7f2167 100644 --- a/proxy/src/gp_rpc_indicate_mechs.c +++ b/proxy/src/gp_rpc_indicate_mechs.c @@ -128,6 +128,30 @@ int gp_indicate_mechs(struct gssproxy_ctx *gpctx, if (ret) { goto done; } + for (j = 0; j < mech_attrs->count; j++) { + + ret_maj = gss_test_oid_set_member(&ret_min, + &mech_attrs->elements[j], + attr_set, + &present); + if (ret_maj) { + ret = EINVAL; + goto done; + } + + if (present) { + continue; + } + + ret_maj = gss_add_oid_set_member(&ret_min, + &mech_attrs->elements[j], + &attr_set); + if (ret_maj) { + ret = ENOMEM; + goto done; + } + + } gss_release_oid_set(&ret_min, &mech_attrs); ret = gp_conv_oid_set_to_gssx(known_mech_attrs, @@ -205,6 +229,11 @@ int gp_indicate_mechs(struct gssproxy_ctx *gpctx, ma = &imr->mech_attr_descs.mech_attr_descs_val[i]; + ret = gp_conv_oid_to_gssx(&attr_set->elements[i], &ma->attr); + if (ret) { + goto done; + } + ret_maj = gss_display_mech_attr(&ret_min, &attr_set->elements[i], &name, |