diff options
author | Simo Sorce <idra@samba.org> | 2010-07-19 13:48:31 -0400 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2010-07-19 13:48:31 -0400 |
commit | f9f3358348229b14d368316e327cfd2a4cb48c7c (patch) | |
tree | 9fb61c2ed61dd1ff93a64fc4498a4ec8d3a0607d /source3/smbd | |
parent | 7e4de49bfceed18c81abf93703a61d0a22617a24 (diff) | |
parent | 630a2eb68af0d523a1bb4451bbaa75d2ba47d252 (diff) | |
download | samba-f9f3358348229b14d368316e327cfd2a4cb48c7c.tar.gz samba-f9f3358348229b14d368316e327cfd2a4cb48c7c.tar.bz2 samba-f9f3358348229b14d368316e327cfd2a4cb48c7c.zip |
Merge branch 'master' of ssh://git.samba.org/data/git/samba
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/negprot.c | 3 | ||||
-rw-r--r-- | source3/smbd/password.c | 2 | ||||
-rw-r--r-- | source3/smbd/seal.c | 2 | ||||
-rw-r--r-- | source3/smbd/server_exit.c | 3 | ||||
-rw-r--r-- | source3/smbd/sesssetup.c | 11 | ||||
-rw-r--r-- | source3/smbd/smb2_sesssetup.c | 18 |
6 files changed, 18 insertions, 21 deletions
diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c index 755d3d9718..4d73216854 100644 --- a/source3/smbd/negprot.c +++ b/source3/smbd/negprot.c @@ -33,8 +33,7 @@ static void get_challenge(struct smbd_server_connection *sconn, uint8 buff[8]) if (sconn->smb1.negprot.auth_context) { DEBUG(3, ("get challenge: is this a secondary negprot? " "sconn->negprot.auth_context is non-NULL!\n")); - sconn->smb1.negprot.auth_context->free( - &sconn->smb1.negprot.auth_context); + TALLOC_FREE(sconn->smb1.negprot.auth_context); } DEBUG(10, ("get challenge: creating negprot_global_auth_context\n")); diff --git a/source3/smbd/password.c b/source3/smbd/password.c index 2bd333ab30..996417b51e 100644 --- a/source3/smbd/password.c +++ b/source3/smbd/password.c @@ -120,7 +120,7 @@ void invalidate_vuid(struct smbd_server_connection *sconn, uint16 vuid) session_yield(vuser); if (vuser->auth_ntlmssp_state) { - auth_ntlmssp_end(&vuser->auth_ntlmssp_state); + TALLOC_FREE(vuser->auth_ntlmssp_state); } DLIST_REMOVE(sconn->smb1.sessions.validated_users, vuser); diff --git a/source3/smbd/seal.c b/source3/smbd/seal.c index 171e809b44..ad785a4588 100644 --- a/source3/smbd/seal.c +++ b/source3/smbd/seal.c @@ -101,7 +101,7 @@ static void destroy_auth_ntlmssp(struct smb_srv_trans_enc_ctx *ec) */ if (ec->auth_ntlmssp_state) { - auth_ntlmssp_end(&ec->auth_ntlmssp_state); + TALLOC_FREE(ec->auth_ntlmssp_state); /* The auth_ntlmssp_end killed this already. */ ec->es->s.ntlmssp_state = NULL; } diff --git a/source3/smbd/server_exit.c b/source3/smbd/server_exit.c index 97394aea96..1a330994b8 100644 --- a/source3/smbd/server_exit.c +++ b/source3/smbd/server_exit.c @@ -75,8 +75,7 @@ static void exit_server_common(enum server_exit_reason how, change_to_root_user(); if (sconn && sconn->smb1.negprot.auth_context) { - struct auth_context *a = sconn->smb1.negprot.auth_context; - a->free(&sconn->smb1.negprot.auth_context); + TALLOC_FREE(sconn->smb1.negprot.auth_context); } if (lp_log_writeable_files_on_exit()) { diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c index 52fcd282a6..27eb4f6c48 100644 --- a/source3/smbd/sesssetup.c +++ b/source3/smbd/sesssetup.c @@ -150,14 +150,14 @@ static NTSTATUS check_guest_password(struct auth_serversupplied_info **server_in } if (!make_user_info_guest(&user_info)) { - (auth_context->free)(&auth_context); + TALLOC_FREE(auth_context); return NT_STATUS_NO_MEMORY; } nt_status = auth_context->check_ntlm_password(auth_context, user_info, server_info); - (auth_context->free)(&auth_context); + TALLOC_FREE(auth_context); free_user_info(&user_info); return nt_status; } @@ -708,7 +708,7 @@ static void reply_spnego_ntlmssp(struct smb_request *req, if (!NT_STATUS_EQUAL(nt_status, NT_STATUS_MORE_PROCESSING_REQUIRED)) { /* NB. This is *NOT* an error case. JRA */ if (do_invalidate) { - auth_ntlmssp_end(auth_ntlmssp_state); + TALLOC_FREE(*auth_ntlmssp_state); if (!NT_STATUS_IS_OK(nt_status)) { /* Kill the intermediate vuid */ invalidate_vuid(sconn, vuid); @@ -828,7 +828,7 @@ static void reply_spnego_negotiate(struct smb_request *req, #endif if (*auth_ntlmssp_state) { - auth_ntlmssp_end(auth_ntlmssp_state); + TALLOC_FREE(*auth_ntlmssp_state); } if (kerb_mech) { @@ -1751,8 +1751,7 @@ void reply_sesssetup_and_X(struct smb_request *req) user_info, &server_info); - (plaintext_auth_context->free)( - &plaintext_auth_context); + TALLOC_FREE(plaintext_auth_context); } } } diff --git a/source3/smbd/smb2_sesssetup.c b/source3/smbd/smb2_sesssetup.c index 493e74802d..4d0f03259b 100644 --- a/source3/smbd/smb2_sesssetup.c +++ b/source3/smbd/smb2_sesssetup.c @@ -550,7 +550,7 @@ static NTSTATUS smbd_smb2_spnego_negotiate(struct smbd_smb2_session *session, NTSTATUS status; /* Ensure we have no old NTLM state around. */ - auth_ntlmssp_end(&session->auth_ntlmssp_state); + TALLOC_FREE(session->auth_ntlmssp_state); status = parse_spnego_mechanisms(in_security_buffer, &secblob_in, &kerb_mech); @@ -621,7 +621,7 @@ static NTSTATUS smbd_smb2_spnego_negotiate(struct smbd_smb2_session *session, if (!NT_STATUS_IS_OK(status) && !NT_STATUS_EQUAL(status, NT_STATUS_MORE_PROCESSING_REQUIRED)) { - auth_ntlmssp_end(&session->auth_ntlmssp_state); + TALLOC_FREE(session->auth_ntlmssp_state); TALLOC_FREE(session); } return status; @@ -653,7 +653,7 @@ static NTSTATUS smbd_smb2_common_ntlmssp_auth_return(struct smbd_smb2_session *s session->compat_vuser = talloc_zero(session, user_struct); if (session->compat_vuser == NULL) { - auth_ntlmssp_end(&session->auth_ntlmssp_state); + TALLOC_FREE(session->auth_ntlmssp_state); TALLOC_FREE(session); return NT_STATUS_NO_MEMORY; } @@ -682,7 +682,7 @@ static NTSTATUS smbd_smb2_common_ntlmssp_auth_return(struct smbd_smb2_session *s DEBUG(1, ("smb2: Failed to claim session " "for vuid=%d\n", session->compat_vuser->vuid)); - auth_ntlmssp_end(&session->auth_ntlmssp_state); + TALLOC_FREE(session->auth_ntlmssp_state); TALLOC_FREE(session); return NT_STATUS_LOGON_FAILURE; } @@ -793,7 +793,7 @@ static NTSTATUS smbd_smb2_spnego_auth(struct smbd_smb2_session *session, if (!NT_STATUS_IS_OK(status) && !NT_STATUS_EQUAL(status, NT_STATUS_MORE_PROCESSING_REQUIRED)) { - auth_ntlmssp_end(&session->auth_ntlmssp_state); + TALLOC_FREE(session->auth_ntlmssp_state); data_blob_free(&auth); TALLOC_FREE(session); return status; @@ -808,7 +808,7 @@ static NTSTATUS smbd_smb2_spnego_auth(struct smbd_smb2_session *session, secblob_out.data, secblob_out.length); if (secblob_out.data && out_security_buffer->data == NULL) { - auth_ntlmssp_end(&session->auth_ntlmssp_state); + TALLOC_FREE(session->auth_ntlmssp_state); TALLOC_FREE(session); return NT_STATUS_NO_MEMORY; } @@ -858,7 +858,7 @@ static NTSTATUS smbd_smb2_raw_ntlmssp_auth(struct smbd_smb2_session *session, secblob_out.data, secblob_out.length); if (secblob_out.data && out_security_buffer->data == NULL) { - auth_ntlmssp_end(&session->auth_ntlmssp_state); + TALLOC_FREE(session->auth_ntlmssp_state); TALLOC_FREE(session); return NT_STATUS_NO_MEMORY; } @@ -872,7 +872,7 @@ static NTSTATUS smbd_smb2_raw_ntlmssp_auth(struct smbd_smb2_session *session, status = setup_ntlmssp_server_info(session, status); if (!NT_STATUS_IS_OK(status)) { - auth_ntlmssp_end(&session->auth_ntlmssp_state); + TALLOC_FREE(session->auth_ntlmssp_state); TALLOC_FREE(session); return status; } @@ -971,7 +971,7 @@ static NTSTATUS smbd_smb2_session_setup(struct smbd_smb2_request *smb2req, /* Unknown packet type. */ DEBUG(1,("Unknown packet type %u in smb2 sessionsetup\n", (unsigned int)in_security_buffer.data[0] )); - auth_ntlmssp_end(&session->auth_ntlmssp_state); + TALLOC_FREE(session->auth_ntlmssp_state); TALLOC_FREE(session); return NT_STATUS_LOGON_FAILURE; } |