Bug 13727 - Netbios traffic on port 139 is still sent with nmbd disabled and 'disable netbios' set
Netbios traffic on port 139 is still sent with nmbd disabled and 'disable net...
Status: RESOLVED FIXED
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Other
4.8.2
All All
: P5 normal
: ---
Assigned To: Karolin Seeger
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-12-19 20:49 UTC by jstephen
Modified: 2019-02-05 14:09 UTC (History)
4 users (show)

See Also:


Attachments
master (1.79 KB, patch)
2019-01-09 16:41 UTC, jstephen
no flags Details
v4.9 (1.79 KB, patch)
2019-01-09 16:42 UTC, jstephen
asn: review-
Details
master (6.77 KB, patch)
2019-01-10 14:41 UTC, jstephen
no flags Details
v4.9 (6.91 KB, patch)
2019-01-10 14:42 UTC, jstephen
asn: review+
npower: review+
metze: review-
Details
patch for 4.9 (8.50 KB, patch)
2019-01-16 15:23 UTC, Andreas Schneider
asn: review+
jra: review-
Details
patch v2 for 4.9 (8.31 KB, patch)
2019-01-17 08:44 UTC, Andreas Schneider
jra: review+
Details
patch for 4.10 (1.20 KB, patch)
2019-01-17 10:33 UTC, Andreas Schneider
jra: review+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jstephen 2018-12-19 20:49:17 UTC
Samba configured for use 445 port instead of NetBIOS API. 

- disabled nmbd, 
- add 'disable netbios' set to 'yes' in smb.conf 
- add 'smb ports = 445' in smb.conf
 
but its still sending netbios-ssn to domain controller on port 139.

disable_netbios option is not evaluated in some calls to cli_connect_nb()
Comment 1 jstephen 2019-01-09 16:41:51 UTC
Created attachment 14759 [details]
master
Comment 2 jstephen 2019-01-09 16:42:13 UTC
Created attachment 14760 [details]
v4.9
Comment 3 Andreas Schneider 2019-01-09 16:54:43 UTC
Comment on attachment 14760 [details]
v4.9

Ups wrong patch.
Comment 4 jstephen 2019-01-09 16:56:20 UTC
Woops, uploaded the wrong patches. Disregard the patches before this comment. I will upload the correct ones soon.
Comment 5 Noel Power 2019-01-10 13:38:20 UTC
attachment #14760 [details] is obsolete or not ?
Comment 6 jstephen 2019-01-10 14:41:57 UTC
Created attachment 14763 [details]
master
Comment 7 jstephen 2019-01-10 14:42:21 UTC
Created attachment 14764 [details]
v4.9
Comment 8 jstephen 2019-01-10 14:42:56 UTC
Apologies for the confusion, the correct patches are added now.

Thanks!
Comment 9 Andreas Schneider 2019-01-10 17:00:48 UTC
Karolin, please add the patch to the next 4.9 release. Thanks!
Comment 10 Stefan Metzmacher 2019-01-11 22:05:48 UTC
Comment on attachment 14764 [details]
v4.9

smbsock_connect_send() should also skip this!


state->req_139 = tevent_wakeup_send(...


I think we should just add something like:

if (lp_disable_netbios())
      return req;
}

before.
Comment 11 Stefan Metzmacher 2019-01-11 22:08:46 UTC
Please also use git cherry-pick -x when creating backports the next time, thanks!
Comment 12 Andreas Schneider 2019-01-16 15:23:38 UTC
Created attachment 14777 [details]
patch for 4.9
Comment 13 Jeremy Allison 2019-01-16 17:33:47 UTC
Comment on attachment 14777 [details]
patch for 4.9

Can you put the line:

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

in the commit comment section of:

[PATCH 1/5] s3:libsmb: Check disable_netbios in socket connect

please ? That way all associated patches are flagged with the correct bugid.

Thanks,

Jeremy.
Comment 14 Andreas Schneider 2019-01-17 08:44:33 UTC
Created attachment 14785 [details]
patch v2 for 4.9

I've added the bug marker.
Comment 15 Andreas Schneider 2019-01-17 10:33:18 UTC
Created attachment 14787 [details]
patch for 4.10
Comment 16 Jeremy Allison 2019-01-17 19:24:37 UTC
Re-assigning to Karolin for inclusion in 4.9.next, 4.10.rcNext.
Comment 17 Karolin Seeger 2019-01-31 09:52:18 UTC
(In reply to Jeremy Allison from comment #16)
Pushed to autobuild-v4-{9,10}-test.
Comment 18 Karolin Seeger 2019-02-05 14:09:31 UTC
Pushed to both branches.
Closing out bug report.

Thanks!