s3-ntlmssp Remove auth_ntlmssp_negotiated_sign() and auth_ntlmssp_negotiated_seal()
authorAndrew Bartlett <abartlet@samba.org>
Tue, 18 Oct 2011 10:20:01 +0000 (21:20 +1100)
committerStefan Metzmacher <metze@samba.org>
Fri, 21 Oct 2011 06:43:18 +0000 (08:43 +0200)
We now just call the gensec_have_feature() directly.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
source3/include/ntlmssp_wrap.h
source3/libsmb/ntlmssp_wrap.c
source3/rpc_server/dcesrv_ntlmssp.c
source3/smbd/seal.c

index 71fa3b73709fd5787f97b77cb4ad6a1073c78535..a2c4f7a6be47bb3eb25ab2e0e7b6ddd0b5547d22 100644 (file)
@@ -60,8 +60,6 @@ NTSTATUS auth_ntlmssp_unseal_packet(struct auth_ntlmssp_state *ans,
                                    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,
index af5f2c9f68637ad3483325fe4acb59db2d327414..e18a60b730da63d70ab46f845dad019cf3730b6e 100644 (file)
@@ -72,16 +72,6 @@ NTSTATUS auth_ntlmssp_unseal_packet(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)
 {
index dcbfafb1c21698494a85635bb4a278b7a390a8b4..221b3bfbbe1825ad08a8e7d5b73ea1d86d7e02c7 100644 (file)
@@ -97,13 +97,13 @@ NTSTATUS ntlmssp_server_step(struct auth_ntlmssp_state *ctx,
 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;
index 73efc6ceff7571ea2e0c52ba73908d326f9abb62..f1508d4d4f858bd3110d8000653ccc6d2152b1e4 100644 (file)
@@ -761,11 +761,11 @@ static NTSTATUS check_enc_good(struct smb_srv_trans_enc_ctx *ec)
        }
 
        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;
                }
        }