s4:dsdb: Let requests with the AS_SYSTEM control reset an account’s password
authorJo Sutton <josutton@catalyst.net.nz>
Tue, 13 Feb 2024 01:13:46 +0000 (14:13 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 16 Feb 2024 02:41:36 +0000 (02:41 +0000)
commitb0b9e03c99098c46580b151064f673c6c47e1b4e
tree7e5f348348181317510ff87b44a61a539d397bbf
parenteece2e8a9c6c5bf32c2824ed5853b88d1e3f679b
s4:dsdb: Let requests with the AS_SYSTEM control reset an account’s password

dsdb_have_system_access() takes into account the AS_SYSTEM control as
well as the result of dsdb_module_am_system().

This change means that we can reset the password of an account without
being SYSTEM by means of the AS_SYSTEM control. This is essential for
ldapsrv_SearchRequest() to be able to process the automatic password
changes of Group Managed Service Accounts.

Signed-off-by: Jo Sutton <josutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/dsdb/samdb/ldb_modules/password_hash.c