diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-10-31 02:49:43 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-10-31 02:49:43 +0100 |
commit | f6c3710d4127c7c2ab63578117048c2a18ee2d64 (patch) | |
tree | 4b4f62b139a8e38aeec6fd03ff65b38a2e9017ba /source4/libnet/libnet_time.c | |
parent | 9bcd5720cffe77a7095195af9932e755507a91c4 (diff) | |
parent | 569fda3173219384ee3cfd30cbc49d5bee1138c6 (diff) | |
download | samba-f6c3710d4127c7c2ab63578117048c2a18ee2d64.tar.gz samba-f6c3710d4127c7c2ab63578117048c2a18ee2d64.tar.bz2 samba-f6c3710d4127c7c2ab63578117048c2a18ee2d64.zip |
Merge branch 'master' of git://git.samba.org/samba
Diffstat (limited to 'source4/libnet/libnet_time.c')
-rw-r--r-- | source4/libnet/libnet_time.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/source4/libnet/libnet_time.c b/source4/libnet/libnet_time.c index e1e53fb947..61a451d3fd 100644 --- a/source4/libnet/libnet_time.c +++ b/source4/libnet/libnet_time.c @@ -30,6 +30,7 @@ static NTSTATUS libnet_RemoteTOD_srvsvc(struct libnet_context *ctx, TALLOC_CTX * NTSTATUS status; struct libnet_RpcConnect c; struct srvsvc_NetRemoteTOD tod; + struct srvsvc_NetRemoteTODInfo *info = NULL; struct tm tm; /* prepare connect to the SRVSVC pipe of a timeserver */ @@ -48,6 +49,7 @@ static NTSTATUS libnet_RemoteTOD_srvsvc(struct libnet_context *ctx, TALLOC_CTX * /* prepare srvsvc_NetrRemoteTOD */ tod.in.server_unc = talloc_asprintf(mem_ctx, "\\%s", c.in.name); + tod.out.info = &info; /* 2. try srvsvc_NetRemoteTOD */ status = dcerpc_srvsvc_NetRemoteTOD(c.out.dcerpc_pipe, mem_ctx, &tod); @@ -68,18 +70,18 @@ static NTSTATUS libnet_RemoteTOD_srvsvc(struct libnet_context *ctx, TALLOC_CTX * } /* need to set the out parameters */ - tm.tm_sec = (int)tod.out.info->secs; - tm.tm_min = (int)tod.out.info->mins; - tm.tm_hour = (int)tod.out.info->hours; - tm.tm_mday = (int)tod.out.info->day; - tm.tm_mon = (int)tod.out.info->month -1; - tm.tm_year = (int)tod.out.info->year - 1900; + tm.tm_sec = (int)info->secs; + tm.tm_min = (int)info->mins; + tm.tm_hour = (int)info->hours; + tm.tm_mday = (int)info->day; + tm.tm_mon = (int)info->month -1; + tm.tm_year = (int)info->year - 1900; tm.tm_wday = -1; tm.tm_yday = -1; tm.tm_isdst = -1; r->srvsvc.out.time = timegm(&tm); - r->srvsvc.out.time_zone = tod.out.info->timezone * 60; + r->srvsvc.out.time_zone = info->timezone * 60; goto disconnect; |