s3:auth: wbcAuthenticateEx gives unix times (bug #9625)
authorStefan Metzmacher <metze@samba.org>
Thu, 31 Jan 2013 12:39:42 +0000 (13:39 +0100)
committerStefan Metzmacher <metze@samba.org>
Fri, 1 Feb 2013 17:42:42 +0000 (18:42 +0100)
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

source3/auth/server_info.c

index 3f4f7081b8c1389f0ac911dba027f7e25407fb6b..d2b7d6e938f0483701e70cd267965463db615492 100644 (file)
@@ -568,9 +568,9 @@ struct netr_SamInfo3 *wbcAuthUserInfo_to_netr_SamInfo3(TALLOC_CTX *mem_ctx,
        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);