More patches for smbclient SMB2/3 problems...

Jeremy Allison jra at samba.org
Thu Aug 17 21:30:16 UTC 2017


On Thu, Aug 17, 2017 at 11:22:29PM +0200, Stefan Metzmacher wrote:
> Am 17.08.2017 um 23:18 schrieb Jeremy Allison:
> > On Thu, Aug 17, 2017 at 01:05:12AM +0200, Stefan Metzmacher wrote:
> >> Hi Jeremy,
> >>
> >> here's some more patches I have in my tree.
> >> I haven't done much testing with them yet.
> >>
> >> I'll start a private autobuild now.
> >>
> >> metze
> > 
> >> From c7b7bd9fa12f614469c6447047b3f8e6f534fdee Mon Sep 17 00:00:00 2001
> >> From: Stefan Metzmacher <metze at samba.org>
> >> Date: Sat, 8 Jul 2017 00:57:59 +0200
> >> Subject: [PATCH 1/5] s3:libsmb: let get_ipc_connect() use
> >>  CLI_FULL_CONNECTION_FORCE_SMB1
> >>
> >> get_ipc_connect() is only used for calling cli_NetServerEnum().
> >>
> >> BUG: https://bugzilla.samba.org/show_bug.cgi?id=12876
> > 
> > FYI. This isn't actually true - there is a path
> > inside source3/utils/smbtree.c inside get_shares()
> > where get_ipc_connect() is used before calling
> > get_rpc_shares(), which uses dcerpc_srvsvc_NetShareEnumAll(),
> > not cli_NetServerEnum() to enumerate shares.
> >
> > Having said that get_shares() is only called
> > after get_workgroups() returns true, and
> > get_workgroups() uses old-style NetBIOS broadcast
> > and cli_NetServerEnum() to get the server list,
> > so it can't work without SMB1.
> 
> Yes, that's what I also found.
> 
> > Might change the commit comment to record this though...
> 
> Ok, can you just add your above comments to the commit message?

Will do.

> Thanks!

One more comment. This patch is also changing the max_protocol
not-set value to PROTOCOL_LATEST (PROTOCOL_SMB3_11). I think that
should either be a separate commit, or noted in the commit
comment:

Subject: [PATCH 5/5] s3:libsmb: let do_connect() debug the negotiation result
 similar to "session request ok"

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12881

Signed-off-by: Stefan Metzmacher <metze at samba.org>

---
 source3/libsmb/clidfs.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/source3/libsmb/clidfs.c b/source3/libsmb/clidfs.c
index b740007..5cc220a 100644
--- a/source3/libsmb/clidfs.c
+++ b/source3/libsmb/clidfs.c
@@ -149,6 +149,7 @@ static NTSTATUS do_connect(TALLOC_CTX *ctx,
        const char *domain;
        NTSTATUS status;
        int flags = 0;
+       enum protocol_types protocol = PROTOCOL_NONE;
        int signing_state = get_cmdline_auth_info_signing_state(auth_info);
        struct cli_credentials *creds = NULL;
 
@@ -204,7 +205,7 @@ static NTSTATUS do_connect(TALLOC_CTX *ctx,
        }
 
        if (max_protocol == 0) {
-               max_protocol = PROTOCOL_NT1;
+               max_protocol = PROTOCOL_LATEST;
        }
        DEBUG(4,(" session request ok\n"));

...




More information about the samba-technical mailing list