diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2006-09-06 18:32:20 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:43:56 -0500 |
commit | 1115745caed3093c25d6be01ffee21819fb0a675 (patch) | |
tree | 730da876f3765743cbcbe7ee34889b503915729a /source/libmsrpc | |
parent | 647ed21b098e8fe6513040de7a540fe77fa0b37e (diff) | |
download | samba-1115745caed3093c25d6be01ffee21819fb0a675.tar.gz samba-1115745caed3093c25d6be01ffee21819fb0a675.tar.xz samba-1115745caed3093c25d6be01ffee21819fb0a675.zip |
r18188: merge 3.0-libndr branch
Diffstat (limited to 'source/libmsrpc')
-rw-r--r-- | source/libmsrpc/libmsrpc.c | 8 | ||||
-rw-r--r-- | source/libmsrpc/libmsrpc_internal.c | 12 |
2 files changed, 10 insertions, 10 deletions
diff --git a/source/libmsrpc/libmsrpc.c b/source/libmsrpc/libmsrpc.c index 5f71af21da2..d96eaf59160 100644 --- a/source/libmsrpc/libmsrpc.c +++ b/source/libmsrpc/libmsrpc.c @@ -239,19 +239,19 @@ void cac_InitCacTime(CacTime *cactime, NTTIME nttime) { ZERO_STRUCTP(cactime); /*this code is taken from display_time() found in rpcclient/cmd_samr.c*/ - if (nttime.high==0 && nttime.low==0) + if (nttime==0) return; - if (nttime.high==0x80000000 && nttime.low==0) + if (nttime==0x80000000000000LL) return; high = 65536; high = high/10000; high = high*65536; high = high/1000; - high = high * (~nttime.high); + high = high * (~(nttime >> 32)); - low = ~nttime.low; + low = ~(nttime & 0xFFFFFFFF); low = low/(1000*1000*10); sec=high+low; diff --git a/source/libmsrpc/libmsrpc_internal.c b/source/libmsrpc/libmsrpc_internal.c index a1c37aaac42..db884d3bf04 100644 --- a/source/libmsrpc/libmsrpc_internal.c +++ b/source/libmsrpc/libmsrpc_internal.c @@ -448,12 +448,12 @@ CacUserInfo *cac_MakeUserInfo(TALLOC_CTX *mem_ctx, SAM_USERINFO_CTR *ctr) { ZERO_STRUCTP(info); - info->logon_time = nt_time_to_unix(&id21->logon_time); - info->logoff_time = nt_time_to_unix(&id21->logoff_time); - info->kickoff_time = nt_time_to_unix(&id21->kickoff_time); - info->pass_last_set_time = nt_time_to_unix(&id21->pass_last_set_time); - info->pass_can_change_time = nt_time_to_unix(&id21->pass_can_change_time); - info->pass_must_change_time = nt_time_to_unix(&id21->pass_must_change_time); + info->logon_time = nt_time_to_unix(id21->logon_time); + info->logoff_time = nt_time_to_unix(id21->logoff_time); + info->kickoff_time = nt_time_to_unix(id21->kickoff_time); + info->pass_last_set_time = nt_time_to_unix(id21->pass_last_set_time); + info->pass_can_change_time = nt_time_to_unix(id21->pass_can_change_time); + info->pass_must_change_time = nt_time_to_unix(id21->pass_must_change_time); info->username = talloc_unistr2_to_ascii(mem_ctx, id21->uni_user_name); if(!info->username) |