This failure is seen with 3.6.1 and latest master git tree. I'm atm just hunting some os/2 related errors - unfortunately i don't have an automated test environment here (even the os/2 boxes are usually not running) smbclient -L server01 -Ugk Enter gk's password: OS=[OS/2 2.30] Server=[IBM LAN Server 4.0] Sharename Type Comment --------- ---- ------- Error returning browse list: NT_STATUS_UNSUCCESSFUL --- I first thought it could be related to: http://git.samba.org/?p=samba.git;a=commitdiff;h=c0e92cd4b8eae573848dc1587eecd2946715d754 but it seems to be a bit more complicated... Debugging now .... Cheers, Günter
libsmb/clirap.c int cli_RNetShareEnum() .... if (cli_api(cli, .... .... now just bails out with error - not easy to catch due to now used async calls. Is there some "tutorial, best used notices, ..." how to debug those async calls ...? Cheers, Günter
had only few time to track this down. So i'll sent some intermediate wireshark sniffs: - a failing one from current git master against os/2 - a working one done with an old smbclient Cheers, Günter
Created attachment 7075 [details] wireshark sniff latest git tree against os/2
Created attachment 7076 [details] wireshark sniff working (old) smbclient against os/2
Hmm, this is a real picky one ... as can be seen from my sent network sniffs, the parameter offset should be 76, but is 78 now (beside other stuff). The problematic part is in libsmb/clitrans.c: .... static void cli_trans_format() .... switch (cmd) { case SMBtrans: pad[0] = 0; iov[0].iov_base = (void *)pad; iov[0].iov_len = 1; <====== !!!!!!!! iov[1].iov_base = (void *)state->pipe_name_conv; iov[1].iov_len = state->pipe_name_conv_len; wct = 14 + state->num_setup; param_offset += iov[0].iov_len + iov[1].iov_len; iov += 2; break; .... If iov[0].iov_len = 0; _would_ have been used here: 35 param_offset = MIN_SMB_SIZE; 13 calc. length of \PIPE\LANMAN (here ASCII) 28 wct (here 14) * sizeof(uint16_t) --- 76 <== working case for param_offset I tested that against os/2 and it was working, but obviously will break all other setups where UCS2/UTF-16 pipe name encoding is used. With current iov[0].iov_len = 1; the failing param_offset is lateron calculated as 78. So i think that the now generalized setup in static void cli_trans_format() needs some more tweaking... An os/2 server is not needed to test this, one can also use samba (to take a network trace). Here todays (18th Nov 2011) git master tree was used: smbclient -L localhost -m LANMAN2 -U% Sharename Type Comment --------- ---- ------- cli_rpc_pipe_open_noauth: rpc_pipe_bind for pipe \srvsvc failed with error NT_STATUS_IO_DEVICE_ERROR Error returning browse list: NT_STATUS_CTL_FILE_NOT_SUPPORTED <==== !!!! Server Comment --------- ------- Workgroup Master --------- ------- I atm have no clue how to solve this - it's a very often used code path with inherent side-effects..... Cheers, Günter
Created attachment 7116 [details] Patch for master Can you test if this patch fixes the problem?
Hi Metze, your patch fixes the problem. Cheers, Günter
Created attachment 7128 [details] Patch for v3-6-test Günter, please review and assign to Karolin
Hi Karolin, the bug is fixed. Cheers, Günter
Pushed to v3-6-test. Closing out bug report. Thanks!