Bug 14055 - We should send SMB2_NETNAME_NEGOTIATE_CONTEXT_ID negotiation context
Summary: We should send SMB2_NETNAME_NEGOTIATE_CONTEXT_ID negotiation context
Status: RESOLVED FIXED
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: libsmbclient (show other bugs)
Version: 4.11.0rc1
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Karolin Seeger
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-26 08:09 UTC by Stefan Metzmacher
Modified: 2020-12-11 12:37 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
slow: review+
aaptel: review+
Details
Patches for v4-10-test (3.07 KB, patch)
2019-09-10 21:47 UTC, Stefan Metzmacher
slow: review+
Details
Patches for v4-9-test (3.07 KB, patch)
2019-09-10 21:48 UTC, Stefan Metzmacher
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!
Comment 12 Aurélien Aptel 2020-12-11 11:50:21 UTC
Oops, just seeing that I was marked as reviewer on this via a reminder email received today. Completely missed it, I'm very sorry :(

I don't see an option to mark as reviewed or remove myself from this bug reviewer list. Maybe I'm missing something, or maybe the owner can do it, metze?

Sorry for the noise.
Comment 13 Karolin Seeger 2020-12-11 12:32:51 UTC
Hi Aurelien,

Am 11.12.20 um 12:50 schrieb samba-bugs@samba.org:
> https://bugzilla.samba.org/show_bug.cgi?id=14055
> 
> --- Comment #12 from Aurélien Aptel <aaptel@samba.org> ---
> Oops, just seeing that I was marked as reviewer on this via a reminder email
> received today. Completely missed it, I'm very sorry :(
> 
> I don't see an option to mark as reviewed or remove myself from this bug
> reviewer list. Maybe I'm missing something, or maybe the owner can do it,
> metze?

I just removed these review requests. It should be ok now.

Cheers,
Karolin