diff options
author | Andrew Tridgell <tridge@samba.org> | 2008-10-31 13:55:26 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2008-10-31 13:55:26 +1100 |
commit | 5ecccac1c34f58019b195f6838f57366faa3575d (patch) | |
tree | 3475f5b34220e4735a1c74b24f3bddbbf76f90df /source4/libnet/libnet_time.c | |
parent | 391264a1006c147d82c983701ae382005c251d75 (diff) | |
parent | 6066e1a44d041d7a5cafcb4c0276f5ff323226d9 (diff) | |
download | samba-5ecccac1c34f58019b195f6838f57366faa3575d.tar.gz samba-5ecccac1c34f58019b195f6838f57366faa3575d.tar.bz2 samba-5ecccac1c34f58019b195f6838f57366faa3575d.zip |
Merge branch 'master' of ssh://git.samba.org/data/git/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; |