We also need to convert last_logon, last_logoff and acct_expiry
from unix time to nt time.
Otherwise a windows member server will reject clients
using CAP_DYNAMIC_REAUTH or smb2) with STATUS_NETWORK_SESSION_EXPIRED,
if the logoff and kickoff time is expired.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Feb 1 18:42:42 CET 2013 on sn-devel-104
info3 = talloc_zero(mem_ctx, struct netr_SamInfo3);
if (!info3) return NULL;
- info3->base.logon_time = info->logon_time;
- info3->base.logoff_time = info->logoff_time;
- info3->base.kickoff_time = info->kickoff_time;
+ unix_to_nt_time(&info3->base.logon_time, info->logon_time);
+ unix_to_nt_time(&info3->base.logoff_time, info->logoff_time);
+ unix_to_nt_time(&info3->base.kickoff_time, info->kickoff_time);
unix_to_nt_time(&info3->base.last_password_change, info->pass_last_set_time);
unix_to_nt_time(&info3->base.allow_password_change,
info->pass_can_change_time);