r8786: Fix amazing and long-standing bug where user-accounts are just crippled
authorGünther Deschner <gd@samba.org>
Tue, 26 Jul 2005 20:11:37 +0000 (20:11 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:00:17 +0000 (11:00 -0500)
accounts (accounts without AcctCtrl set) after a vampire-process.

New Accounts tend to hace no acb_info at all which means "0"
(ACB_NORMAL). Unless 0 becomes not 0 we don't do anything and set *no*
acctrl for normal users at all (!). Those crippled users now don't show
up in usrmgr since 3.0.20somethings ldap-routines now finally test if
the attribute is there.

Guenther
(This used to be commit c270ae79b5ef6d27a2a9e5a2d4f6bb20f7107b16)

source3/utils/net_rpc_samsync.c

index 0c8698a8c2f86ffb0bad2d241e57afd6053436b7..403250675a5b7df5d9a455aac422f6a2f8adc3a7 100644 (file)
@@ -482,8 +482,7 @@ sam_account_from_delta(SAM_ACCOUNT *account, SAM_ACCOUNT_INFO *delta)
 
        /* TODO: account expiry time */
 
-       if (pdb_get_acct_ctrl(account) != delta->acb_info)
-               pdb_set_acct_ctrl(account, delta->acb_info, PDB_CHANGED);
+       pdb_set_acct_ctrl(account, delta->acb_info, PDB_CHANGED);
 
        pdb_set_domain(account, lp_workgroup(), PDB_CHANGED);