diff options
author | Jeremy Allison <jra@samba.org> | 2008-08-22 13:49:46 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2008-08-22 13:49:46 -0700 |
commit | 4a5ccfb91f8d427fe9fa83cab992587fe6ce70c7 (patch) | |
tree | ff3eaa2baf33767137a627674bd766d1231de609 | |
parent | 5571bd29131ae8b27c25b478e2dd831aef99580c (diff) | |
download | samba-4a5ccfb91f8d427fe9fa83cab992587fe6ce70c7.tar.gz samba-4a5ccfb91f8d427fe9fa83cab992587fe6ce70c7.tar.bz2 samba-4a5ccfb91f8d427fe9fa83cab992587fe6ce70c7.zip |
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 used to be commit dca827791276906436452c650062164eb819dfe0)
-rw-r--r-- | source3/smbd/sesssetup.c | 23 | ||||
-rw-r--r-- | source3/winbindd/winbindd_cm.c | 3 |
2 files changed, 16 insertions, 10 deletions
diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c index 041596b953..9c9d0a97bc 100644 --- a/source3/smbd/sesssetup.c +++ b/source3/smbd/sesssetup.c @@ -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); diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c index 6db45f72c3..a8c0166d27 100644 --- a/source3/winbindd/winbindd_cm.c +++ b/source3/winbindd/winbindd_cm.c @@ -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, ""))) { |