The branch, v3-6-test has been updated via 91447e8 s3: Use the correct guest_login field in auth_server via cce5009 s3: Extract the guest_login field in sesssetup (cherry picked from commit 01386ff3132ff5c786e83fc24328a80661de6bb7) via 1afd581 s3: Fix wct check in cli_sesssetup_blob_done (cherry picked from commit 4ec00fd621e944ff979e9f0a20773202d8c66472) from a701f8f WHATSNEW: Update changes since rc1.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test - Log ----------------------------------------------------------------- commit 91447e8b49e27b9e2d76cf8f99efdc1faca49fc4 Author: Volker Lendecke <v...@samba.org> Date: Sun May 29 10:58:46 2011 +0200 s3: Use the correct guest_login field in auth_server Autobuild-User: Volker Lendecke <vlen...@samba.org> Autobuild-Date: Sun May 29 13:57:21 CEST 2011 on sn-devel-104 (cherry picked from commit 0969c3398e73e66c9e004740127da7c29e951050) The last 3 patches address bug #8185 (security=server does not obey guest login field). commit cce50095eaf4e0c040a4b1262b46d16890f6865a Author: Volker Lendecke <v...@samba.org> Date: Sun May 29 10:58:05 2011 +0200 s3: Extract the guest_login field in sesssetup (cherry picked from commit 01386ff3132ff5c786e83fc24328a80661de6bb7) commit 1afd58160f264079b9c25a1603590c72f68993fc Author: Volker Lendecke <v...@samba.org> Date: Sun May 29 10:56:39 2011 +0200 s3: Fix wct check in cli_sesssetup_blob_done (cherry picked from commit 4ec00fd621e944ff979e9f0a20773202d8c66472) ----------------------------------------------------------------------- Summary of changes: source3/auth/auth_server.c | 2 +- source3/include/client.h | 1 + source3/libsmb/cliconnect.c | 23 ++++++++++++++++++----- 3 files changed, 20 insertions(+), 6 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/auth/auth_server.c b/source3/auth/auth_server.c index 94530ab..1dfa646 100644 --- a/source3/auth/auth_server.c +++ b/source3/auth/auth_server.c @@ -427,7 +427,7 @@ use this machine as the password server.\n")); } /* if logged in as guest then reject */ - if ((SVAL(cli->inbuf,smb_vwv2) & 1) != 0) { + if (cli->is_guestlogin) { DEBUG(1,("password server %s gave us guest only\n", cli->desthost)); nt_status = NT_STATUS_LOGON_FAILURE; } diff --git a/source3/include/client.h b/source3/include/client.h index b51da90..7d66bf9 100644 --- a/source3/include/client.h +++ b/source3/include/client.h @@ -109,6 +109,7 @@ struct cli_state { int initialised; int win95; bool is_samba; + bool is_guestlogin; uint32 capabilities; /* What the server offered. */ uint32_t server_posix_capabilities; diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index 11062ef..b812581 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -259,8 +259,10 @@ static void cli_session_setup_lanman2_done(struct tevent_req *subreq) uint8_t *p; NTSTATUS status; ssize_t ret; + uint8_t wct; + uint16_t *vwv; - status = cli_smb_recv(subreq, state, &in, 0, NULL, NULL, + status = cli_smb_recv(subreq, state, &in, 3, &wct, &vwv, &num_bytes, &bytes); TALLOC_FREE(subreq); if (!NT_STATUS_IS_OK(status)) { @@ -272,6 +274,7 @@ static void cli_session_setup_lanman2_done(struct tevent_req *subreq) p = bytes; cli->vuid = SVAL(inbuf, smb_uid); + cli->is_guestlogin = ((SVAL(vwv+2, 0) & 1) != 0); status = smb_bytes_talloc_string(cli, inbuf, @@ -487,8 +490,10 @@ static void cli_session_setup_guest_done(struct tevent_req *subreq) uint8_t *p; NTSTATUS status; ssize_t ret; + uint8_t wct; + uint16_t *vwv; - status = cli_smb_recv(subreq, state, &in, 0, NULL, NULL, + status = cli_smb_recv(subreq, state, &in, 3, &wct, &vwv, &num_bytes, &bytes); TALLOC_FREE(subreq); if (!NT_STATUS_IS_OK(status)) { @@ -500,6 +505,7 @@ static void cli_session_setup_guest_done(struct tevent_req *subreq) p = bytes; cli->vuid = SVAL(inbuf, smb_uid); + cli->is_guestlogin = ((SVAL(vwv+2, 0) & 1) != 0); status = smb_bytes_talloc_string(cli, inbuf, @@ -695,8 +701,10 @@ static void cli_session_setup_plain_done(struct tevent_req *subreq) uint8_t *p; NTSTATUS status; ssize_t ret; + uint8_t wct; + uint16_t *vwv; - status = cli_smb_recv(subreq, state, &in, 0, NULL, NULL, + status = cli_smb_recv(subreq, state, &in, 3, &wct, &vwv, &num_bytes, &bytes); TALLOC_FREE(subreq); if (tevent_req_nterror(req, status)) { @@ -707,6 +715,7 @@ static void cli_session_setup_plain_done(struct tevent_req *subreq) p = bytes; cli->vuid = SVAL(inbuf, smb_uid); + cli->is_guestlogin = ((SVAL(vwv+2, 0) & 1) != 0); status = smb_bytes_talloc_string(cli, inbuf, @@ -1051,8 +1060,10 @@ static void cli_session_setup_nt1_done(struct tevent_req *subreq) uint8_t *p; NTSTATUS status; ssize_t ret; + uint8_t wct; + uint16_t *vwv; - status = cli_smb_recv(subreq, state, &in, 0, NULL, NULL, + status = cli_smb_recv(subreq, state, &in, 3, &wct, &vwv, &num_bytes, &bytes); TALLOC_FREE(subreq); if (!NT_STATUS_IS_OK(status)) { @@ -1064,6 +1075,7 @@ static void cli_session_setup_nt1_done(struct tevent_req *subreq) p = bytes; cli->vuid = SVAL(inbuf, smb_uid); + cli->is_guestlogin = ((SVAL(vwv+2, 0) & 1) != 0); status = smb_bytes_talloc_string(cli, inbuf, @@ -1291,7 +1303,7 @@ static void cli_sesssetup_blob_done(struct tevent_req *subreq) uint8_t *inbuf; ssize_t ret; - status = cli_smb_recv(subreq, state, &inbuf, 1, &wct, &vwv, + status = cli_smb_recv(subreq, state, &inbuf, 4, &wct, &vwv, &num_bytes, &bytes); TALLOC_FREE(subreq); if (!NT_STATUS_IS_OK(status) @@ -1305,6 +1317,7 @@ static void cli_sesssetup_blob_done(struct tevent_req *subreq) state->inbuf = (char *)inbuf; cli->vuid = SVAL(state->inbuf, smb_uid); + cli->is_guestlogin = ((SVAL(vwv+2, 0) & 1) != 0); blob_length = SVAL(vwv+3, 0); if (blob_length > num_bytes) { -- Samba Shared Repository