[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-test-2737-g9f0ea1d

Günther Deschner gd at samba.org
Wed Mar 5 09:44:16 GMT 2008


The branch, v3-2-test has been updated
       via  9f0ea1d727046fef4c23bcf1e71d10f33c93b00f (commit)
       via  5e9d8cdc948b678e5aa6e04ee13635376b7306f5 (commit)
       via  2b4e0f0593c6378cdac4811ded830ca694afac9e (commit)
       via  b9abb783200f6c14543c3b884b9393797cfa8dbd (commit)
       via  cc3ec6ac65eab8c955cd17f3d4bdf58d6fcc22be (commit)
      from  9bfa77edc68a887972b609bfb0aee8bbbc89ce04 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test


- Log -----------------------------------------------------------------
commit 9f0ea1d727046fef4c23bcf1e71d10f33c93b00f
Author: Günther Deschner <gd at samba.org>
Date:   Wed Mar 5 10:40:52 2008 +0100

    Remove unused marshalling for SRV_NET_REMOTE_TOD.
    
    Guenther

commit 5e9d8cdc948b678e5aa6e04ee13635376b7306f5
Author: Günther Deschner <gd at samba.org>
Date:   Wed Mar 5 10:38:13 2008 +0100

    Use rpccli_srvsvc_NetRemoteTOD() in rpcclient.
    
    Guenther

commit 2b4e0f0593c6378cdac4811ded830ca694afac9e
Author: Günther Deschner <gd at samba.org>
Date:   Wed Mar 5 10:34:45 2008 +0100

    Use pidl for _srvsvc_NetRemoteTOD().
    
    Guenther

commit b9abb783200f6c14543c3b884b9393797cfa8dbd
Author: Günther Deschner <gd at samba.org>
Date:   Wed Mar 5 10:32:55 2008 +0100

    Re-run make idl.
    
    Guenther

commit cc3ec6ac65eab8c955cd17f3d4bdf58d6fcc22be
Author: Günther Deschner <gd at samba.org>
Date:   Wed Mar 5 10:32:04 2008 +0100

    Fix IDL for srvsvc_NetRemoteTOD().
    
    Guenther

-----------------------------------------------------------------------

Summary of changes:
 source/include/rpc_srvsvc.h        |   36 ----------
 source/librpc/gen_ndr/cli_srvsvc.c |    6 +-
 source/librpc/gen_ndr/cli_srvsvc.h |    2 +-
 source/librpc/gen_ndr/ndr_srvsvc.c |   39 ++++++++---
 source/librpc/gen_ndr/srv_srvsvc.c |    2 +-
 source/librpc/gen_ndr/srvsvc.h     |    2 +-
 source/librpc/idl/srvsvc.idl       |    2 +-
 source/rpc_client/cli_srvsvc.c     |   33 ---------
 source/rpc_client/init_srvsvc.c    |   33 +++++++++
 source/rpc_parse/parse_srv.c       |  130 ------------------------------------
 source/rpc_server/srv_srvsvc.c     |   20 +-----
 source/rpc_server/srv_srvsvc_nt.c  |   55 +++++++---------
 source/rpcclient/cmd_srvsvc.c      |   13 +++-
 13 files changed, 101 insertions(+), 272 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/include/rpc_srvsvc.h b/source/include/rpc_srvsvc.h
index e6c538a..d0b25e4 100644
--- a/source/include/rpc_srvsvc.h
+++ b/source/include/rpc_srvsvc.h
@@ -683,42 +683,6 @@ typedef struct {
 	WERROR status;      
 } SRV_R_NET_FILE_ENUM;
 
-/* SRV_Q_NET_REMOTE_TOD */
-typedef struct q_net_remote_tod
-{
-	uint32  ptr_srv_name;
-	UNISTR2 uni_srv_name; /* "\\server" */
-
-} SRV_Q_NET_REMOTE_TOD;
-
-/* TIME_OF_DAY_INFO */
-typedef struct time_of_day_info
-{
-	uint32	elapsedt;
-	uint32	msecs;
-	uint32	hours;
-	uint32	mins;
-	uint32	secs;
-	uint32	hunds;
-	uint32	zone;
-	uint32	tintervals;
-	uint32	day;
-	uint32	month;
-	uint32	year;
-	uint32	weekday;
-	
-} TIME_OF_DAY_INFO;
-
-/* SRV_R_NET_REMOTE_TOD */
-typedef struct r_net_remote_tod
-{
-	uint32 ptr_srv_tod;         /* pointer to TOD */
-	TIME_OF_DAY_INFO *tod;
-	
-	WERROR status;               /* return status */
-
-} SRV_R_NET_REMOTE_TOD;
-
 /* SRV_Q_NET_FILE_QUERY_SECDESC */
 typedef struct q_net_file_query_secdesc
 {
diff --git a/source/librpc/gen_ndr/cli_srvsvc.c b/source/librpc/gen_ndr/cli_srvsvc.c
index 7688557..3624fb0 100644
--- a/source/librpc/gen_ndr/cli_srvsvc.c
+++ b/source/librpc/gen_ndr/cli_srvsvc.c
@@ -1486,7 +1486,7 @@ NTSTATUS rpccli_srvsvc_NetTransportDel(struct rpc_pipe_client *cli,
 NTSTATUS rpccli_srvsvc_NetRemoteTOD(struct rpc_pipe_client *cli,
 				    TALLOC_CTX *mem_ctx,
 				    const char *server_unc,
-				    struct srvsvc_NetRemoteTODInfo *info,
+				    struct srvsvc_NetRemoteTODInfo **info,
 				    WERROR *werror)
 {
 	struct srvsvc_NetRemoteTOD r;
@@ -1519,9 +1519,7 @@ NTSTATUS rpccli_srvsvc_NetRemoteTOD(struct rpc_pipe_client *cli,
 	}
 
 	/* Return variables */
-	if (info && r.out.info) {
-		*info = *r.out.info;
-	}
+	*info = *r.out.info;
 
 	/* Return result */
 	if (werror) {
diff --git a/source/librpc/gen_ndr/cli_srvsvc.h b/source/librpc/gen_ndr/cli_srvsvc.h
index c383b89..4f52600 100644
--- a/source/librpc/gen_ndr/cli_srvsvc.h
+++ b/source/librpc/gen_ndr/cli_srvsvc.h
@@ -213,7 +213,7 @@ NTSTATUS rpccli_srvsvc_NetTransportDel(struct rpc_pipe_client *cli,
 NTSTATUS rpccli_srvsvc_NetRemoteTOD(struct rpc_pipe_client *cli,
 				    TALLOC_CTX *mem_ctx,
 				    const char *server_unc,
-				    struct srvsvc_NetRemoteTODInfo *info,
+				    struct srvsvc_NetRemoteTODInfo **info,
 				    WERROR *werror);
 NTSTATUS rpccli_srvsvc_NetSetServiceBits(struct rpc_pipe_client *cli,
 					 TALLOC_CTX *mem_ctx,
diff --git a/source/librpc/gen_ndr/ndr_srvsvc.c b/source/librpc/gen_ndr/ndr_srvsvc.c
index c3f74cc..22a04f8 100644
--- a/source/librpc/gen_ndr/ndr_srvsvc.c
+++ b/source/librpc/gen_ndr/ndr_srvsvc.c
@@ -17027,9 +17027,12 @@ static enum ndr_err_code ndr_push_srvsvc_NetRemoteTOD(struct ndr_push *ndr, int
 		}
 	}
 	if (flags & NDR_OUT) {
-		NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
-		if (r->out.info) {
-			NDR_CHECK(ndr_push_srvsvc_NetRemoteTODInfo(ndr, NDR_SCALARS, r->out.info));
+		if (r->out.info == NULL) {
+			return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+		}
+		NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
+		if (*r->out.info) {
+			NDR_CHECK(ndr_push_srvsvc_NetRemoteTODInfo(ndr, NDR_SCALARS, *r->out.info));
 		}
 		NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
 	}
@@ -17042,6 +17045,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetRemoteTOD(struct ndr_pull *ndr, int
 	uint32_t _ptr_info;
 	TALLOC_CTX *_mem_save_server_unc_0;
 	TALLOC_CTX *_mem_save_info_0;
+	TALLOC_CTX *_mem_save_info_1;
 	if (flags & NDR_IN) {
 		ZERO_STRUCT(r->out);
 
@@ -17063,20 +17067,28 @@ static enum ndr_err_code ndr_pull_srvsvc_NetRemoteTOD(struct ndr_pull *ndr, int
 			NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
 			NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
 		}
+		NDR_PULL_ALLOC(ndr, r->out.info);
+		ZERO_STRUCTP(r->out.info);
 	}
 	if (flags & NDR_OUT) {
+		if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+			NDR_PULL_ALLOC(ndr, r->out.info);
+		}
+		_mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+		NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
 		NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
 		if (_ptr_info) {
-			NDR_PULL_ALLOC(ndr, r->out.info);
+			NDR_PULL_ALLOC(ndr, *r->out.info);
 		} else {
-			r->out.info = NULL;
+			*r->out.info = NULL;
 		}
-		if (r->out.info) {
-			_mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
-			NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
-			NDR_CHECK(ndr_pull_srvsvc_NetRemoteTODInfo(ndr, NDR_SCALARS, r->out.info));
-			NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
+		if (*r->out.info) {
+			_mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
+			NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
+			NDR_CHECK(ndr_pull_srvsvc_NetRemoteTODInfo(ndr, NDR_SCALARS, *r->out.info));
+			NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
 		}
+		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
 		NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
 	}
 	return NDR_ERR_SUCCESS;
@@ -17105,10 +17117,13 @@ _PUBLIC_ void ndr_print_srvsvc_NetRemoteTOD(struct ndr_print *ndr, const char *n
 		ndr->depth++;
 		ndr_print_ptr(ndr, "info", r->out.info);
 		ndr->depth++;
-		if (r->out.info) {
-			ndr_print_srvsvc_NetRemoteTODInfo(ndr, "info", r->out.info);
+		ndr_print_ptr(ndr, "info", *r->out.info);
+		ndr->depth++;
+		if (*r->out.info) {
+			ndr_print_srvsvc_NetRemoteTODInfo(ndr, "info", *r->out.info);
 		}
 		ndr->depth--;
+		ndr->depth--;
 		ndr_print_WERROR(ndr, "result", r->out.result);
 		ndr->depth--;
 	}
diff --git a/source/librpc/gen_ndr/srv_srvsvc.c b/source/librpc/gen_ndr/srv_srvsvc.c
index afd4587..75e586c 100644
--- a/source/librpc/gen_ndr/srv_srvsvc.c
+++ b/source/librpc/gen_ndr/srv_srvsvc.c
@@ -2225,7 +2225,7 @@ static bool api_srvsvc_NetRemoteTOD(pipes_struct *p)
 	}
 
 	ZERO_STRUCT(r->out);
-	r->out.info = talloc_zero(r, struct srvsvc_NetRemoteTODInfo);
+	r->out.info = talloc_zero(r, struct srvsvc_NetRemoteTODInfo *);
 	if (r->out.info == NULL) {
 		talloc_free(r);
 		return false;
diff --git a/source/librpc/gen_ndr/srvsvc.h b/source/librpc/gen_ndr/srvsvc.h
index 988d21a..cede81e 100644
--- a/source/librpc/gen_ndr/srvsvc.h
+++ b/source/librpc/gen_ndr/srvsvc.h
@@ -1472,7 +1472,7 @@ struct srvsvc_NetRemoteTOD {
 	} in;
 
 	struct {
-		struct srvsvc_NetRemoteTODInfo *info;/* [unique] */
+		struct srvsvc_NetRemoteTODInfo **info;/* [ref] */
 		WERROR result;
 	} out;
 
diff --git a/source/librpc/idl/srvsvc.idl b/source/librpc/idl/srvsvc.idl
index 1682fde..4ad7beb 100644
--- a/source/librpc/idl/srvsvc.idl
+++ b/source/librpc/idl/srvsvc.idl
@@ -1299,7 +1299,7 @@ import "security.idl", "svcctl.idl";
 	/* Function: 0x1c */
 	WERROR srvsvc_NetRemoteTOD(
 		[in,unique]   [string,charset(UTF16)] uint16 *server_unc,
-		[out,unique]   srvsvc_NetRemoteTODInfo *info
+		[out,ref]     srvsvc_NetRemoteTODInfo **info
 		);
 
 /**************************/
diff --git a/source/rpc_client/cli_srvsvc.c b/source/rpc_client/cli_srvsvc.c
index 02e52b3..524678c 100644
--- a/source/rpc_client/cli_srvsvc.c
+++ b/source/rpc_client/cli_srvsvc.c
@@ -430,39 +430,6 @@ WERROR rpccli_srvsvc_net_share_add(struct rpc_pipe_client *cli, TALLOC_CTX *mem_
 	return result;	
 }
 
-WERROR rpccli_srvsvc_net_remote_tod(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
-				 char *server, TIME_OF_DAY_INFO *tod)
-{
-	prs_struct qbuf, rbuf;
-	SRV_Q_NET_REMOTE_TOD q;
-	SRV_R_NET_REMOTE_TOD r;
-	WERROR result = W_ERROR(ERRgeneral);
-	fstring server_slash;
-
-	ZERO_STRUCT(q);
-	ZERO_STRUCT(r);
-
-	/* Initialise input parameters */
-
-	slprintf(server_slash, sizeof(fstring)-1, "\\\\%s", cli->cli->desthost);
-	strupper_m(server_slash);
-
-	init_srv_q_net_remote_tod(&q, server_slash);
-	r.tod = tod;
-
-	/* Marshall data and send request */
-
-	CLI_DO_RPC_WERR(cli, mem_ctx, PI_SRVSVC, SRV_NET_REMOTE_TOD,
-		q, r,
-		qbuf, rbuf,
-		srv_io_q_net_remote_tod,
-		srv_io_r_net_remote_tod,
-		WERR_GENERAL_FAILURE);
-
-	result = r.status;
-	return result;	
-}
-
 WERROR rpccli_srvsvc_net_file_enum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
 				uint32 file_level, const char *user_name,
 				SRV_FILE_INFO_CTR *ctr,	int preferred_len,
diff --git a/source/rpc_client/init_srvsvc.c b/source/rpc_client/init_srvsvc.c
index a4ee54c..5e868ff 100644
--- a/source/rpc_client/init_srvsvc.c
+++ b/source/rpc_client/init_srvsvc.c
@@ -84,3 +84,36 @@ void init_srvsvc_NetSrvInfo100(struct srvsvc_NetSrvInfo100 *r,
 	r->platform_id = platform_id;
 	r->server_name = server_name;
 }
+
+/*******************************************************************
+ inits a srvsvc_NetRemoteTODInfo structure
+ ********************************************************************/
+
+void init_srvsvc_NetRemoteTODInfo(struct srvsvc_NetRemoteTODInfo *r,
+				  uint32_t elapsed,
+				  uint32_t msecs,
+				  uint32_t hours,
+				  uint32_t mins,
+				  uint32_t secs,
+				  uint32_t hunds,
+				  int32_t ttimezone,
+				  uint32_t tinterval,
+				  uint32_t day,
+				  uint32_t month,
+				  uint32_t year,
+				  uint32_t weekday)
+{
+	r->elapsed = elapsed;
+	r->msecs = msecs;
+	r->hours = hours;
+	r->mins = mins;
+	r->secs = secs;
+	r->hunds = hunds;
+	r->timezone = ttimezone;
+	r->tinterval = tinterval;
+	r->day = day;
+	r->month = month;
+	r->year = year;
+	r->weekday = weekday;
+}
+
diff --git a/source/rpc_parse/parse_srv.c b/source/rpc_parse/parse_srv.c
index 136aed5..a09e704 100644
--- a/source/rpc_parse/parse_srv.c
+++ b/source/rpc_parse/parse_srv.c
@@ -2619,125 +2619,6 @@ bool srv_io_r_net_file_enum(const char *desc, SRV_R_NET_FILE_ENUM *r_n, prs_stru
 }
 
 /*******************************************************************
- Reads or writes a structure.
- ********************************************************************/
-
-bool srv_io_q_net_remote_tod(const char *desc, SRV_Q_NET_REMOTE_TOD *q_n, prs_struct *ps, int depth)
-{
-	if (q_n == NULL)
-		return False;
-
-	prs_debug(ps, depth, desc, "srv_io_q_net_remote_tod");
-	depth++;
-
-	if(!prs_align(ps))
-		return False;
-
-	if(!prs_uint32("ptr_srv_name  ", ps, depth, &q_n->ptr_srv_name))
-		return False;
-	if(!smb_io_unistr2("", &q_n->uni_srv_name, True, ps, depth))
-		return False;
-
-	return True;
-}
-
-/*******************************************************************
- Reads or writes a TIME_OF_DAY_INFO structure.
- ********************************************************************/
-
-static bool srv_io_time_of_day_info(const char *desc, TIME_OF_DAY_INFO *tod, prs_struct *ps, int depth)
-{
-	if (tod == NULL)
-		return False;
-
-	prs_debug(ps, depth, desc, "srv_io_time_of_day_info");
-	depth++;
-
-	if(!prs_align(ps))
-		return False;
-	
-	if(!prs_uint32("elapsedt   ", ps, depth, &tod->elapsedt))
-		return False;
-	if(!prs_uint32("msecs      ", ps, depth, &tod->msecs))
-		return False;
-	if(!prs_uint32("hours      ", ps, depth, &tod->hours))
-		return False;
-	if(!prs_uint32("mins       ", ps, depth, &tod->mins))
-		return False;
-	if(!prs_uint32("secs       ", ps, depth, &tod->secs))
-		return False;
-	if(!prs_uint32("hunds      ", ps, depth, &tod->hunds))
-		return False;
-	if(!prs_uint32("timezone   ", ps, depth, &tod->zone))
-		return False;
-	if(!prs_uint32("tintervals ", ps, depth, &tod->tintervals))
-		return False;
-	if(!prs_uint32("day        ", ps, depth, &tod->day))
-		return False;
-	if(!prs_uint32("month      ", ps, depth, &tod->month))
-		return False;
-	if(!prs_uint32("year       ", ps, depth, &tod->year))
-		return False;
-	if(!prs_uint32("weekday    ", ps, depth, &tod->weekday))
-		return False;
-
-	return True;
-}
-
-/*******************************************************************
- Inits a TIME_OF_DAY_INFO structure.
- ********************************************************************/
-
-void init_time_of_day_info(TIME_OF_DAY_INFO *tod, uint32 elapsedt, uint32 msecs,
-                           uint32 hours, uint32 mins, uint32 secs, uint32 hunds,
-			   uint32 zone, uint32 tintervals, uint32 day,
-			   uint32 month, uint32 year, uint32 weekday)
-{
-	DEBUG(5,("init_time_of_day_info\n"));
-
-	tod->elapsedt	= elapsedt;
-	tod->msecs	= msecs;
-	tod->hours	= hours;
-	tod->mins	= mins;
-	tod->secs	= secs;
-	tod->hunds	= hunds;
-	tod->zone	= zone;
-	tod->tintervals	= tintervals;
-	tod->day	= day;
-	tod->month	= month;
-	tod->year	= year;
-	tod->weekday	= weekday;
-}
-
-
-/*******************************************************************
- Reads or writes a structure.
- ********************************************************************/
-
-bool srv_io_r_net_remote_tod(const char *desc, SRV_R_NET_REMOTE_TOD *r_n, prs_struct *ps, int depth)
-{
-	if (r_n == NULL)
-		return False;
-
-	prs_debug(ps, depth, desc, "srv_io_r_net_remote_tod");
-	depth++;
-
-	if(!prs_align(ps))
-		return False;
-	
-	if(!prs_uint32("ptr_srv_tod ", ps, depth, &r_n->ptr_srv_tod))
-		return False;
-
-	if(!srv_io_time_of_day_info("tod", r_n->tod, ps, depth))
-		return False;
-
-	if(!prs_werror("status", ps, depth, &r_n->status))
-		return False;
-
-	return True;
-}
-
-/*******************************************************************
  initialises a structure.
  ********************************************************************/
 
@@ -3098,14 +2979,3 @@ bool srv_io_r_net_file_set_secdesc(const char *desc, SRV_R_NET_FILE_SET_SECDESC
 
 	return True;
 }
-
-/*******************************************************************
- Inits a structure
-********************************************************************/
-
-void init_srv_q_net_remote_tod(SRV_Q_NET_REMOTE_TOD *q_u, const char *server)
-{
-	q_u->ptr_srv_name = 1;
-	init_unistr2(&q_u->uni_srv_name, server, UNI_STR_TERMINATE);
-}
-
diff --git a/source/rpc_server/srv_srvsvc.c b/source/rpc_server/srv_srvsvc.c
index 0d50bcc..41fc39b 100644
--- a/source/rpc_server/srv_srvsvc.c
+++ b/source/rpc_server/srv_srvsvc.c
@@ -369,25 +369,7 @@ static bool api_srv_net_share_del_sticky(pipes_struct *p)
 
 static bool api_srv_net_remote_tod(pipes_struct *p)
 {
-	SRV_Q_NET_REMOTE_TOD q_u;
-	SRV_R_NET_REMOTE_TOD r_u;
-	prs_struct *data = &p->in_data.data;
-	prs_struct *rdata = &p->out_data.rdata;
-
-	ZERO_STRUCT(q_u);
-	ZERO_STRUCT(r_u);
-
-	/* grab the net server get enum */
-	if(!srv_io_q_net_remote_tod("", &q_u, data, 0))
-		return False;
-
-	r_u.status = _srv_net_remote_tod(p, &q_u, &r_u);
-
-	/* store the response in the SMB stream */
-	if(!srv_io_r_net_remote_tod("", &r_u, rdata, 0))
-		return False;
-
-	return True;
+	return proxy_srvsvc_call(p, NDR_SRVSVC_NETREMOTETOD);
 }
 
 /*******************************************************************
diff --git a/source/rpc_server/srv_srvsvc_nt.c b/source/rpc_server/srv_srvsvc_nt.c
index 75c262a..4efea33 100644
--- a/source/rpc_server/srv_srvsvc_nt.c
+++ b/source/rpc_server/srv_srvsvc_nt.c
@@ -2054,12 +2054,13 @@ WERROR _srv_net_share_del_sticky(pipes_struct *p, SRV_Q_NET_SHARE_DEL *q_u, SRV_
 }
 
 /*******************************************************************
-time of day
+ _srvsvc_NetRemoteTOD
 ********************************************************************/
 
-WERROR _srv_net_remote_tod(pipes_struct *p, SRV_Q_NET_REMOTE_TOD *q_u, SRV_R_NET_REMOTE_TOD *r_u)
+WERROR _srvsvc_NetRemoteTOD(pipes_struct *p,
+			    struct srvsvc_NetRemoteTOD *r)
 {
-	TIME_OF_DAY_INFO *tod;
+	struct srvsvc_NetRemoteTODInfo *tod;
 	struct tm *t;
 	time_t unixdate = time(NULL);
 
@@ -2068,37 +2069,35 @@ WERROR _srv_net_remote_tod(pipes_struct *p, SRV_Q_NET_REMOTE_TOD *q_u, SRV_R_NET
 
 	uint32 zone = get_time_zone(unixdate)/60;
 
-	DEBUG(5,("_srv_net_remote_tod: %d\n", __LINE__));
+	DEBUG(5,("_srvsvc_NetRemoteTOD: %d\n", __LINE__));
 
-	if ( !(tod = TALLOC_ZERO_P(p->mem_ctx, TIME_OF_DAY_INFO)) )
+	if ( !(tod = TALLOC_ZERO_P(p->mem_ctx, struct srvsvc_NetRemoteTODInfo)) )
 		return WERR_NOMEM;
 
-	r_u->tod = tod;
-	r_u->ptr_srv_tod = 0x1;
-	r_u->status = WERR_OK;
+	*r->out.info = tod;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list