mirror of
https://github.com/samba-team/samba.git
synced 2025-02-08 05:57:51 +03:00
s3:librpc/gse: correctly support GENSEC_FEATURE_SESSION_KEY
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11804 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Günther Deschner <gd@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> (cherry picked from commit e4aebd7e28e7b00a13246b367eb2e7de5ae7b57b)
This commit is contained in:
parent
2b351b7e3d
commit
47272c3643
@ -594,6 +594,9 @@ static NTSTATUS gensec_gse_client_start(struct gensec_security *gensec_security)
|
||||
return NT_STATUS_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
if (gensec_security->want_features & GENSEC_FEATURE_SESSION_KEY) {
|
||||
do_sign = true;
|
||||
}
|
||||
if (gensec_security->want_features & GENSEC_FEATURE_SIGN) {
|
||||
do_sign = true;
|
||||
}
|
||||
@ -894,18 +897,15 @@ static bool gensec_gse_have_feature(struct gensec_security *gensec_security,
|
||||
talloc_get_type_abort(gensec_security->private_data,
|
||||
struct gse_context);
|
||||
|
||||
if (feature & GENSEC_FEATURE_SESSION_KEY) {
|
||||
return gse_ctx->gss_got_flags & GSS_C_INTEG_FLAG;
|
||||
}
|
||||
if (feature & GENSEC_FEATURE_SIGN) {
|
||||
return gse_ctx->gss_got_flags & GSS_C_INTEG_FLAG;
|
||||
}
|
||||
if (feature & GENSEC_FEATURE_SEAL) {
|
||||
return gse_ctx->gss_got_flags & GSS_C_CONF_FLAG;
|
||||
}
|
||||
if (feature & GENSEC_FEATURE_SESSION_KEY) {
|
||||
/* Only for GSE/Krb5 */
|
||||
if (smb_gss_oid_equal(gse_ctx->ret_mech, gss_mech_krb5)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (feature & GENSEC_FEATURE_DCE_STYLE) {
|
||||
return gse_ctx->gss_got_flags & GSS_C_DCE_STYLE;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user