kadm5: Correctly set userAccountControl bits

We meant to clear only the UF_SMARTCARD_REQUIRED bit, but we were
instead clearing all bits excepting it.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
This commit is contained in:
Joseph Sutton
2022-04-29 12:05:50 +12:00
committed by Jeffrey Altman
parent f165d1e942
commit f6d26bce66

View File

@@ -1196,7 +1196,7 @@ kadm5_ad_modify_principal(void *server_handle,
if (entry->attributes & KRB5_KDB_REQUIRES_HW_AUTH)
i |= UF_SMARTCARD_REQUIRED;
else
i &= UF_SMARTCARD_REQUIRED;
i &= ~UF_SMARTCARD_REQUIRED;
if (entry->attributes & KRB5_KDB_DISALLOW_SVR)
i &= ~UF_WORKSTATION_TRUST_ACCOUNT;
else