mirror of
https://github.com/samba-team/samba.git
synced 2025-01-14 19:24:43 +03:00
5e2386336c
This is important when we change the machine password against an RODC that proxies the request to an RWDC. An RODC using NetrServerPasswordSet2() to proxy PasswordUpdateForward via NetrLogonSendToSam() ignores a return of NT_STATUS_INVALID_PARAMETER and reports NT_STATUS_OK as result of NetrServerPasswordSet2(). This hopefully found the last hole in our very robust machine account password handling logic inside of trust_pw_change(). The lesson is: try to be as identical to how windows works as possible, everything else may use is untested code paths on Windows. A similar problem was fixed by this commit: commit 609ca657652862fd9c81fd11f818efb74f72ff55 Author: Joseph Sutton <josephsutton@catalyst.net.nz> Date: Wed Feb 24 02:03:25 2021 +1300 provision: Decrease the length of random machine passwords The current length of 128-255 UTF-16 characters currently causes generation of crypt() passwords to typically fail. This commit decreases the length to 120 UTF-16 characters, which is the same as that used by Windows. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14621 Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> BUG: https://bugzilla.samba.org/show_bug.cgi?id=14984 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Wed Feb 23 08:49:54 UTC 2022 on sn-devel-184