* BUG 446
authorGerald Carter <jerry@samba.org>
Thu, 15 Jan 2004 19:08:45 +0000 (19:08 +0000)
committerGerald Carter <jerry@samba.org>
Thu, 15 Jan 2004 19:08:45 +0000 (19:08 +0000)
  - setup_logging() in smbclient to be interactive (remove the timestamps)
  - Fix bad return value in pull_ucs2( needs more testing to make sure this
    didn't break something else) that caused clistr_pull() to always read
    the same string from the buffer (pull_usc2() could return -1 if the original
    source length was given as -1)
  - increment some debugging messages to avoid printing them out so often

source/client/client.c
source/lib/charcnv.c
source/libsmb/cliconnect.c

index 5ee6913374a529a9320bdd182a7a59e167e103a8..6c43a974f2bb6be0f9b4c16512f89a34ba2ec0b0 100644 (file)
@@ -2816,7 +2816,8 @@ static void remember_query_host(const char *arg,
        set_global_myworkgroup( "" );
 
         /* set default debug level to 0 regardless of what smb.conf sets */
-       DEBUGLEVEL_CLASS[DBGC_ALL] = 0;
+       setup_logging( "smbclient", True );
+       DEBUGLEVEL_CLASS[DBGC_ALL] = 1;
        dbf = x_stderr;
        x_setbuf( x_stderr, NULL );
 
index 1c6058a43e395aaa82b5b11e669c0b68a1077400..5f9392b62019a45560c27e1cd7c2130544d9bbc8 100644 (file)
@@ -940,6 +940,10 @@ size_t pull_ucs2(const void *base_ptr, char *dest, const void *src, size_t dest_
                src_len &= ~1;
        
        ret = convert_string(CH_UCS2, CH_UNIX, src, src_len, dest, dest_len);
+       
+       if (src_len == (size_t)-1)
+               src_len = ret*2;
+               
        if (dest_len)
                dest[MIN(ret, dest_len-1)] = 0;
        else 
index 707a33881df810772d33fcc46226d8fb028b639c..84159e5d62a7af216b9d6132eee338712e336201 100644 (file)
@@ -673,7 +673,7 @@ ADS_STATUS cli_session_setup_spnego(struct cli_state *cli, const char *user,
        BOOL got_kerberos_mechanism = False;
        DATA_BLOB blob;
 
-       DEBUG(2,("Doing spnego session setup (blob length=%lu)\n", (unsigned long)cli->secblob.length));
+       DEBUG(3,("Doing spnego session setup (blob length=%lu)\n", (unsigned long)cli->secblob.length));
 
        /* the server might not even do spnego */
        if (cli->secblob.length <= 16) {