}
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));
pdb_set_logoff_time(account, unix_time,PDB_CHANGED);
}
+ /* Logon Divs */
if (pdb_get_logon_divs(account) != delta->logon_divs)
pdb_set_logon_divs(account, delta->logon_divs, PDB_CHANGED);
- /* TODO: logon hours */
+ /* Max Logon Hours */
+ if (delta->unknown1 != pdb_get_unknown_6(account)) {
+ pdb_set_unknown_6(account, delta->unknown1, PDB_CHANGED);
+ }
+
+ /* Logon Hours Len */
+ if (delta->buf_logon_hrs.buf_len != pdb_get_hours_len(account)) {
+ pdb_set_hours_len(account, delta->buf_logon_hrs.buf_len, PDB_CHANGED);
+ }
+
+ /* Logon Hours */
+ if (delta->buf_logon_hrs.buffer) {
+ pstring old, new;
+ pdb_sethexhours(old, pdb_get_hours(account));
+ pdb_sethexhours(new, (const char *)delta->buf_logon_hrs.buffer);
+ if (!strequal(old, new))
+ pdb_set_hours(account, (const char *)delta->buf_logon_hrs.buffer, PDB_CHANGED);
+ }
+
if (pdb_get_bad_password_count(account) != delta->bad_pwd_count)
pdb_set_bad_password_count(account, delta->bad_pwd_count, PDB_CHANGED);