summaryrefslogtreecommitdiff
path: root/source3/rpc_server/srv_samr_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpc_server/srv_samr_util.c')
-rw-r--r--source3/rpc_server/srv_samr_util.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source3/rpc_server/srv_samr_util.c b/source3/rpc_server/srv_samr_util.c
index 8cc44074ab..c1faede947 100644
--- a/source3/rpc_server/srv_samr_util.c
+++ b/source3/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));