[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-test-2729-g5911529

Günther Deschner gd at samba.org
Wed Mar 5 08:56:47 GMT 2008


The branch, v3-2-test has been updated
       via  5911529205ca69c438e0782c07ee4fe5aa95de62 (commit)
       via  a7aef18797407b1f451191647d4b0225ac838817 (commit)
       via  75b0bbf790da44c45c679c374dbe09f288f3fb8c (commit)
       via  ea03cb92c481b9bb47d2a4e133cf830acb0f22a3 (commit)
       via  024021daabe825bc7a033951aa1073ab76bd34aa (commit)
       via  53a7e9b07d07d3e9d21360dee35fee27b46929b3 (commit)
       via  4a74f1e8d2c45574973fc4c0ce4fbc9a843afaa0 (commit)
       via  34caa41fa6d44165b470508261c2bde124fc4955 (commit)
      from  3c0a3f8de742678b56f6b998a014105c05400666 (commit)

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


- Log -----------------------------------------------------------------
commit 5911529205ca69c438e0782c07ee4fe5aa95de62
Author: Günther Deschner <gd at samba.org>
Date:   Wed Mar 5 09:53:33 2008 +0100

    Fix rpccli_srvsvc_NetSrvSetInfo call in libnetapi.
    
    Guenther

commit a7aef18797407b1f451191647d4b0225ac838817
Author: Günther Deschner <gd at samba.org>
Date:   Tue Mar 4 23:40:53 2008 +0100

    Remove unused marshalling for SRV_NET_SRV_SET_INFO.
    
    Guenther

commit 75b0bbf790da44c45c679c374dbe09f288f3fb8c
Author: Günther Deschner <gd at samba.org>
Date:   Tue Mar 4 23:40:25 2008 +0100

    Use pidl for _srvsvc_NetSrvSetInfo().
    
    Guenther

commit ea03cb92c481b9bb47d2a4e133cf830acb0f22a3
Author: Günther Deschner <gd at samba.org>
Date:   Tue Mar 4 23:47:28 2008 +0100

    Re-run make idl.
    
    Guenther

commit 024021daabe825bc7a033951aa1073ab76bd34aa
Author: Günther Deschner <gd at samba.org>
Date:   Tue Mar 4 23:47:01 2008 +0100

    Fix IDL for srvsvc_NetSrvSetInfo().
    
    Guenther

commit 53a7e9b07d07d3e9d21360dee35fee27b46929b3
Author: Günther Deschner <gd at samba.org>
Date:   Tue Mar 4 23:26:27 2008 +0100

    Remove unused marshalling for SRV_NET_SRV_GET_INFO.
    
    Guenther

commit 4a74f1e8d2c45574973fc4c0ce4fbc9a843afaa0
Author: Günther Deschner <gd at samba.org>
Date:   Tue Mar 4 23:11:53 2008 +0100

    Use rpccli_srvsvc_NetSrvGetInfo() in rpcclient.
    
    Guenther

commit 34caa41fa6d44165b470508261c2bde124fc4955
Author: Günther Deschner <gd at samba.org>
Date:   Tue Mar 4 23:07:45 2008 +0100

    Use pidl for _srvsvc_NetSrvGetInfo().
    
    Guenther

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

Summary of changes:
 source/Makefile.in                 |    3 +-
 source/include/rpc_srvsvc.h        |  103 ----------
 source/lib/netapi/serverinfo.c     |    2 +-
 source/librpc/gen_ndr/cli_srvsvc.c |    2 +-
 source/librpc/gen_ndr/cli_srvsvc.h |    2 +-
 source/librpc/gen_ndr/ndr_srvsvc.c |   25 ++-
 source/librpc/gen_ndr/srvsvc.h     |    2 +-
 source/librpc/idl/srvsvc.idl       |    2 +-
 source/rpc_client/cli_srvsvc.c     |   34 ---
 source/rpc_client/init_srvsvc.c    |   86 ++++++++
 source/rpc_parse/parse_srv.c       |  393 ------------------------------------
 source/rpc_server/srv_srvsvc.c     |   40 +----
 source/rpc_server/srv_srvsvc_nt.c  |  125 +++++++-----
 source/rpcclient/cmd_srvsvc.c      |   78 ++++----
 14 files changed, 221 insertions(+), 676 deletions(-)
 create mode 100644 source/rpc_client/init_srvsvc.c


Changeset truncated at 500 lines:

diff --git a/source/Makefile.in b/source/Makefile.in
index f4b0344..04df5cf 100644
--- a/source/Makefile.in
+++ b/source/Makefile.in
@@ -304,7 +304,8 @@ RPC_PARSE_OBJ1 = $(RPC_PARSE_OBJ0) rpc_parse/parse_sec.o
 RPC_PARSE_OBJ2 = rpc_parse/parse_rpc.o rpc_parse/parse_srv.o
 RPC_PARSE_OBJ2 = rpc_parse/parse_rpc.o rpc_parse/parse_srv.o \
 		 rpc_client/init_netlogon.o \
-		 rpc_client/init_lsa.o
+		 rpc_client/init_lsa.o \
+		 rpc_client/init_srvsvc.o
 
 LIBREPLACE_OBJ = @LIBREPLACE_OBJS@
 
diff --git a/source/include/rpc_srvsvc.h b/source/include/rpc_srvsvc.h
index 097c0d4..e6c538a 100644
--- a/source/include/rpc_srvsvc.h
+++ b/source/include/rpc_srvsvc.h
@@ -683,109 +683,6 @@ typedef struct {
 	WERROR status;      
 } SRV_R_NET_FILE_ENUM;
 
-/* SRV_INFO_100 */
-typedef struct srv_info_100_info
-{
-	uint32 platform_id;     /* 0x500 */
-	uint32 ptr_name;        /* pointer to server name */
-
-	UNISTR2 uni_name;       /* server name "server" */
-
-} SRV_INFO_100;
-
-/* SRV_INFO_101 */
-typedef struct srv_info_101_info
-{
-	uint32 platform_id;     /* 0x500 */
-	uint32 ptr_name;        /* pointer to server name */
-	uint32 ver_major;       /* 0x4 */
-	uint32 ver_minor;       /* 0x2 */
-	uint32 srv_type;        /* browse etc type */
-	uint32 ptr_comment;     /* pointer to server comment */
-
-	UNISTR2 uni_name;       /* server name "server" */
-	UNISTR2 uni_comment;    /* server comment "samba x.x.x blah" */
-
-} SRV_INFO_101;
-
-/* SRV_INFO_102  */
-typedef struct srv_info_102_info
-{
-	uint32 platform_id;     /* 0x500 */
-	uint32 ptr_name;        /* pointer to server name */
-	uint32 ver_major;       /* 0x4 */
-	uint32 ver_minor;       /* 0x2 */
-	uint32 srv_type;        /* browse etc type */
-	uint32 ptr_comment;     /* pointer to server comment */
-	uint32 users;           /* 0xffff ffff*/
-	uint32 disc;            /* 0xf */
-	uint32 hidden;          /* 0x0 */
-	uint32 announce;        /* 240 */
-	uint32 ann_delta;       /* 3000 */
-	uint32 licenses;        /* 0 */
-	uint32 ptr_usr_path;    /* pointer to user path */
-
-	UNISTR2 uni_name;       /* server name "server" */
-	UNISTR2 uni_comment;    /* server comment "samba x.x.x blah" */
-	UNISTR2 uni_usr_path;   /* "c:\" (eh?) */
-
-} SRV_INFO_102;
-
-
-/* SRV_INFO_CTR */
-typedef struct srv_info_ctr_info
-{
-	uint32 switch_value;         /* switch value */
-	uint32 ptr_srv_ctr;         /* pointer to server info */
-	union
-    {
-		SRV_INFO_102 sv102; /* server info level 102 */
-		SRV_INFO_101 sv101; /* server info level 101 */
-		SRV_INFO_100 sv100; /* server info level 100 */
-
-    } srv;
-
-} SRV_INFO_CTR;
-
-/* SRV_Q_NET_SRV_GET_INFO */
-typedef struct q_net_srv_get_info
-{
-	uint32  ptr_srv_name;
-	UNISTR2 uni_srv_name; /* "\\server" */
-	uint32  switch_value;
-
-} SRV_Q_NET_SRV_GET_INFO;
-
-/* SRV_R_NET_SRV_GET_INFO */
-typedef struct r_net_srv_get_info
-{
-	SRV_INFO_CTR *ctr;
-
-	WERROR status;               /* return status */
-
-} SRV_R_NET_SRV_GET_INFO;
-
-/* SRV_Q_NET_SRV_SET_INFO */
-typedef struct q_net_srv_set_info
-{
-	uint32  ptr_srv_name;
-	UNISTR2 uni_srv_name; /* "\\server" */
-	uint32  switch_value;
-
-	SRV_INFO_CTR *ctr;
-
-} SRV_Q_NET_SRV_SET_INFO;
-
-
-/* SRV_R_NET_SRV_SET_INFO */
-typedef struct r_net_srv_set_info
-{
-	uint32 switch_value;         /* switch value */
-
-	WERROR status;               /* return status */
-
-} SRV_R_NET_SRV_SET_INFO;
-
 /* SRV_Q_NET_REMOTE_TOD */
 typedef struct q_net_remote_tod
 {
diff --git a/source/lib/netapi/serverinfo.c b/source/lib/netapi/serverinfo.c
index 7fa166e..5451295 100644
--- a/source/lib/netapi/serverinfo.c
+++ b/source/lib/netapi/serverinfo.c
@@ -268,7 +268,7 @@ static WERROR NetServerSetInfoRemote(struct libnetapi_ctx *ctx,
 	status = rpccli_srvsvc_NetSrvSetInfo(pipe_cli, ctx,
 					     server_name,
 					     level,
-					     info,
+					     &info,
 					     parm_error,
 					     &werr);
 	if (!NT_STATUS_IS_OK(status)) {
diff --git a/source/librpc/gen_ndr/cli_srvsvc.c b/source/librpc/gen_ndr/cli_srvsvc.c
index 2b1d050..d6bfbb4 100644
--- a/source/librpc/gen_ndr/cli_srvsvc.c
+++ b/source/librpc/gen_ndr/cli_srvsvc.c
@@ -1169,7 +1169,7 @@ NTSTATUS rpccli_srvsvc_NetSrvSetInfo(struct rpc_pipe_client *cli,
 				     TALLOC_CTX *mem_ctx,
 				     const char *server_unc,
 				     uint32_t level,
-				     union srvsvc_NetSrvInfo info,
+				     union srvsvc_NetSrvInfo *info,
 				     uint32_t *parm_error,
 				     WERROR *werror)
 {
diff --git a/source/librpc/gen_ndr/cli_srvsvc.h b/source/librpc/gen_ndr/cli_srvsvc.h
index eb19db3..4df214f 100644
--- a/source/librpc/gen_ndr/cli_srvsvc.h
+++ b/source/librpc/gen_ndr/cli_srvsvc.h
@@ -169,7 +169,7 @@ NTSTATUS rpccli_srvsvc_NetSrvSetInfo(struct rpc_pipe_client *cli,
 				     TALLOC_CTX *mem_ctx,
 				     const char *server_unc,
 				     uint32_t level,
-				     union srvsvc_NetSrvInfo info,
+				     union srvsvc_NetSrvInfo *info,
 				     uint32_t *parm_error,
 				     WERROR *werror);
 NTSTATUS rpccli_srvsvc_NetDiskEnum(struct rpc_pipe_client *cli,
diff --git a/source/librpc/gen_ndr/ndr_srvsvc.c b/source/librpc/gen_ndr/ndr_srvsvc.c
index 9b08ade..f447665 100644
--- a/source/librpc/gen_ndr/ndr_srvsvc.c
+++ b/source/librpc/gen_ndr/ndr_srvsvc.c
@@ -16179,8 +16179,11 @@ static enum ndr_err_code ndr_push_srvsvc_NetSrvSetInfo(struct ndr_push *ndr, int
 			NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
 		}
 		NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
-		NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.info, r->in.level));
-		NDR_CHECK(ndr_push_srvsvc_NetSrvInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
+		if (r->in.info == NULL) {
+			return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+		}
+		NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
+		NDR_CHECK(ndr_push_srvsvc_NetSrvInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
 		NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.parm_error));
 		if (r->in.parm_error) {
 			NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.parm_error));
@@ -16201,6 +16204,7 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvSetInfo(struct ndr_pull *ndr, int
 	uint32_t _ptr_server_unc;
 	uint32_t _ptr_parm_error;
 	TALLOC_CTX *_mem_save_server_unc_0;
+	TALLOC_CTX *_mem_save_info_0;
 	TALLOC_CTX *_mem_save_parm_error_0;
 	if (flags & NDR_IN) {
 		ZERO_STRUCT(r->out);
@@ -16224,8 +16228,14 @@ static enum ndr_err_code ndr_pull_srvsvc_NetSrvSetInfo(struct ndr_pull *ndr, int
 			NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
 		}
 		NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
-		NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.info, r->in.level));
-		NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
+		if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+			NDR_PULL_ALLOC(ndr, r->in.info);
+		}
+		_mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+		NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
+		NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
+		NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
+		NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
 		NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_error));
 		if (_ptr_parm_error) {
 			NDR_PULL_ALLOC(ndr, r->in.parm_error);
@@ -16274,8 +16284,11 @@ _PUBLIC_ void ndr_print_srvsvc_NetSrvSetInfo(struct ndr_print *ndr, const char *
 		}
 		ndr->depth--;
 		ndr_print_uint32(ndr, "level", r->in.level);
-		ndr_print_set_switch_value(ndr, &r->in.info, r->in.level);
-		ndr_print_srvsvc_NetSrvInfo(ndr, "info", &r->in.info);
+		ndr_print_ptr(ndr, "info", r->in.info);
+		ndr->depth++;
+		ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
+		ndr_print_srvsvc_NetSrvInfo(ndr, "info", r->in.info);
+		ndr->depth--;
 		ndr_print_ptr(ndr, "parm_error", r->in.parm_error);
 		ndr->depth++;
 		if (r->in.parm_error) {
diff --git a/source/librpc/gen_ndr/srvsvc.h b/source/librpc/gen_ndr/srvsvc.h
index 6e6c782..0b3e405 100644
--- a/source/librpc/gen_ndr/srvsvc.h
+++ b/source/librpc/gen_ndr/srvsvc.h
@@ -1371,7 +1371,7 @@ struct srvsvc_NetSrvSetInfo {
 	struct {
 		const char *server_unc;/* [unique,charset(UTF16)] */
 		uint32_t level;
-		union srvsvc_NetSrvInfo info;/* [switch_is(level)] */
+		union srvsvc_NetSrvInfo *info;/* [ref,switch_is(level)] */
 		uint32_t *parm_error;/* [unique] */
 	} in;
 
diff --git a/source/librpc/idl/srvsvc.idl b/source/librpc/idl/srvsvc.idl
index 2f23fd1..885de18 100644
--- a/source/librpc/idl/srvsvc.idl
+++ b/source/librpc/idl/srvsvc.idl
@@ -1120,7 +1120,7 @@ import "security.idl", "svcctl.idl";
 	WERROR srvsvc_NetSrvSetInfo(
 		[in,unique]   [string,charset(UTF16)] uint16 *server_unc,
 		[in]   uint32 level,
-		[in,switch_is(level)] srvsvc_NetSrvInfo info,
+		[in,ref,switch_is(level)] srvsvc_NetSrvInfo *info,
 		[in,out,unique]   uint32 *parm_error
 		);
 
diff --git a/source/rpc_client/cli_srvsvc.c b/source/rpc_client/cli_srvsvc.c
index e5d9b4c..02e52b3 100644
--- a/source/rpc_client/cli_srvsvc.c
+++ b/source/rpc_client/cli_srvsvc.c
@@ -24,40 +24,6 @@
 
 #include "includes.h"
 
-WERROR rpccli_srvsvc_net_srv_get_info(struct rpc_pipe_client *cli, 
-				   TALLOC_CTX *mem_ctx,
-				   uint32 switch_value, SRV_INFO_CTR *ctr)
-{
-	prs_struct qbuf, rbuf;
-	SRV_Q_NET_SRV_GET_INFO q;
-	SRV_R_NET_SRV_GET_INFO r;
-	WERROR result = W_ERROR(ERRgeneral);
-	fstring server;
-
-	ZERO_STRUCT(q);
-	ZERO_STRUCT(r);
-
-	/* Initialise input parameters */
-
-	slprintf(server, sizeof(fstring)-1, "\\\\%s", cli->cli->desthost);
-	strupper_m(server);
-
-	init_srv_q_net_srv_get_info(&q, server, switch_value);
-	r.ctr = ctr;
-
-	/* Marshall data and send request */
-
-	CLI_DO_RPC_WERR(cli, mem_ctx, PI_SRVSVC, SRV_NET_SRV_GET_INFO,
-		q, r,
-		qbuf, rbuf,
-		srv_io_q_net_srv_get_info,
-		srv_io_r_net_srv_get_info,
-		WERR_GENERAL_FAILURE);
-
-	result = r.status;
-	return result;
-}
-
 WERROR rpccli_srvsvc_net_share_enum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
 				 uint32 info_level, SRV_SHARE_INFO_CTR *ctr,
 				 int preferred_len, ENUM_HND *hnd)
diff --git a/source/rpc_client/init_srvsvc.c b/source/rpc_client/init_srvsvc.c
new file mode 100644
index 0000000..a4ee54c
--- /dev/null
+++ b/source/rpc_client/init_srvsvc.c
@@ -0,0 +1,86 @@
+/*
+ *  Unix SMB/CIFS implementation.
+ *  RPC Pipe client / server routines
+ *  Copyright (C) Guenther Deschner                  2008.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "includes.h"
+
+/*******************************************************************
+ inits a srvsvc_NetSrvInfo102 structure
+********************************************************************/
+
+void init_srvsvc_NetSrvInfo102(struct srvsvc_NetSrvInfo102 *r,
+			       enum srvsvc_PlatformId platform_id,
+			       const char *server_name,
+			       uint32_t version_major,
+			       uint32_t version_minor,
+			       uint32_t server_type,
+			       const char *comment,
+			       uint32_t users,
+			       uint32_t disc,
+			       uint32_t hidden,
+			       uint32_t announce,
+			       uint32_t anndelta,
+			       uint32_t licenses,
+			       const char *userpath)
+{
+	r->platform_id = platform_id;
+	r->server_name = server_name;
+	r->version_major = version_major;
+	r->version_minor = version_minor;
+	r->server_type = server_type;
+	r->comment = comment;
+	r->users = users;
+	r->disc = disc;
+	r->hidden = hidden;
+	r->announce = announce;
+	r->anndelta = anndelta;
+	r->licenses = licenses;
+	r->userpath = userpath;
+}
+
+/*******************************************************************
+ inits a srvsvc_NetSrvInfo101 structure
+********************************************************************/
+
+void init_srvsvc_NetSrvInfo101(struct srvsvc_NetSrvInfo101 *r,
+			       enum srvsvc_PlatformId platform_id,
+			       const char *server_name,
+			       uint32_t version_major,
+			       uint32_t version_minor,
+			       uint32_t server_type,
+			       const char *comment)
+{
+	r->platform_id = platform_id;
+	r->server_name = server_name;
+	r->version_major = version_major;
+	r->version_minor = version_minor;
+	r->server_type = server_type;
+	r->comment = comment;
+}
+
+/*******************************************************************
+ inits a srvsvc_NetSrvInfo100 structure
+********************************************************************/
+
+void init_srvsvc_NetSrvInfo100(struct srvsvc_NetSrvInfo100 *r,
+			       enum srvsvc_PlatformId platform_id,
+			       const char *server_name)
+{
+	r->platform_id = platform_id;
+	r->server_name = server_name;
+}
diff --git a/source/rpc_parse/parse_srv.c b/source/rpc_parse/parse_srv.c
index 954aa80..136aed5 100644
--- a/source/rpc_parse/parse_srv.c
+++ b/source/rpc_parse/parse_srv.c
@@ -2619,399 +2619,6 @@ bool srv_io_r_net_file_enum(const char *desc, SRV_R_NET_FILE_ENUM *r_n, prs_stru
 }
 
 /*******************************************************************
- Inits a SRV_INFO_100 structure.
- ********************************************************************/
-
-void init_srv_info_100(SRV_INFO_100 *sv100, uint32 platform_id, const char *name)
-{
-	DEBUG(5,("init_srv_info_100\n"));
-
-	sv100->platform_id  = platform_id;
-	init_buf_unistr2(&sv100->uni_name, &sv100->ptr_name, name);
-}
-
-/*******************************************************************
- Reads or writes a SRV_INFO_101 structure.
- ********************************************************************/
-
-static bool srv_io_info_100(const char *desc, SRV_INFO_100 *sv100, prs_struct *ps, int depth)
-{
-	if (sv100 == NULL)
-		return False;
-
-	prs_debug(ps, depth, desc, "srv_io_info_100");
-	depth++;
-
-	if(!prs_align(ps))
-		return False;
-
-	if(!prs_uint32("platform_id ", ps, depth, &sv100->platform_id))
-		return False;
-	if(!prs_uint32("ptr_name    ", ps, depth, &sv100->ptr_name))
-		return False;
-
-	if(!smb_io_unistr2("uni_name    ", &sv100->uni_name, True, ps, depth))
-		return False;
-
-	return True;
-}
-
-
-/*******************************************************************
- Inits a SRV_INFO_101 structure.
- ********************************************************************/
-
-void init_srv_info_101(SRV_INFO_101 *sv101, uint32 platform_id, const char *name,
-				uint32 ver_major, uint32 ver_minor,
-				uint32 srv_type, const char *comment)
-{
-	DEBUG(5,("init_srv_info_101\n"));
-
-	sv101->platform_id  = platform_id;
-	init_buf_unistr2(&sv101->uni_name, &sv101->ptr_name, name);
-	sv101->ver_major    = ver_major;
-	sv101->ver_minor    = ver_minor;
-	sv101->srv_type     = srv_type;
-	init_buf_unistr2(&sv101->uni_comment, &sv101->ptr_comment, comment);
-}
-
-/*******************************************************************
- Reads or writes a SRV_INFO_101 structure.
- ********************************************************************/
-
-static bool srv_io_info_101(const char *desc, SRV_INFO_101 *sv101, prs_struct *ps, int depth)
-{
-	if (sv101 == NULL)
-		return False;
-
-	prs_debug(ps, depth, desc, "srv_io_info_101");
-	depth++;
-
-	if(!prs_align(ps))
-		return False;
-
-	if(!prs_uint32("platform_id ", ps, depth, &sv101->platform_id))
-		return False;
-	if(!prs_uint32("ptr_name    ", ps, depth, &sv101->ptr_name))
-		return False;
-	if(!prs_uint32("ver_major   ", ps, depth, &sv101->ver_major))
-		return False;
-	if(!prs_uint32("ver_minor   ", ps, depth, &sv101->ver_minor))
-		return False;
-	if(!prs_uint32("srv_type    ", ps, depth, &sv101->srv_type))
-		return False;
-	if(!prs_uint32("ptr_comment ", ps, depth, &sv101->ptr_comment))
-		return False;
-
-	if(!prs_align(ps))
-		return False;
-
-	if(!smb_io_unistr2("uni_name    ", &sv101->uni_name, True, ps, depth))
-		return False;
-	if(!smb_io_unistr2("uni_comment ", &sv101->uni_comment, True, ps, depth))
-		return False;
-
-	return True;
-}
-
-/*******************************************************************
- Inits a SRV_INFO_102 structure.
- ********************************************************************/
-
-void init_srv_info_102(SRV_INFO_102 *sv102, uint32 platform_id, const char *name,
-				const char *comment, uint32 ver_major, uint32 ver_minor,
-				uint32 srv_type, uint32 users, uint32 disc, uint32 hidden,
-				uint32 announce, uint32 ann_delta, uint32 licenses,
-				const char *usr_path)
-{


-- 
Samba Shared Repository


More information about the samba-cvs mailing list