The branch, master has been updated
       via  8c41795 s3-libsmb: Duplicate the memory before we free it.
       via  206f25d s3-libsmb: Set the netbios_name in use_ccache case too.
       via  1e148a9 s3-lib: Do not require a password with --use-ccache.
      from  1e32ada tdb: version 1.3.3

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 8c41795c81d85114e383e694ba7421e95bacb912
Author: Andreas Schneider <a...@samba.org>
Date:   Fri Nov 14 10:05:13 2014 +0100

    s3-libsmb: Duplicate the memory before we free it.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=10279
    
    Signed-off-by: Andreas Schneider <a...@samba.org>
    Reviewed-by: Guenther Deschner <g...@samba.org>
    
    Autobuild-User(master): Andreas Schneider <a...@cryptomilk.org>
    Autobuild-Date(master): Tue Dec  2 21:46:53 CET 2014 on sn-devel-104

commit 206f25d815024248214f076fd60c35862e9de8a1
Author: Andreas Schneider <a...@samba.org>
Date:   Fri Nov 14 10:03:07 2014 +0100

    s3-libsmb: Set the netbios_name in use_ccache case too.
    
    If we do not set the netbios_name we are not able to connect to a
    Windows DC.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=10279
    
    Signed-off-by: Andreas Schneider <a...@samba.org>
    Reviewed-by: Guenther Deschner <g...@samba.org>

commit 1e148a91fd20053f823b57e19d757665fa30c53d
Author: Andreas Schneider <a...@samba.org>
Date:   Fri Nov 14 09:31:51 2014 +0100

    s3-lib: Do not require a password with --use-ccache.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=10279
    
    Signed-off-by: Andreas Schneider <a...@samba.org>
    Reviewed-by: Guenther Deschner <g...@samba.org>

-----------------------------------------------------------------------

Summary of changes:
 source3/lib/util_cmdline.c                |  3 ++-
 source3/libsmb/ntlmssp.c                  | 18 +++++++++++++++---
 source3/script/tests/test_smbclient_s3.sh |  4 ++--
 3 files changed, 19 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/util_cmdline.c b/source3/lib/util_cmdline.c
index d15f325..80c3ecd 100644
--- a/source3/lib/util_cmdline.c
+++ b/source3/lib/util_cmdline.c
@@ -251,7 +251,8 @@ void set_cmdline_auth_info_getpass(struct user_auth_info 
*auth_info)
        TALLOC_CTX *frame;
 
        if (get_cmdline_auth_info_got_pass(auth_info) ||
-                       get_cmdline_auth_info_use_kerberos(auth_info)) {
+           get_cmdline_auth_info_use_ccache(auth_info) ||
+           get_cmdline_auth_info_use_kerberos(auth_info)) {
                /* Already got one... */
                return;
        }
diff --git a/source3/libsmb/ntlmssp.c b/source3/libsmb/ntlmssp.c
index e8c9ebf..617b34b 100644
--- a/source3/libsmb/ntlmssp.c
+++ b/source3/libsmb/ntlmssp.c
@@ -383,6 +383,15 @@ static NTSTATUS ntlmssp3_client_challenge(struct 
ntlmssp_state *ntlmssp_state,
                wbcErr wbc_status;
                int i;
 
+               /*
+                * We need to set the netbios name or we are not able to connect
+                *  a Windows DC.
+                */
+               if (ntlmssp_state->server.netbios_domain == NULL ||
+                   ntlmssp_state->server.netbios_domain[0] == '\0') {
+                       ntlmssp_state->server.netbios_domain = 
ntlmssp_state->domain;
+               }
+
                params.account_name = ntlmssp_state->user;
                params.domain_name = ntlmssp_state->domain;
                params.level = WBC_CREDENTIAL_CACHE_LEVEL_NTLMSSP;
@@ -413,9 +422,12 @@ static NTSTATUS ntlmssp3_client_challenge(struct 
ntlmssp_state *ntlmssp_state,
                        goto noccache;
                }
 
-               *next_request = data_blob(wbc_next->data, wbc_next->length);
-               ntlmssp_state->session_key = data_blob(
-                       wbc_session_key->data, wbc_session_key->length);
+               *next_request = data_blob_talloc(ntlmssp_state,
+                                                wbc_next->data,
+                                                wbc_next->length);
+               ntlmssp_state->session_key = data_blob_talloc(ntlmssp_state,
+                                                             
wbc_session_key->data,
+                                                             
wbc_session_key->length);
 
                wbcFreeMemory(info);
                goto done;
diff --git a/source3/script/tests/test_smbclient_s3.sh 
b/source3/script/tests/test_smbclient_s3.sh
index 67ac94a..f6f3705 100755
--- a/source3/script/tests/test_smbclient_s3.sh
+++ b/source3/script/tests/test_smbclient_s3.sh
@@ -602,7 +602,7 @@ test_ccache_access()
        return
     fi
 
-    $SMBCLIENT //$SERVER_IP/tmp -C -U "${USERNAME}%" \
+    $SMBCLIENT //$SERVER_IP/tmp -C -U "${USERNAME}" \
        -c quit 2>&1
     ret=$?
 
@@ -621,7 +621,7 @@ test_ccache_access()
        return
     fi
 
-    $SMBCLIENT //$SERVER_IP/tmp -C -U "${USERNAME}%" \
+    $SMBCLIENT //$SERVER_IP/tmp -C -U "${USERNAME}" \
        -c quit 2>&1
     ret=$?
 


-- 
Samba Shared Repository

Reply via email to