Skip to content

Commit

Permalink
Fix attr description set in gp_indicate_mechs()
Browse files Browse the repository at this point in the history
  • Loading branch information
simo5 committed Feb 6, 2012
1 parent 09e04bc commit 78e9b12
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions proxy/src/gp_rpc_indicate_mechs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 78e9b12

Please sign in to comment.