Inside source3/client/client.c:browse_host() we have: 4913 if (browse_host_rpc(sort)) { 4914 return true; 4915 } 4916 4917 if (lp_client_min_protocol() > PROTOCOL_NT1) { 4918 return false; 4919 } 4920 4921 ret = cli_RNetShareEnum(cli, browse_fn, NULL); which depends on the administrator or user of smbclient setting the 'client min protocol' correctly when talking to an SMB2-only server. We already have the protocol information on the server we connected to inside cli->conn, so we need to prevent calling the SMB1-only cli_RNetShareEnum() when connected to an SMB2-only server. libsmbclient already protects against this, so we just missed this in smbclient. We just need to add a: if (smbXcli_conn_protocol(conn) > PROTOCOL_NT1) { return false; } check before the cli_RNetShareEnum() call to fix this in the same way as it was fixed for libsmbclient. I'll upload a patch shortly.
Created attachment 15517 [details] git-am fix for 4.11.next, 4.10.next Cherry-picked from master.
LGTM
Karloin, could you please apply the patch to the relevant branches? Thanks!
Pushed to autobuild-v4-{11,10}-test.
(In reply to Karolin Seeger from comment #4) Pushed to both branches. Closing out bug report. Thanks!