summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorJoe Guo <joeg@catalyst.net.nz>2018-05-01 17:15:09 +1200
committerAndrew Bartlett <abartlet@samba.org>2018-05-12 02:09:29 +0200
commit9cabb16b489b43495472b0e7229ba864daa7d479 (patch)
tree3406e43c253e332bae58e7a3d3eb16cc4da3089e /python
parenteafda9137afba96e2375262f846f79597583ab82 (diff)
downloadsamba-9cabb16b489b43495472b0e7229ba864daa7d479.tar.gz
samba-9cabb16b489b43495472b0e7229ba864daa7d479.tar.bz2
samba-9cabb16b489b43495472b0e7229ba864daa7d479.zip
traffic_packets: add trailing $ to fix packet_rpc_netlogon_30
For `NetrServerPasswordSet2`, the 2nd arg `account_name` must end with a $, otherwise windows will return an `Access Denied` error. Use `creds.get_username()` instead of `creds.get_workstation()` to include the trailing $. 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_packets.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/python/samba/emulate/traffic_packets.py b/python/samba/emulate/traffic_packets.py
index d39151fcdaa..d23a7669ad9 100644
--- a/python/samba/emulate/traffic_packets.py
+++ b/python/samba/emulate/traffic_packets.py
@@ -564,7 +564,9 @@ def packet_rpc_netlogon_30(packet, conversation, context):
pwd.data = filler + [ord(x) for x in newpass]
context.machine_creds.encrypt_netr_crypt_password(pwd)
c.netr_ServerPasswordSet2(context.server,
- context.machine_creds.get_workstation(),
+ # must ends with $, so use get_username instead
+ # of get_workstation here
+ context.machine_creds.get_username(),
SEC_CHAN_WKSTA,
context.netbios_name,
auth,