Bug 14055 - We should send SMB2_NETNAME_NEGOTIATE_CONTEXT_ID negotiation context
We should send SMB2_NETNAME_NEGOTIATE_CONTEXT_ID negotiation context
Status: RESOLVED FIXED
Product: Samba 4.1 and newer
Classification: Unclassified
Component: libsmbclient
4.11.0rc1
All All
: P5 normal
: ---
Assigned To: Karolin Seeger
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-07-26 08:09 UTC by Stefan Metzmacher
Modified: 2019-09-12 10:07 UTC (History)
3 users (show)

See Also:


Attachments
Patches for v4-9-test (3.05 KB, patch)
2019-09-03 09:24 UTC, Stefan Metzmacher
slow: review+
Details
Patches for v4-10-test (3.05 KB, patch)
2019-09-03 09:25 UTC, Stefan Metzmacher
slow: review+
Details
Patches for v4-11-test (3.05 KB, patch)
2019-09-03 09:25 UTC, Stefan Metzmacher
metze: review? (aaptel)
slow: review+
Details
Patches for v4-10-test (3.07 KB, patch)
2019-09-10 21:47 UTC, Stefan Metzmacher
metze: review? (aaptel)
slow: review+
Details
Patches for v4-9-test (3.07 KB, patch)
2019-09-10 21:48 UTC, Stefan Metzmacher
metze: review? (aaptel)
slow: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Metzmacher 2019-07-26 08:09:02 UTC
SMB2_NETNAME_NEGOTIATE_CONTEXT_ID containing the target server name,
was added as a way to indicate the target server to load balancers.

The server is supposed to ignore that, but we may want to use it
in order to support %L again, see man smb.conf:

       %L
           the NetBIOS name of the server. This allows you to change your config based on what the client calls you. Your server can have a “dual
           personality”.

As the code is trivial an harmless we should backport it in order to
make this available sooner.
Comment 1 Stefan Metzmacher 2019-09-03 09:24:33 UTC
Created attachment 15449 [details]
Patches for v4-9-test
Comment 2 Stefan Metzmacher 2019-09-03 09:25:06 UTC
Created attachment 15450 [details]
Patches for v4-10-test
Comment 3 Stefan Metzmacher 2019-09-03 09:25:39 UTC
Created attachment 15451 [details]
Patches for v4-11-test
Comment 4 Ralph Böhme 2019-09-09 09:51:33 UTC
Reassigning to Karolin for inclusion in 4.9, 4.10 and 4.11.
Comment 5 Karolin Seeger 2019-09-09 10:41:30 UTC
(In reply to Ralph Böhme from comment #4)
Pushed to autobuild-v4-{11,10,9}-test.
Comment 6 Karolin Seeger 2019-09-10 08:27:22 UTC
Pushed to v4-11-test,
seems to break the build on v4-{10,9}-test:

[1663/4408] Compiling libcli/smb/smbXcli_base.c
../libcli/smb/smbXcli_base.c: In function ‘smbXcli_negprot_smb2_subreq’:
../libcli/smb/smbXcli_base.c:4805:6: error: incompatible type for argument 4 of ‘smb2_negotiate_context_add’
      netname_utf16, netname_utf16_len);
      ^
In file included from ../libcli/smb/smbXcli_base.c:35:0:
../libcli/smb/smb2_negotiate_context.h:45:10: note: expected ‘DATA_BLOB’ but argument is of type ‘uint8_t *’
 NTSTATUS smb2_negotiate_context_add(TALLOC_CTX *mem_ctx, struct smb2_negotiate_contexts *c,
          ^
../libcli/smb/smbXcli_base.c:4805:6: error: too many arguments to function ‘smb2_negotiate_context_add’
      netname_utf16, netname_utf16_len);
      ^
In file included from ../libcli/smb/smbXcli_base.c:35:0:
../libcli/smb/smb2_negotiate_context.h:45:10: note: declared here
 NTSTATUS smb2_negotiate_context_add(TALLOC_CTX *mem_ctx, struct smb2_negotiate_contexts *c,
          ^
Waf: Leaving directory `/memdisk/kseeger/a49/b1999381/samba/bin'
Build failed:  -> task failed (err #1): 
	{task: cc smbXcli_base.c -> smbXcli_base_4.o}
make: *** [all] Error 1
Comment 7 Stefan Metzmacher 2019-09-10 21:47:59 UTC
Created attachment 15466 [details]
Patches for v4-10-test

The 4.10 and 4.9 patches need to be a bit different in order to compile.
Comment 8 Stefan Metzmacher 2019-09-10 21:48:40 UTC
Created attachment 15467 [details]
Patches for v4-9-test

The 4.10 and 4.9 patches need to be a bit different in order to compile.
Comment 9 Ralph Böhme 2019-09-11 05:11:18 UTC
Karolin, please push the new 4.9 and 4.10 backports.
Comment 10 Karolin Seeger 2019-09-11 08:02:14 UTC
(In reply to Ralph Böhme from comment #9)
done, thanks!
Comment 11 Karolin Seeger 2019-09-12 10:07:30 UTC
(In reply to Karolin Seeger from comment #10)
Pushed to all branches.
Closing out bug report.

Thanks!