sanon: Fix flags and ctx export/import confusion
We were passing SANON flags to _gss_mg_import_rfc4121_context(), which wants GSS flags. Meanwhile, I broke gss_inquire_context() on imported SAnon contexts when I did my review of SAnon. This commit fixes both issues and removes SANON_FLAG_*, which were only ever needed because of a flag to track whether a context was locally initiated or accepted. Now we use a separate int field of the sanon_ctx to track whether a context was locally initiated. Once an SAnon context is fully established, we rely on gss_inquire_context() on the rfc4121 sub-context for all metadata that isn't the initiator and acceptor names nor the mechanism OID.
This commit is contained in:
@@ -46,9 +46,7 @@ _gss_sanon_export_sec_context(OM_uint32 *minor,
|
||||
}
|
||||
|
||||
major = gss_export_sec_context(minor, &sc->rfc4121, interprocess_token);
|
||||
if (major == GSS_S_COMPLETE) {
|
||||
_gss_sanon_delete_sec_context(minor, context_handle,
|
||||
GSS_C_NO_BUFFER);
|
||||
}
|
||||
if (major == GSS_S_COMPLETE)
|
||||
_gss_sanon_delete_sec_context(minor, context_handle, GSS_C_NO_BUFFER);
|
||||
return major;
|
||||
}
|
||||
|
Reference in New Issue
Block a user