s4: dsdb/password_hash: use UF_TRUST_ACCOUNT_MASK
authorRalph Boehme <slow@samba.org>
Thu, 8 Mar 2018 16:35:15 +0000 (17:35 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 13 Mar 2018 22:48:28 +0000 (23:48 +0100)
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Mar 13 23:48:28 CET 2018 on sn-devel-144

source4/dsdb/samdb/ldb_modules/password_hash.c

index 1c1de09de77306ee8795a8afb0d5a480f6927feb..c872f20eb23aec85cc83e0f1c55a57c67059430c 100644 (file)
@@ -3211,9 +3211,7 @@ static int setup_io(struct ph_context *ac,
 
        /* Only non-trust accounts have restrictions (possibly this test is the
         * wrong way around, but we like to be restrictive if possible */
-       io->u.restrictions = !(io->u.userAccountControl
-               & (UF_INTERDOMAIN_TRUST_ACCOUNT | UF_WORKSTATION_TRUST_ACCOUNT
-                       | UF_SERVER_TRUST_ACCOUNT));
+       io->u.restrictions = !(io->u.userAccountControl & UF_TRUST_ACCOUNT_MASK);
 
        if (io->u.is_krbtgt) {
                io->u.restrictions = 0;