from samba.tests import delete_force
from samba.dsdb import UF_WORKSTATION_TRUST_ACCOUNT, UF_PASSWD_NOTREQD
from samba.dcerpc.misc import SEC_CHAN_WKSTA
+from samba.dcerpc.netlogon import NETLOGON_NEG_STRONG_KEYS
+from samba.compat import get_string
class AuthLogTestsNetLogonBadCreds(samba.tests.auth_log_base.AuthLogTestBase):
self.dn = ("cn=%s,cn=users,%s" %
(self.netbios_name, self.base_dn))
- utf16pw = unicode(
- '"' + self.machinepass.encode('utf-8') + '"', 'utf-8'
- ).encode('utf-16-le')
+ utf16pw = get_string('"' + self.machinepass + '"').encode('utf-16-le')
self.ldb.add({
"dn": self.dn,
"objectclass": "computer",
msg["Authorization"]["serviceDescription"])
self.assertEquals("ncalrpc", msg["Authorization"]["authType"])
self.assertEquals("NONE", msg["Authorization"]["transportProtection"])
+ self.assertTrue(self.is_guid(msg["Authorization"]["sessionId"]))
def test_netlogon_bad_machine_name(self):
self._test_netlogon("bad_name",
SEC_CHAN_WKSTA,
self.netbios_name,
creds,
- 0x00004000)
+ NETLOGON_NEG_STRONG_KEYS)
except NTSTATUSError:
pass
self.waitForMessages(isLastExpectedMessage)