summaryrefslogtreecommitdiff
path: root/source4/libnet
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-10-29 14:01:04 +0100
committerGünther Deschner <gd@samba.org>2008-10-31 02:44:30 +0100
commit9fd82703d17b4dc524d2c7689438b92738c63d23 (patch)
tree50d797ea83eba5c754955d07566c976005cefccf /source4/libnet
parentf61ce2fe41eebef20d3bba471e625d835555d5d8 (diff)
downloadsamba-9fd82703d17b4dc524d2c7689438b92738c63d23.tar.gz
samba-9fd82703d17b4dc524d2c7689438b92738c63d23.tar.bz2
samba-9fd82703d17b4dc524d2c7689438b92738c63d23.zip
s4-srvsvc: merge srvsvc_NetRemoteTOD from s3 idl.
Guenther
Diffstat (limited to 'source4/libnet')
-rw-r--r--source4/libnet/libnet_time.c16
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;