1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

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>
This commit is contained in:
Joe Guo 2018-05-01 17:15:09 +12:00 committed by Andrew Bartlett
parent eafda9137a
commit 9cabb16b48

View File

@ -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,