Patch for autolockout, samba-3.0.5pre1
Lu, Jianliang
Jianliang.Lu at getronics.com
Wed Jun 16 15:31:32 GMT 2004
When we unlock a autolocked user with usrmgr, the bad password count is not reset to 0. On NT that count is reset to 0 when the autolocked user is unlocked.
Jianliang Lu
Fix:
--- rpc_server/srv_samr_util.c.orig Wed Jun 16 16:59:58 2004
+++ rpc_server/srv_samr_util.c Wed Jun 16 17:03:21 2004
@@ -240,6 +240,10 @@
if (from->fields_present & ACCT_FLAGS) {
DEBUG(10,("INFO_21 ACCT_CTRL: %08X -> %08X\n",pdb_get_acct_ctrl
(to),from
->acb_info));
if (from->acb_info != pdb_get_acct_ctrl(to)) {
+ if (!(from->acb_info & ACB_AUTOLOCK) && (pdb_get_acct_ctrl(to) &
ACB_AUTOLOCK)){
+ pdb_set_bad_password_count(to, 0, PDB_CHANGED);
+ pdb_set_bad_password_time(to, 0, PDB_CHANGED);
+ }
pdb_set_acct_ctrl(to, from->acb_info, PDB_CHANGED);
}
}
---
Jianliang Lu
TieSse s.p.a. Ivrea (To) - Italy
j.lu at tiesse.com
jianliang.lu at getronics.com
luj at libero.it
http://www.tiesse.com
More information about the samba-technical
mailing list