summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorJoe Guo <joeg@catalyst.net.nz>2018-05-02 22:12:51 +0000
committerAndrew Bartlett <abartlet@samba.org>2018-05-14 02:53:16 +0200
commit72f98f9763669887482cf430c7734b0a0d69cc1b (patch)
tree7f4b057debbcece6a21fa23447282c72e5617a7c /python
parent31cba34a8f0e1301423468c6570530b0e298eb20 (diff)
downloadsamba-72f98f9763669887482cf430c7734b0a0d69cc1b.tar.gz
samba-72f98f9763669887482cf430c7734b0a0d69cc1b.tar.bz2
samba-72f98f9763669887482cf430c7734b0a0d69cc1b.zip
traffic: change machine creds secure channel type
SEC_CHAN_WKSTA --> SEC_CHAN_BDC This will fix netlogon failure against windows. Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Diffstat (limited to 'python')
-rw-r--r--python/samba/emulate/traffic.py6
-rw-r--r--python/samba/emulate/traffic_packets.py3
2 files changed, 4 insertions, 5 deletions
diff --git a/python/samba/emulate/traffic.py b/python/samba/emulate/traffic.py
index 503e1e4c5bf..2dc27d95100 100644
--- a/python/samba/emulate/traffic.py
+++ b/python/samba/emulate/traffic.py
@@ -44,7 +44,7 @@ from samba.credentials import Credentials, DONT_USE_KERBEROS, MUST_USE_KERBEROS
from samba.auth import system_session
from samba.dsdb import UF_WORKSTATION_TRUST_ACCOUNT, UF_PASSWD_NOTREQD
from samba.dsdb import UF_NORMAL_ACCOUNT
-from samba.dcerpc.misc import SEC_CHAN_WKSTA
+from samba.dcerpc.misc import SEC_CHAN_BDC
from samba import gensec
from samba import sd_utils
@@ -511,7 +511,7 @@ class ReplayContext(object):
self.machine_creds = Credentials()
self.machine_creds.guess(self.lp)
self.machine_creds.set_workstation(self.netbios_name)
- self.machine_creds.set_secure_channel_type(SEC_CHAN_WKSTA)
+ self.machine_creds.set_secure_channel_type(SEC_CHAN_BDC)
self.machine_creds.set_password(self.machinepass)
self.machine_creds.set_username(self.netbios_name + "$")
self.machine_creds.set_domain(self.domain)
@@ -523,7 +523,7 @@ class ReplayContext(object):
self.machine_creds_bad = Credentials()
self.machine_creds_bad.guess(self.lp)
self.machine_creds_bad.set_workstation(self.netbios_name)
- self.machine_creds_bad.set_secure_channel_type(SEC_CHAN_WKSTA)
+ self.machine_creds_bad.set_secure_channel_type(SEC_CHAN_BDC)
self.machine_creds_bad.set_password(self.machinepass[:-4])
self.machine_creds_bad.set_username(self.netbios_name + "$")
if self.prefer_kerberos:
diff --git a/python/samba/emulate/traffic_packets.py b/python/samba/emulate/traffic_packets.py
index 1413c8bfb80..3f5db4317a3 100644
--- a/python/samba/emulate/traffic_packets.py
+++ b/python/samba/emulate/traffic_packets.py
@@ -35,7 +35,6 @@ from samba.ntstatus import (
NT_STATUS_OBJECT_NAME_NOT_FOUND,
NT_STATUS_NO_SUCH_DOMAIN
)
-from samba.dcerpc.misc import SEC_CHAN_WKSTA
import samba
samba.ensure_third_party_module("dns", "dnspython")
import dns.resolver
@@ -573,7 +572,7 @@ def packet_rpc_netlogon_30(packet, conversation, context):
# must ends with $, so use get_username instead
# of get_workstation here
context.machine_creds.get_username(),
- SEC_CHAN_WKSTA,
+ context.machine_creds.get_secure_channel_type(),
context.netbios_name,
auth,
pwd)