mirror of
https://github.com/samba-team/samba.git
synced 2025-01-12 09:18:10 +03:00
Don't re-initialize a token when we already have one. This fixes the build farm failures when winbindd connects as guest.
This one took a *lot* of tracking down :-). Jeremy.
This commit is contained in:
parent
25293ba150
commit
dca8277912
@ -1738,16 +1738,19 @@ void reply_sesssetup_and_X(struct smb_request *req)
|
||||
return;
|
||||
}
|
||||
|
||||
nt_status = create_local_token(server_info);
|
||||
if (!NT_STATUS_IS_OK(nt_status)) {
|
||||
DEBUG(10, ("create_local_token failed: %s\n",
|
||||
nt_errstr(nt_status)));
|
||||
data_blob_free(&nt_resp);
|
||||
data_blob_free(&lm_resp);
|
||||
data_blob_clear_free(&plaintext_password);
|
||||
reply_nterror(req, nt_status_squash(nt_status));
|
||||
END_PROFILE(SMBsesssetupX);
|
||||
return;
|
||||
if (!server_info->ptok) {
|
||||
nt_status = create_local_token(server_info);
|
||||
|
||||
if (!NT_STATUS_IS_OK(nt_status)) {
|
||||
DEBUG(10, ("create_local_token failed: %s\n",
|
||||
nt_errstr(nt_status)));
|
||||
data_blob_free(&nt_resp);
|
||||
data_blob_free(&lm_resp);
|
||||
data_blob_clear_free(&plaintext_password);
|
||||
reply_nterror(req, nt_status_squash(nt_status));
|
||||
END_PROFILE(SMBsesssetupX);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
data_blob_clear_free(&plaintext_password);
|
||||
|
@ -937,6 +937,9 @@ static NTSTATUS cm_prepare_connection(const struct winbindd_domain *domain,
|
||||
anon_fallback:
|
||||
|
||||
/* Fall back to anonymous connection, this might fail later */
|
||||
DEBUG(10,("cm_prepare_connection: falling back to anonymous "
|
||||
"connection for DC %s\n",
|
||||
controller ));
|
||||
|
||||
if (NT_STATUS_IS_OK(cli_session_setup(*cli, "", NULL, 0,
|
||||
NULL, 0, ""))) {
|
||||
|
Loading…
Reference in New Issue
Block a user