diff options
author | Stefan Metzmacher <metze@samba.org> | 2013-12-13 19:56:13 +0100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2014-03-27 00:36:32 +0100 |
commit | 2103c373b44871810197fa8e423f55a659a8b89d (patch) | |
tree | 9a4d00a7b35b21fc9ddf9a9a667b3e5255019de0 /source3 | |
parent | 01575faf678d4280733c2a4c657e370b9b847b69 (diff) | |
download | samba-2103c373b44871810197fa8e423f55a659a8b89d.tar.gz samba-2103c373b44871810197fa8e423f55a659a8b89d.tar.xz samba-2103c373b44871810197fa8e423f55a659a8b89d.zip |
auth/gensec: remove tevent_context argument from gensec_update()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/libads/authdata.c | 2 | ||||
-rw-r--r-- | source3/libads/sasl.c | 2 | ||||
-rw-r--r-- | source3/libsmb/clifsinfo.c | 6 | ||||
-rw-r--r-- | source3/rpc_client/cli_pipe.c | 4 | ||||
-rw-r--r-- | source3/rpc_server/dcesrv_auth_generic.c | 4 | ||||
-rw-r--r-- | source3/smbd/negprot.c | 2 | ||||
-rw-r--r-- | source3/smbd/seal.c | 2 | ||||
-rw-r--r-- | source3/smbd/sesssetup.c | 2 | ||||
-rw-r--r-- | source3/torture/test_smb2.c | 30 | ||||
-rw-r--r-- | source3/utils/ntlm_auth.c | 2 | ||||
-rw-r--r-- | source3/winbindd/winbindd_ccache_access.c | 4 |
11 files changed, 35 insertions, 25 deletions
diff --git a/source3/libads/authdata.c b/source3/libads/authdata.c index 276408d880..18a2e4fccc 100644 --- a/source3/libads/authdata.c +++ b/source3/libads/authdata.c @@ -276,7 +276,7 @@ NTSTATUS kerberos_return_pac(TALLOC_CTX *mem_ctx, } /* Do a client-server update dance */ - status = gensec_update(gensec_server_context, tmp_ctx, NULL, tkt_wrapped, &ap_rep); + status = gensec_update(gensec_server_context, tmp_ctx, tkt_wrapped, &ap_rep); if (!NT_STATUS_IS_OK(status)) { DEBUG(1, ("gensec_update() failed: %s\n", nt_errstr(status))); goto out; diff --git a/source3/libads/sasl.c b/source3/libads/sasl.c index 33f4e24191..6890fb27a7 100644 --- a/source3/libads/sasl.c +++ b/source3/libads/sasl.c @@ -177,7 +177,7 @@ static ADS_STATUS ads_sasl_spnego_ntlmssp_bind(ADS_STRUCT *ads) do { nt_status = gensec_update(auth_generic_state->gensec_security, - talloc_tos(), NULL, blob_in, &blob_out); + talloc_tos(), blob_in, &blob_out); data_blob_free(&blob_in); if ((NT_STATUS_EQUAL(nt_status, NT_STATUS_MORE_PROCESSING_REQUIRED) || NT_STATUS_IS_OK(nt_status)) diff --git a/source3/libsmb/clifsinfo.c b/source3/libsmb/clifsinfo.c index d7ac906b00..376c4f5d5b 100644 --- a/source3/libsmb/clifsinfo.c +++ b/source3/libsmb/clifsinfo.c @@ -615,7 +615,7 @@ NTSTATUS cli_raw_ntlm_smb_encryption_start(struct cli_state *cli, do { status = gensec_update(auth_generic_state->gensec_security, auth_generic_state, - NULL, blob_in, &blob_out); + blob_in, &blob_out); data_blob_free(&blob_in); data_blob_free(¶m_out); if (NT_STATUS_EQUAL(status, NT_STATUS_MORE_PROCESSING_REQUIRED) || NT_STATUS_IS_OK(status)) { @@ -700,7 +700,7 @@ NTSTATUS cli_gss_smb_encryption_start(struct cli_state *cli) } status = gensec_update(auth_generic_state->gensec_security, talloc_tos(), - NULL, blob_recv, &blob_send); + blob_recv, &blob_send); do { data_blob_free(&blob_recv); @@ -710,7 +710,7 @@ NTSTATUS cli_gss_smb_encryption_start(struct cli_state *cli) } data_blob_free(&blob_send); status = gensec_update(auth_generic_state->gensec_security, talloc_tos(), - NULL, blob_recv, &blob_send); + blob_recv, &blob_send); } while (NT_STATUS_EQUAL(status, NT_STATUS_MORE_PROCESSING_REQUIRED)); data_blob_free(&blob_recv); diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c index 0def81727a..cd783f2568 100644 --- a/source3/rpc_client/cli_pipe.c +++ b/source3/rpc_client/cli_pipe.c @@ -1011,7 +1011,7 @@ static NTSTATUS create_generic_auth_rpc_bind_req(struct rpc_pipe_client *cli, struct gensec_security); DEBUG(5, ("create_generic_auth_rpc_bind_req: generate first token\n")); - status = gensec_update(gensec_security, mem_ctx, NULL, null_blob, auth_token); + status = gensec_update(gensec_security, mem_ctx, null_blob, auth_token); if (!NT_STATUS_IS_OK(status) && !NT_STATUS_EQUAL(status, NT_STATUS_MORE_PROCESSING_REQUIRED)) @@ -1895,7 +1895,7 @@ static void rpc_pipe_bind_step_one_done(struct tevent_req *subreq) } } - status = gensec_update(gensec_security, state, NULL, + status = gensec_update(gensec_security, state, auth.credentials, &auth_token); if (NT_STATUS_EQUAL(status, NT_STATUS_MORE_PROCESSING_REQUIRED)) { diff --git a/source3/rpc_server/dcesrv_auth_generic.c b/source3/rpc_server/dcesrv_auth_generic.c index 77d76fc6c3..116512172d 100644 --- a/source3/rpc_server/dcesrv_auth_generic.c +++ b/source3/rpc_server/dcesrv_auth_generic.c @@ -49,7 +49,7 @@ static NTSTATUS auth_generic_server_authtype_start_as_root(TALLOC_CTX *mem_ctx, return status; } - status = gensec_update(gensec_security, mem_ctx, NULL, *token_in, token_out); + status = gensec_update(gensec_security, mem_ctx, *token_in, token_out); if (!NT_STATUS_IS_OK(status) && !NT_STATUS_EQUAL(status, NT_STATUS_MORE_PROCESSING_REQUIRED)) { DEBUG(2, (__location__ ": gensec_update failed: %s\n", nt_errstr(status))); @@ -92,7 +92,7 @@ NTSTATUS auth_generic_server_step(struct gensec_security *gensec_security, /* this has to be done as root in order to verify the password */ become_root(); - status = gensec_update(gensec_security, mem_ctx, NULL, *token_in, token_out); + status = gensec_update(gensec_security, mem_ctx, *token_in, token_out); unbecome_root(); return status; diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c index bd7df2231e..f470d0b057 100644 --- a/source3/smbd/negprot.c +++ b/source3/smbd/negprot.c @@ -177,7 +177,7 @@ DATA_BLOB negprot_spnego(TALLOC_CTX *ctx, struct smbd_server_connection *sconn) status = gensec_start_mech_by_oid(gensec_security, GENSEC_OID_SPNEGO); if (NT_STATUS_IS_OK(status)) { status = gensec_update(gensec_security, ctx, - NULL, data_blob_null, &blob); + data_blob_null, &blob); /* If we get the list of OIDs, the 'OK' answer * is NT_STATUS_MORE_PROCESSING_REQUIRED */ if (!NT_STATUS_EQUAL(status, NT_STATUS_MORE_PROCESSING_REQUIRED)) { diff --git a/source3/smbd/seal.c b/source3/smbd/seal.c index cdcfe06835..bb9bb08350 100644 --- a/source3/smbd/seal.c +++ b/source3/smbd/seal.c @@ -225,7 +225,7 @@ NTSTATUS srv_request_encryption_setup(connection_struct *conn, /* Second step. */ become_root(); status = gensec_update(es->gensec_security, - talloc_tos(), NULL, + talloc_tos(), blob, &response); unbecome_root(); if (!NT_STATUS_EQUAL(status, NT_STATUS_MORE_PROCESSING_REQUIRED) && diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c index 4b86a99522..cf5c9f0d0e 100644 --- a/source3/smbd/sesssetup.c +++ b/source3/smbd/sesssetup.c @@ -258,7 +258,7 @@ static void reply_sesssetup_and_X_spnego(struct smb_request *req) become_root(); status = gensec_update(session->gensec, - talloc_tos(), NULL, + talloc_tos(), in_blob, &out_blob); unbecome_root(); if (!NT_STATUS_IS_OK(status) && diff --git a/source3/torture/test_smb2.c b/source3/torture/test_smb2.c index 8cb103163f..1923668a15 100644 --- a/source3/torture/test_smb2.c +++ b/source3/torture/test_smb2.c @@ -440,7 +440,8 @@ bool run_smb2_session_reconnect(int dummy) return false; } - status = gensec_update(auth_generic_state->gensec_security, talloc_tos(), ev, data_blob_null, &in_blob); + status = gensec_update(auth_generic_state->gensec_security, + talloc_tos(), data_blob_null, &in_blob); if (!NT_STATUS_EQUAL(status, NT_STATUS_MORE_PROCESSING_REQUIRED)) { printf("gensec_update returned %s\n", nt_errstr(status)); return false; @@ -477,7 +478,8 @@ bool run_smb2_session_reconnect(int dummy) return false; } - status = gensec_update(auth_generic_state->gensec_security, talloc_tos(), ev, out_blob, &in_blob); + status = gensec_update(auth_generic_state->gensec_security, + talloc_tos(), out_blob, &in_blob); if (!NT_STATUS_IS_OK(status)) { printf("auth_generic_update returned %s\n", nt_errstr(status)); return false; @@ -953,7 +955,8 @@ bool run_smb2_multi_channel(int dummy) return false; } - status = gensec_update(auth_generic_state->gensec_security, talloc_tos(), ev, data_blob_null, &in_blob); + status = gensec_update(auth_generic_state->gensec_security, + talloc_tos(), data_blob_null, &in_blob); if (!NT_STATUS_EQUAL(status, NT_STATUS_MORE_PROCESSING_REQUIRED)) { printf("gensec_update returned %s\n", nt_errstr(status)); return false; @@ -987,7 +990,8 @@ bool run_smb2_multi_channel(int dummy) return false; } - status = gensec_update(auth_generic_state->gensec_security, talloc_tos(), ev, out_blob, &in_blob); + status = gensec_update(auth_generic_state->gensec_security, + talloc_tos(), out_blob, &in_blob); if (!NT_STATUS_IS_OK(status)) { printf("auth_generic_update returned %s\n", nt_errstr(status)); return false; @@ -1079,7 +1083,8 @@ bool run_smb2_multi_channel(int dummy) return false; } - status = gensec_update(auth_generic_state->gensec_security, talloc_tos(), ev, data_blob_null, &in_blob); + status = gensec_update(auth_generic_state->gensec_security, + talloc_tos(), data_blob_null, &in_blob); if (!NT_STATUS_EQUAL(status, NT_STATUS_MORE_PROCESSING_REQUIRED)) { printf("gensec_update returned %s\n", nt_errstr(status)); return false; @@ -1113,7 +1118,8 @@ bool run_smb2_multi_channel(int dummy) return false; } - status = gensec_update(auth_generic_state->gensec_security, talloc_tos(), ev, out_blob, &in_blob); + status = gensec_update(auth_generic_state->gensec_security, + talloc_tos(), out_blob, &in_blob); if (!NT_STATUS_IS_OK(status)) { printf("auth_generic_update returned %s\n", nt_errstr(status)); return false; @@ -1263,7 +1269,8 @@ bool run_smb2_multi_channel(int dummy) return false; } - status = gensec_update(auth_generic_state->gensec_security, talloc_tos(), ev, data_blob_null, &in_blob); + status = gensec_update(auth_generic_state->gensec_security, + talloc_tos(), data_blob_null, &in_blob); if (!NT_STATUS_EQUAL(status, NT_STATUS_MORE_PROCESSING_REQUIRED)) { printf("gensec_update returned %s\n", nt_errstr(status)); return false; @@ -1297,7 +1304,8 @@ bool run_smb2_multi_channel(int dummy) return false; } - status = gensec_update(auth_generic_state->gensec_security, talloc_tos(), ev, out_blob, &in_blob); + status = gensec_update(auth_generic_state->gensec_security, + talloc_tos(), out_blob, &in_blob); if (!NT_STATUS_IS_OK(status)) { printf("auth_generic_update returned %s\n", nt_errstr(status)); return false; @@ -1578,7 +1586,8 @@ bool run_smb2_session_reauth(int dummy) return false; } - status = gensec_update(auth_generic_state->gensec_security, talloc_tos(), ev, data_blob_null, &in_blob); + status = gensec_update(auth_generic_state->gensec_security, + talloc_tos(), data_blob_null, &in_blob); if (!NT_STATUS_EQUAL(status, NT_STATUS_MORE_PROCESSING_REQUIRED)) { printf("gensec_update returned %s\n", nt_errstr(status)); return false; @@ -1612,7 +1621,8 @@ bool run_smb2_session_reauth(int dummy) return false; } - status = gensec_update(auth_generic_state->gensec_security, talloc_tos(), ev, out_blob, &in_blob); + status = gensec_update(auth_generic_state->gensec_security, + talloc_tos(), out_blob, &in_blob); if (!NT_STATUS_IS_OK(status)) { printf("auth_generic_update returned %s\n", nt_errstr(status)); return false; diff --git a/source3/utils/ntlm_auth.c b/source3/utils/ntlm_auth.c index 1df615c1e7..f0cd24bf58 100644 --- a/source3/utils/ntlm_auth.c +++ b/source3/utils/ntlm_auth.c @@ -1631,7 +1631,7 @@ static void manage_gensec_request(enum stdio_helper_mode stdio_helper_mode, return; } - nt_status = gensec_update(state->gensec_state, mem_ctx, NULL, in, &out); + nt_status = gensec_update(state->gensec_state, mem_ctx, in, &out); /* don't leak 'bad password'/'no such user' info to the network client */ nt_status = nt_status_squash(nt_status); diff --git a/source3/winbindd/winbindd_ccache_access.c b/source3/winbindd/winbindd_ccache_access.c index 7787b3e007..7e300dbe92 100644 --- a/source3/winbindd/winbindd_ccache_access.c +++ b/source3/winbindd/winbindd_ccache_access.c @@ -109,7 +109,7 @@ static NTSTATUS do_ntlm_auth_with_stored_pw(const char *username, dummy_msg = data_blob_null; reply = data_blob_null; status = gensec_update(auth_generic_state->gensec_security, - talloc_tos(), NULL, dummy_msg, &reply); + talloc_tos(), dummy_msg, &reply); data_blob_free(&reply); if (!NT_STATUS_EQUAL(status, NT_STATUS_MORE_PROCESSING_REQUIRED)) { @@ -120,7 +120,7 @@ static NTSTATUS do_ntlm_auth_with_stored_pw(const char *username, /* Now we are ready to handle the server's actual response. */ status = gensec_update(auth_generic_state->gensec_security, - NULL, NULL, challenge_msg, &reply); + NULL, challenge_msg, &reply); if (!NT_STATUS_EQUAL(status, NT_STATUS_OK)) { DEBUG(1, ("We didn't get a response to the challenge! [%s]\n", nt_errstr(status))); |