We now just call the gensec_have_feature() directly.
Andrew Bartlett
Signed-off-by: Stefan Metzmacher <metze@samba.org>
const uint8_t *whole_pdu,
size_t pdu_length,
const DATA_BLOB *sig);
-bool auth_ntlmssp_negotiated_sign(struct auth_ntlmssp_state *ans);
-bool auth_ntlmssp_negotiated_seal(struct auth_ntlmssp_state *ans);
NTSTATUS auth_ntlmssp_set_username(struct auth_ntlmssp_state *ans,
const char *user);
NTSTATUS auth_ntlmssp_set_domain(struct auth_ntlmssp_state *ans,
data, length, whole_pdu, pdu_length, sig);
}
-bool auth_ntlmssp_negotiated_sign(struct auth_ntlmssp_state *ans)
-{
- return gensec_have_feature(ans->gensec_security, GENSEC_FEATURE_SIGN);
-}
-
-bool auth_ntlmssp_negotiated_seal(struct auth_ntlmssp_state *ans)
-{
- return gensec_have_feature(ans->gensec_security, GENSEC_FEATURE_SEAL);
-}
-
NTSTATUS auth_ntlmssp_set_username(struct auth_ntlmssp_state *ans,
const char *user)
{
NTSTATUS ntlmssp_server_check_flags(struct auth_ntlmssp_state *ctx,
bool do_sign, bool do_seal)
{
- if (do_sign && !auth_ntlmssp_negotiated_sign(ctx)) {
+ if (do_sign && !gensec_have_feature(ctx->gensec_security, GENSEC_FEATURE_SIGN)) {
DEBUG(1, (__location__ "Integrity was requested but client "
"failed to negotiate signing.\n"));
return NT_STATUS_ACCESS_DENIED;
}
- if (do_seal && !auth_ntlmssp_negotiated_seal(ctx)) {
+ if (do_seal && !gensec_have_feature(ctx->gensec_security, GENSEC_FEATURE_SEAL)) {
DEBUG(1, (__location__ "Privacy was requested but client "
"failed to negotiate sealing.\n"));
return NT_STATUS_ACCESS_DENIED;
}
if (ec->es->smb_enc_type == SMB_TRANS_ENC_NTLM) {
- if (!auth_ntlmssp_negotiated_sign((ec->auth_ntlmssp_state))) {
+ if (!gensec_have_feature(ec->auth_ntlmssp_state->gensec_security, GENSEC_FEATURE_SIGN)) {
return NT_STATUS_INVALID_PARAMETER;
}
- if (!auth_ntlmssp_negotiated_seal((ec->auth_ntlmssp_state))) {
+ if (!gensec_have_feature(ec->auth_ntlmssp_state->gensec_security, GENSEC_FEATURE_SEAL)) {
return NT_STATUS_INVALID_PARAMETER;
}
}