[PATCH] libcli/smb: Parse primary domain from session setup

Andrew Bartlett abartlet at samba.org
Mon Oct 23 21:56:41 UTC 2017


On Mon, 2017-10-23 at 14:12 +0200, Samuel Cabrero via samba-technical
wrote:
> Hi,
> 
> I still have this patch on the queue, I sent it some time ago.

This looks good to me.  Could we have a test so we don't break this
again?

Also, please file a bug for backport.

Metze: Can I get some more comment from you on this?  You made comments
about some of the parsing routines working only by luck here:
https://bugzilla.samba.org/show_bug.cgi?id=12824

Was there an intentional reason this support was lost?

Thanks,

Andrew Bartlett

> The output of 'net rap server domain -S <server>' returns an empty
> list
> since samba >= 4.6.0 when 'client ipc max protocol = NT1' because the
> netbios server name is used instead of the primary domain in the
> NetServerEnum2 call.
> 
> I have tracked it down and I think this a regression introduced by
> commit 9fffec88033a. Before this commit the primary domain was
> extracted from the session setup.
> 
> Related bug:
> https://bugzilla.samba.org/show_bug.cgi?id=12824
> 
> Could I get any comment on it please?
> 
> On Mon, 2017-09-11 at 18:31 +0200, Samuel Cabrero via samba-technical
> wrote:
> > On samba >= 4.6.0 the domain name shown on smbclient output is
> > wrong
> > and shows the netbios server name instead of the server's
> > workgroup.
> > Also, the 'net rap server domain' command does not work because the
> > server's netbios name is used instead of the workgroup in the
> > NetServerEnum2 request.
> > 
> > The attached patch reads the primary domain from session setup
> > response
> > for NT1 protocol with CAP_EXTENDED_SECURITY.
> > 
> > Review and comments appreciated!
> > 
> > Samuel.
-- 
Andrew Bartlett
https://samba.org/~abartlet/
Authentication Developer, Samba Team         https://samba.org
Samba Development and Support, Catalyst IT   
https://catalyst.net.nz/services/samba







More information about the samba-technical mailing list