mirror of
https://github.com/samba-team/samba.git
synced 2025-03-08 04:58:40 +03:00
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>
This commit is contained in:
parent
31cba34a8f
commit
72f98f9763
@ -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:
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user