diff options
author | Günther Deschner <gd@samba.org> | 2004-12-24 00:08:15 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:53:45 -0500 |
commit | b314cf95ce3cf809fd03af2b562e9a6dc156f746 (patch) | |
tree | 978fe025ee1f2ac994d15a1bd843565013459b8a /source3/rpc_server | |
parent | 0b18a471bc8411f2248b2082f11633e4aa5cef71 (diff) | |
download | samba-b314cf95ce3cf809fd03af2b562e9a6dc156f746.tar.gz samba-b314cf95ce3cf809fd03af2b562e9a6dc156f746.tar.bz2 samba-b314cf95ce3cf809fd03af2b562e9a6dc156f746.zip |
r4351: Vampire Logon-Hours. Update Logon-Hours only when they have changed.
Guenther
(This used to be commit 0930ad662770278cbe9fd4e3deaa523957b96697)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_samr_util.c | 8 |
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)); |