summaryrefslogtreecommitdiffstats
path: root/source/rpc_server/srv_samr_util.c
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2004-12-24 00:08:15 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:53:45 -0500
commit0930ad662770278cbe9fd4e3deaa523957b96697 (patch)
tree510071cd8705c73061000734b3e4f17cc7347f1c /source/rpc_server/srv_samr_util.c
parent8675b41d336df3030deeda45f1379835002f883c (diff)
downloadsamba-0930ad662770278cbe9fd4e3deaa523957b96697.tar.gz
samba-0930ad662770278cbe9fd4e3deaa523957b96697.tar.xz
samba-0930ad662770278cbe9fd4e3deaa523957b96697.zip
r4351: Vampire Logon-Hours. Update Logon-Hours only when they have changed.
Guenther
Diffstat (limited to 'source/rpc_server/srv_samr_util.c')
-rw-r--r--source/rpc_server/srv_samr_util.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/rpc_server/srv_samr_util.c b/source/rpc_server/srv_samr_util.c
index 8cc44074abe..c1faede9477 100644
--- a/source/rpc_server/srv_samr_util.c
+++ b/source/rpc_server/srv_samr_util.c
@@ -262,8 +262,12 @@ void copy_id21_to_sam_passwd(SAM_ACCOUNT *to, SAM_USER_INFO_21 *from)
}
DEBUG(15,("INFO_21 LOGON_HRS.HOURS: %s -> %s\n",pdb_get_hours(to),from->logon_hrs.hours));
- /* Fix me: only update if it changes --metze */
- pdb_set_hours(to, from->logon_hrs.hours, PDB_CHANGED);
+ pstring old, new;
+ pdb_sethexhours(old, pdb_get_hours(to));
+ pdb_sethexhours(new, (const char *)from->logon_hrs.hours);
+ if (!strequal(old, new)) {
+ pdb_set_hours(to, from->logon_hrs.hours, PDB_CHANGED);
+ }
/* This is max logon hours */
DEBUG(10,("INFO_21 UNKNOWN_6: %08X -> %08X\n",pdb_get_unknown_6(to),from->unknown_6));