summaryrefslogtreecommitdiff
path: root/source3/rpc_parse
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2006-02-03 22:19:41 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:06:23 -0500
commit0af1500fc0bafe61019f1b2ab1d9e1d369221240 (patch)
tree653fc2533795458d5f9696402285d9f14e527a21 /source3/rpc_parse
parent21a30a1346c9f9a25659a0cea0d276d8c2e6ddca (diff)
downloadsamba-0af1500fc0bafe61019f1b2ab1d9e1d369221240.tar.gz
samba-0af1500fc0bafe61019f1b2ab1d9e1d369221240.tar.bz2
samba-0af1500fc0bafe61019f1b2ab1d9e1d369221240.zip
r13316: Let the carnage begin....
Sync with trunk as off r13315 (This used to be commit 17e63ac4ed8325c0d44fe62b2442449f3298559f)
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r--source3/rpc_parse/parse_dfs.c2789
-rw-r--r--source3/rpc_parse/parse_lsa.c221
-rw-r--r--source3/rpc_parse/parse_net.c49
-rw-r--r--source3/rpc_parse/parse_prs.c29
-rw-r--r--source3/rpc_parse/parse_rpc.c10
-rw-r--r--source3/rpc_parse/parse_samr.c6
6 files changed, 2747 insertions, 357 deletions
diff --git a/source3/rpc_parse/parse_dfs.c b/source3/rpc_parse/parse_dfs.c
index f102e95004..f1d0705302 100644
--- a/source3/rpc_parse/parse_dfs.c
+++ b/source3/rpc_parse/parse_dfs.c
@@ -1,24 +1,6 @@
-/*
- * Unix SMB/CIFS implementation.
- * MSDfs RPC Pipe client / server routines
- * Copyright (C) Andrew Tridgell 1992-2000,
- * Copyright (C) Luke Kenneth Casson Leighton 1996-2000,
- * Copyright (C) Shirish Kalele 2000.
- * Copyright (C) Jeremy Allison 2001.
- *
- * 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 2 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, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+/*
+ * Unix SMB/CIFS implementation.
+ * parser auto-generated by pidl. DO NOT MODIFY!
*/
#include "includes.h"
@@ -26,519 +8,2660 @@
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_RPC_PARSE
-/*******************************************************************
-Make a DFS_Q_DFS_QUERY structure
-*******************************************************************/
-
-void init_dfs_q_dfs_exist(DFS_Q_DFS_EXIST *q_d)
+/* netdfs structures */
+BOOL init_netdfs_dfs_Info0(NETDFS_DFS_INFO0 *v)
{
- q_d->dummy = 0;
+ DEBUG(5,("init_netdfs_dfs_Info0\n"));
+
+ return True;
}
-/*************************************************************
- Read/write a DFS_Q_DFS_EXIST structure - dummy...
- ************************************************************/
+BOOL netdfs_io_dfs_Info0_p(const char *desc, NETDFS_DFS_INFO0 *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_dfs_Info0_p");
+ depth++;
+ return True;
+}
-BOOL dfs_io_q_dfs_exist(const char *desc, DFS_Q_DFS_EXIST *q_d, prs_struct *ps, int depth)
+BOOL netdfs_io_dfs_Info0_d(const char *desc, NETDFS_DFS_INFO0 *v, prs_struct *ps, int depth)
{
- if(q_d == NULL)
+ if (v == NULL)
return False;
-
- prs_debug(ps, depth, desc, "dfs_io_q_dfs_exist");
+
+ prs_debug(ps, depth, desc, "netdfs_io_dfs_Info0_d");
+ depth++;
+ return True;
+}
+BOOL init_netdfs_dfs_Info1(NETDFS_DFS_INFO1 *v, const char *path)
+{
+ DEBUG(5,("init_netdfs_dfs_Info1\n"));
+
+ if (path) {
+ v->ptr0_path = 1;
+ init_unistr2(&v->path, path, UNI_FLAGS_NONE);
+ } else {
+ v->ptr0_path = 0;
+ }
+
return True;
}
-
-/*************************************************************
- Read/write a DFS_R_DFS_EXIST structure
- ************************************************************/
-BOOL dfs_io_r_dfs_exist(const char *desc, DFS_R_DFS_EXIST *q_d, prs_struct *ps, int depth)
+BOOL netdfs_io_dfs_Info1_p(const char *desc, NETDFS_DFS_INFO1 *v, prs_struct *ps, int depth)
{
- if(q_d == NULL)
+ if (v == NULL)
return False;
-
- prs_debug(ps, depth, desc, "dfs_io_r_dfs_exist");
+
+ prs_debug(ps, depth, desc, "netdfs_io_dfs_Info1_p");
depth++;
-
- if(!prs_align(ps))
+ if (!prs_uint32("ptr0_path", ps, depth, &v->ptr0_path))
return False;
+
+
+ return True;
+}
- if(!prs_uint32("exist flag", ps, 0, &q_d->status))
+BOOL netdfs_io_dfs_Info1_d(const char *desc, NETDFS_DFS_INFO1 *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
return False;
-
+
+ prs_debug(ps, depth, desc, "netdfs_io_dfs_Info1_d");
+ depth++;
+ if (v->ptr0_path) {
+ if (!prs_align_custom(ps, 4))
+ return False;
+
+ if (!smb_io_unistr2("path", &v->path, 1, ps, depth))
+ return False;
+ }
+
return True;
}
-
-/*******************************************************************
-Make a DFS_Q_DFS_REMOVE structure
-*******************************************************************/
-BOOL init_dfs_q_dfs_remove(DFS_Q_DFS_REMOVE *q_d, const char *entrypath,
- const char *servername, const char *sharename)
+BOOL init_netdfs_dfs_Info2(NETDFS_DFS_INFO2 *v, const char *path, const char *comment, uint32 state, uint32 num_stores)
{
- DEBUG(5,("init_dfs_q_dfs_remove\n"));
- init_unistr2(&q_d->DfsEntryPath, entrypath, UNI_STR_TERMINATE);
- init_unistr2(&q_d->ServerName, servername, UNI_STR_TERMINATE);
- init_unistr2(&q_d->ShareName, sharename, UNI_STR_TERMINATE);
- q_d->ptr_ServerName = q_d->ptr_ShareName = 1;
+ DEBUG(5,("init_netdfs_dfs_Info2\n"));
+
+ if (path) {
+ v->ptr0_path = 1;
+ init_unistr2(&v->path, path, UNI_FLAGS_NONE);
+ } else {
+ v->ptr0_path = 0;
+ }
+
+ if (comment) {
+ v->ptr0_comment = 1;
+ init_unistr2(&v->comment, comment, UNI_FLAGS_NONE);
+ } else {
+ v->ptr0_comment = 0;
+ }
+
+ v->state = state;
+
+ v->num_stores = num_stores;
+
return True;
}
-/*******************************************************************
-Read/write a DFS_Q_DFS_REMOVE structure
-*******************************************************************/
-
-BOOL dfs_io_q_dfs_remove(const char *desc, DFS_Q_DFS_REMOVE *q_d, prs_struct *ps, int depth)
+BOOL netdfs_io_dfs_Info2_p(const char *desc, NETDFS_DFS_INFO2 *v, prs_struct *ps, int depth)
{
- if(q_d == NULL)
+ if (v == NULL)
return False;
-
- prs_debug(ps, depth, desc, "dfs_io_q_dfs_remove");
+
+ prs_debug(ps, depth, desc, "netdfs_io_dfs_Info2_p");
depth++;
-
- if(!prs_align(ps))
- return False;
-
- if(!smb_io_unistr2("DfsEntryPath",&q_d->DfsEntryPath, 1, ps, depth))
+ if (!prs_uint32("ptr0_path", ps, depth, &v->ptr0_path))
return False;
-
- if(!prs_align(ps))
+
+
+ if (!prs_uint32("ptr0_comment", ps, depth, &v->ptr0_comment))
return False;
-
- if(!prs_uint32("ptr_ServerName", ps, depth, &q_d->ptr_ServerName))
+
+
+ if (!prs_uint32("state", ps, depth, &v->state))
return False;
- if(q_d->ptr_ServerName)
- if (!smb_io_unistr2("ServerName",&q_d->ServerName, q_d->ptr_ServerName, ps, depth))
- return False;
- if(!prs_align(ps))
+
+ if (!prs_uint32("num_stores", ps, depth, &v->num_stores))
return False;
+
+ return True;
+}
- if(!prs_uint32("ptr_ShareName", ps, depth, &q_d->ptr_ShareName))
+BOOL netdfs_io_dfs_Info2_d(const char *desc, NETDFS_DFS_INFO2 *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
return False;
- if(q_d->ptr_ShareName)
- if (!smb_io_unistr2("ShareName",&q_d->ShareName, q_d->ptr_ShareName, ps, depth))
+
+ prs_debug(ps, depth, desc, "netdfs_io_dfs_Info2_d");
+ depth++;
+ if (v->ptr0_path) {
+ if (!prs_align_custom(ps, 4))
return False;
- if(!prs_align(ps))
- return False;
-
+
+ if (!smb_io_unistr2("path", &v->path, 1, ps, depth))
+ return False;
+ }
+
+ if (v->ptr0_comment) {
+ if (!prs_align_custom(ps, 4))
+ return False;
+
+ if (!smb_io_unistr2("comment", &v->comment, 1, ps, depth))
+ return False;
+ }
+
+
+
return True;
}
-/*******************************************************************
-Read/write a DFS_R_DFS_REMOVE structure
-*******************************************************************/
+BOOL init_netdfs_dfs_StorageInfo(NETDFS_DFS_STORAGEINFO *v, uint32 state, const char *server, const char *share)
+{
+ DEBUG(5,("init_netdfs_dfs_StorageInfo\n"));
+
+ v->state = state;
+
+ if (server) {
+ v->ptr0_server = 1;
+ init_unistr2(&v->server, server, UNI_FLAGS_NONE);
+ } else {
+ v->ptr0_server = 0;
+ }
+
+ if (share) {
+ v->ptr0_share = 1;
+ init_unistr2(&v->share, share, UNI_FLAGS_NONE);
+ } else {
+ v->ptr0_share = 0;
+ }
+
+ return True;
+}
-BOOL dfs_io_r_dfs_remove(const char *desc, DFS_R_DFS_REMOVE *r_d, prs_struct *ps, int depth)
+BOOL netdfs_io_dfs_StorageInfo_p(const char *desc, NETDFS_DFS_STORAGEINFO *v, prs_struct *ps, int depth)
{
- if(r_d == NULL)
+ if (v == NULL)
return False;
-
- prs_debug(ps, depth, desc, "dfs_io_r_dfs_remove");
+
+ prs_debug(ps, depth, desc, "netdfs_io_dfs_StorageInfo_p");
depth++;
-
- if(!prs_werror("status", ps, depth, &r_d->status))
+ if (!prs_uint32("state", ps, depth, &v->state))
return False;
-
+
+ if (!prs_uint32("ptr0_server", ps, depth, &v->ptr0_server))
+ return False;
+
+
+ if (!prs_uint32("ptr0_share", ps, depth, &v->ptr0_share))
+ return False;
+
+
return True;
}
-/*******************************************************************
-Make a DFS_Q_DFS_ADD structure
-*******************************************************************/
+BOOL netdfs_io_dfs_StorageInfo_d(const char *desc, NETDFS_DFS_STORAGEINFO *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_dfs_StorageInfo_d");
+ depth++;
+
+ if (v->ptr0_server) {
+ if (!prs_align_custom(ps, 4))
+ return False;
+
+ if (!smb_io_unistr2("server", &v->server, 1, ps, depth))
+ return False;
+ }
+
+ if (v->ptr0_share) {
+ if (!prs_align_custom(ps, 4))
+ return False;
+
+ if (!smb_io_unistr2("share", &v->share, 1, ps, depth))
+ return False;
+ }
+
+ return True;
+}
-BOOL init_dfs_q_dfs_add(DFS_Q_DFS_ADD *q_d, const char *entrypath,
- const char *servername, const char *sharename,
- const char *comment, uint32 flags)
+BOOL init_netdfs_dfs_Info3(NETDFS_DFS_INFO3 *v, const char *path, const char *comment, uint32 state, uint32 num_stores, NETDFS_DFS_STORAGEINFO **stores)
{
- DEBUG(5,("init_dfs_q_dfs_add\n"));
- q_d->ptr_DfsEntryPath = q_d->ptr_ServerName = q_d->ptr_ShareName = 1;
- init_unistr2(&q_d->DfsEntryPath, entrypath, UNI_STR_TERMINATE);
- init_unistr2(&q_d->ServerName, servername, UNI_STR_TERMINATE);
- init_unistr2(&q_d->ShareName, sharename, UNI_STR_TERMINATE);
- if(comment != NULL) {
- init_unistr2(&q_d->Comment, comment,UNI_STR_TERMINATE);
- q_d->ptr_Comment = 1;
+ DEBUG(5,("init_netdfs_dfs_Info3\n"));
+
+ if (path) {
+ v->ptr0_path = 1;
+ init_unistr2(&v->path, path, UNI_FLAGS_NONE);
} else {
- q_d->ptr_Comment = 0;
+ v->ptr0_path = 0;
}
-
- q_d->Flags = flags;
+
+ if (comment) {
+ v->ptr0_comment = 1;
+ init_unistr2(&v->comment, comment, UNI_FLAGS_NONE);
+ } else {
+ v->ptr0_comment = 0;
+ }
+
+ v->state = state;
+
+ v->num_stores = num_stores;
+
+ if (stores) {
+ v->ptr0_stores = 1;
+ v->stores = *stores;
+ } else {
+ v->ptr0_stores = 0;
+ }
+
return True;
}
-/************************************************************
- Read/write a DFS_Q_DFS_ADD structure
- ************************************************************/
-
-BOOL dfs_io_q_dfs_add(const char *desc, DFS_Q_DFS_ADD *q_d, prs_struct *ps, int depth)
+BOOL netdfs_io_dfs_Info3_p(const char *desc, NETDFS_DFS_INFO3 *v, prs_struct *ps, int depth)
{
- if(q_d == NULL)
+ if (v == NULL)
return False;
-
- prs_debug(ps, depth, desc, "dfs_io_q_dfs_add");
+
+ prs_debug(ps, depth, desc, "netdfs_io_dfs_Info3_p");
depth++;
-
- if(!prs_align(ps))
+ if (!prs_uint32("ptr0_path", ps, depth, &v->ptr0_path))
return False;
-
- if(!smb_io_unistr2("DfsEntryPath",&q_d->DfsEntryPath, 1, ps, depth))
+
+
+ if (!prs_uint32("ptr0_comment", ps, depth, &v->ptr0_comment))
return False;
- if(!prs_align(ps))
+
+
+ if (!prs_uint32("state", ps, depth, &v->state))
return False;
-
- if(!smb_io_unistr2("ServerName",&q_d->ServerName, 1, ps, depth))
+
+ if (!prs_uint32("num_stores", ps, depth, &v->num_stores))
return False;
- if(!prs_align(ps))
+
+ if (!prs_uint32("ptr0_stores", ps, depth, &v->ptr0_stores))
return False;
+
+
+ return True;
+}
+
+BOOL netdfs_io_dfs_Info3_d(const char *desc, NETDFS_DFS_INFO3 *v, prs_struct *ps, int depth)
+{
+ uint32 i_stores_1;
+
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_dfs_Info3_d");
+ depth++;
+ if (v->ptr0_path) {
+ if (!prs_align_custom(ps, 4))
+ return False;
+
+ if (!smb_io_unistr2("path", &v->path, 1, ps, depth))
+ return False;
+ }
+
+ if (v->ptr0_comment) {
+ if (!prs_align_custom(ps, 4))
+ return False;
+
+ if (!smb_io_unistr2("comment", &v->comment, 1, ps, depth))
+ return False;
+ }
+
+
+
+ if (v->ptr0_stores) {
+ if (!prs_align_custom(ps, 4))
+ return False;
+
+ if (!prs_uint32("size_stores", ps, depth, &v->size_stores))
+ return False;
+
+ if (UNMARSHALLING(ps)) {
+ v->stores = (void *)PRS_ALLOC_MEM_VOID(ps,sizeof(*v->stores)*v->num_stores);
+ }
+ for (i_stores_1=0; i_stores_1<v->num_stores;i_stores_1++) {
+ if (!netdfs_io_dfs_StorageInfo_p("stores", &v->stores[i_stores_1], ps, depth))
+ return False;
+ }
+ for (i_stores_1=0; i_stores_1<v->num_stores;i_stores_1++) {
+ if (!netdfs_io_dfs_StorageInfo_d("stores", &v->stores[i_stores_1], ps, depth))
+ return False;
+ }
+ }
+
+ return True;
+}
- if(!prs_uint32("ptr_ShareName", ps, depth, &q_d->ptr_ShareName))
+BOOL init_netdfs_dfs_Info4(NETDFS_DFS_INFO4 *v, const char *path, const char *comment, uint32 state, uint32 timeout, struct uuid guid, uint32 num_stores, NETDFS_DFS_STORAGEINFO **stores)
+{
+ DEBUG(5,("init_netdfs_dfs_Info4\n"));
+
+ if (path) {
+ v->ptr0_path = 1;
+ init_unistr2(&v->path, path, UNI_FLAGS_NONE);
+ } else {
+ v->ptr0_path = 0;
+ }
+
+ if (comment) {
+ v->ptr0_comment = 1;
+ init_unistr2(&v->comment, comment, UNI_FLAGS_NONE);
+ } else {
+ v->ptr0_comment = 0;
+ }
+
+ v->state = state;
+
+ v->timeout = timeout;
+
+
+
+ v->num_stores = num_stores;
+
+ if (stores) {
+ v->ptr0_stores = 1;
+ v->stores = *stores;
+ } else {
+ v->ptr0_stores = 0;
+ }
+
+ return True;
+}
+
+BOOL netdfs_io_dfs_Info4_p(const char *desc, NETDFS_DFS_INFO4 *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
return False;
- if(!smb_io_unistr2("ShareName",&q_d->ShareName, 1, ps, depth))
+
+ prs_debug(ps, depth, desc, "netdfs_io_dfs_Info4_p");
+ depth++;
+ if (!prs_uint32("ptr0_path", ps, depth, &v->ptr0_path))
return False;
- if(!prs_align(ps))
+
+
+ if (!prs_uint32("ptr0_comment", ps, depth, &v->ptr0_comment))
return False;
-
- if(!prs_uint32("ptr_Comment", ps, depth, &q_d->ptr_Comment))
+
+
+ if (!prs_uint32("state", ps, depth, &v->state))
return False;
- if(!smb_io_unistr2("",&q_d->Comment, q_d->ptr_Comment , ps, depth))
+
+ if (!prs_uint32("timeout", ps, depth, &v->timeout))
return False;
- if(!prs_align(ps))
+
+ if (!smb_io_uuid("guid", &v->guid, ps, depth))
return False;
+
+ if (!prs_uint32("num_stores", ps, depth, &v->num_stores))
+ return False;
+
+ if (!prs_uint32("ptr0_stores", ps, depth, &v->ptr0_stores))
+ return False;
+
+
+ return True;
+}
- if(!prs_uint32("Flags", ps, depth, &q_d->Flags))
- return True;
-
+BOOL netdfs_io_dfs_Info4_d(const char *desc, NETDFS_DFS_INFO4 *v, prs_struct *ps, int depth)
+{
+ uint32 i_stores_1;
+
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_dfs_Info4_d");
+ depth++;
+ if (v->ptr0_path) {
+ if (!prs_align_custom(ps, 4))
+ return False;
+
+ if (!smb_io_unistr2("path", &v->path, 1, ps, depth))
+ return False;
+ }
+
+ if (v->ptr0_comment) {
+ if (!prs_align_custom(ps, 4))
+ return False;
+
+ if (!smb_io_unistr2("comment", &v->comment, 1, ps, depth))
+ return False;
+ }
+
+
+
+
+
+ if (v->ptr0_stores) {
+ if (!prs_align_custom(ps, 4))
+ return False;
+
+ if (!prs_uint32("size_stores", ps, depth, &v->size_stores))
+ return False;
+
+ if (UNMARSHALLING(ps)) {
+ v->stores = (void *)PRS_ALLOC_MEM_VOID(ps,sizeof(*v->stores)*v->num_stores);
+ }
+ for (i_stores_1=0; i_stores_1<v->num_stores;i_stores_1++) {
+ if (!netdfs_io_dfs_StorageInfo_p("stores", &v->stores[i_stores_1], ps, depth))
+ return False;
+ }
+ for (i_stores_1=0; i_stores_1<v->num_stores;i_stores_1++) {
+ if (!netdfs_io_dfs_StorageInfo_d("stores", &v->stores[i_stores_1], ps, depth))
+ return False;
+ }
+ }
+
return True;
}
-/************************************************************
- Read/write a DFS_R_DFS_ADD structure
- ************************************************************/
+BOOL init_netdfs_dfs_Info100(NETDFS_DFS_INFO100 *v, const char *comment)
+{
+ DEBUG(5,("init_netdfs_dfs_Info100\n"));
+
+ if (comment) {
+ v->ptr0_comment = 1;
+ init_unistr2(&v->comment, comment, UNI_FLAGS_NONE);
+ } else {
+ v->ptr0_comment = 0;
+ }
+
+ return True;
+}
-BOOL dfs_io_r_dfs_add(const char *desc, DFS_R_DFS_ADD *r_d, prs_struct *ps, int depth)
+BOOL netdfs_io_dfs_Info100_p(const char *desc, NETDFS_DFS_INFO100 *v, prs_struct *ps, int depth)
{
- if(r_d == NULL)
+ if (v == NULL)
return False;
-
- prs_debug(ps, depth, desc, "dfs_io_r_dfs_add");
+
+ prs_debug(ps, depth, desc, "netdfs_io_dfs_Info100_p");
depth++;
-
- if(!prs_werror("status", ps, depth, &r_d->status))
+ if (!prs_uint32("ptr0_comment", ps, depth, &v->ptr0_comment))
return False;
-
+
+
return True;
}
-BOOL init_dfs_q_dfs_get_info(DFS_Q_DFS_GET_INFO *q_d, const char *entrypath,
- const char *servername, const char *sharename,
- uint32 info_level)
+BOOL netdfs_io_dfs_Info100_d(const char *desc, NETDFS_DFS_INFO100 *v, prs_struct *ps, int depth)
{
- DEBUG(5,("init_dfs_q2_get_info\n"));
- init_unistr2(&q_d->uni_path, entrypath, UNI_STR_TERMINATE);
- init_unistr2(&q_d->uni_server, servername, UNI_STR_TERMINATE);
- init_unistr2(&q_d->uni_share, sharename, UNI_STR_TERMINATE);
- q_d->level = info_level;
- q_d->ptr_server = q_d->ptr_share = 1;
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_dfs_Info100_d");
+ depth++;
+ if (v->ptr0_comment) {
+ if (!prs_align_custom(ps, 4))
+ return False;
+
+ if (!smb_io_unistr2("comment", &v->comment, 1, ps, depth))
+ return False;
+ }
+
return True;
}
-/************************************************************
- Read/write a DFS_Q_GET_INFO structure
- ************************************************************/
+BOOL init_netdfs_dfs_Info101(NETDFS_DFS_INFO101 *v, uint32 state)
+{
+ DEBUG(5,("init_netdfs_dfs_Info101\n"));
+
+ v->state = state;
+
+ return True;
+}
-BOOL dfs_io_q_dfs_get_info(const char *desc, DFS_Q_DFS_GET_INFO* q_i, prs_struct* ps, int depth)
+BOOL netdfs_io_dfs_Info101_p(const char *desc, NETDFS_DFS_INFO101 *v, prs_struct *ps, int depth)
{
- if(q_i == NULL)
+ if (v == NULL)
return False;
-
- prs_debug(ps, depth, desc, "dfs_io_q_dfs_get_info");
+
+ prs_debug(ps, depth, desc, "netdfs_io_dfs_Info101_p");
depth++;
-
- if(!smb_io_unistr2("",&q_i->uni_path, 1, ps, depth))
+ if (!prs_uint32("state", ps, depth, &v->state))
return False;
+
+ return True;
+}
- if(!prs_align(ps))
+BOOL netdfs_io_dfs_Info101_d(const char *desc, NETDFS_DFS_INFO101 *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_dfs_Info101_d");
+ depth++;
+
+ return True;
+}
- if(!prs_uint32("ptr_server", ps, depth, &q_i->ptr_server))
+BOOL init_netdfs_dfs_Info102(NETDFS_DFS_INFO102 *v, uint32 timeout)
+{
+ DEBUG(5,("init_netdfs_dfs_Info102\n"));
+
+ v->timeout = timeout;
+
+ return True;
+}
+
+BOOL netdfs_io_dfs_Info102_p(const char *desc, NETDFS_DFS_INFO102 *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_dfs_Info102_p");
+ depth++;
+ if (!prs_uint32("timeout", ps, depth, &v->timeout))
+ return False;
+
+ return True;
+}
- if(q_i->ptr_server)
- if (!smb_io_unistr2("",&q_i->uni_server, q_i->ptr_server, ps, depth))
- return False;
- if(!prs_align(ps))
+BOOL netdfs_io_dfs_Info102_d(const char *desc, NETDFS_DFS_INFO102 *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_dfs_Info102_d");
+ depth++;
+
+ return True;
+}
- if(!prs_uint32("ptr_share", ps, depth, &q_i->ptr_share))
+BOOL init_netdfs_dfs_Info200(NETDFS_DFS_INFO200 *v, const char *dom_root)
+{
+ DEBUG(5,("init_netdfs_dfs_Info200\n"));
+
+ if (dom_root) {
+ v->ptr0_dom_root = 1;
+ init_unistr2(&v->dom_root, dom_root, UNI_FLAGS_NONE);
+ } else {
+ v->ptr0_dom_root = 0;
+ }
+
+ return True;
+}
+
+BOOL netdfs_io_dfs_Info200_p(const char *desc, NETDFS_DFS_INFO200 *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
return False;
- if(q_i->ptr_share)
- if(!smb_io_unistr2("", &q_i->uni_share, q_i->ptr_share, ps, depth))
- return False;
- if(!prs_align(ps))
+
+ prs_debug(ps, depth, desc, "netdfs_io_dfs_Info200_p");
+ depth++;
+ if (!prs_uint32("ptr0_dom_root", ps, depth, &v->ptr0_dom_root))
return False;
+
+
+ return True;
+}
- if(!prs_uint32("level", ps, depth, &q_i->level))
+BOOL netdfs_io_dfs_Info200_d(const char *desc, NETDFS_DFS_INFO200 *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_dfs_Info200_d");
+ depth++;
+ if (v->ptr0_dom_root) {
+ if (!prs_align_custom(ps, 4))
+ return False;
+
+ if (!smb_io_unistr2("dom_root", &v->dom_root, 1, ps, depth))
+ return False;
+ }
+
return True;
}
-/************************************************************
- Read/write a DFS_R_GET_INFO structure
- ************************************************************/
+BOOL init_netdfs_dfs_Info300(NETDFS_DFS_INFO300 *v, uint32 flags, const char *dom_root)
+{
+ DEBUG(5,("init_netdfs_dfs_Info300\n"));
+
+ v->flags = flags;
+
+ if (dom_root) {
+ v->ptr0_dom_root = 1;
+ init_unistr2(&v->dom_root, dom_root, UNI_FLAGS_NONE);
+ } else {
+ v->ptr0_dom_root = 0;
+ }
+
+ return True;
+}
-BOOL dfs_io_r_dfs_get_info(const char *desc, DFS_R_DFS_GET_INFO* r_i, prs_struct* ps, int depth)
+BOOL netdfs_io_dfs_Info300_p(const char *desc, NETDFS_DFS_INFO300 *v, prs_struct *ps, int depth)
{
- if(r_i == NULL)
+ if (v == NULL)
return False;
-
- if(!prs_uint32("level", ps, depth, &r_i->level))
+
+ prs_debug(ps, depth, desc, "netdfs_io_dfs_Info300_p");
+ depth++;
+ if (!prs_uint32("flags", ps, depth, &v->flags))
return False;
- if(!prs_uint32("ptr_ctr", ps, depth, &r_i->ptr_ctr))
+
+ if (!prs_uint32("ptr0_dom_root", ps, depth, &v->ptr0_dom_root))
return False;
+
+
+ return True;
+}
- if(!dfs_io_dfs_info_ctr("", &r_i->ctr, 1, r_i->level, ps, depth))
+BOOL netdfs_io_dfs_Info300_d(const char *desc, NETDFS_DFS_INFO300 *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
return False;
- if(!prs_werror("status", ps, depth, &r_i->status))
+
+ prs_debug(ps, depth, desc, "netdfs_io_dfs_Info300_d");
+ depth++;
+
+ if (v->ptr0_dom_root) {
+ if (!prs_align_custom(ps, 4))
+ return False;
+
+ if (!smb_io_unistr2("dom_root", &v->dom_root, 1, ps, depth))
+ return False;
+ }
+
+ return True;
+}
+
+BOOL netdfs_io_dfs_Info_p(const char *desc, NETDFS_DFS_INFO_CTR* v, prs_struct *ps, int depth)
+{
+ if (!prs_uint32("switch_value", ps, depth, &v->switch_value))
return False;
+
+ switch (v->switch_value) {
+ case 0:
+ depth++;
+ if (!prs_uint32("ptr0_info0", ps, depth, &v->ptr0))
+ return False;
+
+ depth--;
+ break;
+
+ case 1:
+ depth++;
+ if (!prs_uint32("ptr0_info1", ps, depth, &v->ptr0))
+ return False;
+
+ depth--;
+ break;
+
+ case 2:
+ depth++;
+ if (!prs_uint32("ptr0_info2", ps, depth, &v->ptr0))
+ return False;
+
+ depth--;
+ break;
+
+ case 3:
+ depth++;
+ if (!prs_uint32("ptr0_info3", ps, depth, &v->ptr0))
+ return False;
+
+ depth--;
+ break;
+
+ case 4:
+ depth++;
+ if (!prs_uint32("ptr0_info4", ps, depth, &v->ptr0))
+ return False;
+
+ depth--;
+ break;
+
+ case 100:
+ depth++;
+ if (!prs_uint32("ptr0_info100", ps, depth, &v->ptr0))
+ return False;
+
+ depth--;
+ break;
+
+ case 101:
+ depth++;
+ if (!prs_uint32("ptr0_info101", ps, depth, &v->ptr0))
+ return False;
+
+ depth--;
+ break;
+
+ case 102:
+ depth++;
+ if (!prs_uint32("ptr0_info102", ps, depth, &v->ptr0))
+ return False;
+
+ depth--;
+ break;
+
+ default:
+ return False;
+
+ }
+
+ return True;
+}
+
+BOOL netdfs_io_dfs_Info_d(const char *desc, NETDFS_DFS_INFO_CTR* v, prs_struct *ps, int depth)
+{
+ switch (v->switch_value) {
+ case 0:
+ depth++;
+ if (v->ptr0) {
+ if (!prs_align_custom(ps, 1))
+ return False;
+
+ if (!netdfs_io_dfs_Info0_p("info0", &v->u.info0, ps, depth))
+ return False;
+ if (!netdfs_io_dfs_Info0_d("info0", &v->u.info0, ps, depth))
+ return False;
+ }
+ depth--;
+ break;
+
+ case 1:
+ depth++;
+ if (v->ptr0) {
+ if (!prs_align_custom(ps, 4))
+ return False;
+
+ if (!netdfs_io_dfs_Info1_p("info1", &v->u.info1, ps, depth))
+ return False;
+ if (!netdfs_io_dfs_Info1_d("info1", &v->u.info1, ps, depth))
+ return False;
+ }
+ depth--;
+ break;
+
+ case 2:
+ depth++;
+ if (v->ptr0) {
+ if (!prs_align_custom(ps, 4))
+ return False;
+
+ if (!netdfs_io_dfs_Info2_p("info2", &v->u.info2, ps, depth))
+ return False;
+ if (!netdfs_io_dfs_Info2_d("info2", &v->u.info2, ps, depth))
+ return False;
+ }
+ depth--;
+ break;
+
+ case 3:
+ depth++;
+ if (v->ptr0) {
+ if (!prs_align_custom(ps, 4))
+ return False;
+
+ if (!netdfs_io_dfs_Info3_p("info3", &v->u.info3, ps, depth))
+ return False;
+ if (!netdfs_io_dfs_Info3_d("info3", &v->u.info3, ps, depth))
+ return False;
+ }
+ depth--;
+ break;
+
+ case 4:
+ depth++;
+ if (v->ptr0) {
+ if (!prs_align_custom(ps, 4))
+ return False;
+
+ if (!netdfs_io_dfs_Info4_p("info4", &v->u.info4, ps, depth))
+ return False;
+ if (!netdfs_io_dfs_Info4_d("info4", &v->u.info4, ps, depth))
+ return False;
+ }
+ depth--;
+ break;
+
+ case 100:
+ depth++;
+ if (v->ptr0) {
+ if (!prs_align_custom(ps, 4))
+ return False;
+
+ if (!netdfs_io_dfs_Info100_p("info100", &v->u.info100, ps, depth))
+ return False;
+ if (!netdfs_io_dfs_Info100_d("info100", &v->u.info100, ps, depth))
+ return False;
+ }
+ depth--;
+ break;
+
+ case 101:
+ depth++;
+ if (v->ptr0) {
+ if (!prs_align_custom(ps, 4))
+ return False;
+
+ if (!netdfs_io_dfs_Info101_p("info101", &v->u.info101, ps, depth))
+ return False;
+ if (!netdfs_io_dfs_Info101_d("info101", &v->u.info101, ps, depth))
+ return False;
+ }
+ depth--;
+ break;
+
+ case 102:
+ depth++;
+ if (v->ptr0) {
+ if (!prs_align_custom(ps, 4))
+ return False;
+
+ if (!netdfs_io_dfs_Info102_p("info102", &v->u.info102, ps, depth))
+ return False;
+ if (!netdfs_io_dfs_Info102_d("info102", &v->u.info102, ps, depth))
+ return False;
+ }
+ depth--;
+ break;
+
+ }
+
return True;
}
-
-/************************************************************
- Make a DFS_Q_DFS_ENUM structure
- ************************************************************/
-BOOL init_dfs_q_dfs_enum(DFS_Q_DFS_ENUM *q_d, uint32 level, DFS_INFO_CTR *ctr)
+BOOL init_netdfs_dfs_EnumArray1(NETDFS_DFS_ENUMARRAY1 *v, uint32 count, NETDFS_DFS_INFO1 **s)
{
- q_d->level = level;
- q_d->maxpreflen = -1;
- q_d->ptr_buffer = 1;
- q_d->level2 = level;
-
- q_d->ptr_num_entries = 1;
- q_d->num_entries = 0;
- q_d->num_entries2 = 0;
- q_d->reshnd.ptr_hnd = 1;
- q_d->reshnd.handle = 0;
+ DEBUG(5,("init_netdfs_dfs_EnumArray1\n"));
+
+ v->count = count;
+
+ if (s) {
+ v->ptr0_s = 1;
+ v->s = *s;
+ } else {
+ v->ptr0_s = 0;
+ }
+
return True;
}
-
-/************************************************************
- Read or write the DFS_Q_DFS_ENUM structure
- ************************************************************/
-BOOL dfs_io_q_dfs_enum(const char *desc, DFS_Q_DFS_ENUM *q_d, prs_struct *ps, int depth)
+BOOL netdfs_io_dfs_EnumArray1_p(const char *desc, NETDFS_DFS_ENUMARRAY1 *v, prs_struct *ps, int depth)
{
- if(q_d == NULL)
+ if (v == NULL)
return False;
-
- prs_debug(ps, depth, desc, "dfs_io_q_dfs_enum");
+
+ prs_debug(ps, depth, desc, "netdfs_io_dfs_EnumArray1_p");
depth++;
-
- if(!prs_align(ps))
+ if (!prs_uint32("count", ps, depth, &v->count))
return False;
-
- if(!prs_uint32("level", ps, depth, &q_d->level))
+
+ if (!prs_uint32("ptr0_s", ps, depth, &v->ptr0_s))
return False;
- if(!prs_uint32("maxpreflen", ps, depth, &q_d->maxpreflen))
+
+
+ return True;
+}
+
+BOOL netdfs_io_dfs_EnumArray1_d(const char *desc, NETDFS_DFS_ENUMARRAY1 *v, prs_struct *ps, int depth)
+{
+ uint32 i_s_1;
+
+ if (v == NULL)
return False;
- if(!prs_uint32("ptr_buffer", ps, depth, &q_d->ptr_buffer))
+
+ prs_debug(ps, depth, desc, "netdfs_io_dfs_EnumArray1_d");
+ depth++;
+
+ if (v->ptr0_s) {
+ if (!prs_align_custom(ps, 4))
+ return False;
+
+ if (!prs_uint32("size_s", ps, depth, &v->size_s))
+ return False;
+
+ if (UNMARSHALLING(ps)) {
+ v->s = (void *)PRS_ALLOC_MEM_VOID(ps,sizeof(*v->s)*v->count);
+ }
+ for (i_s_1=0; i_s_1<v->count;i_s_1++) {
+ if (!netdfs_io_dfs_Info1_p("s", &v->s[i_s_1], ps, depth))
+ return False;
+ }
+ for (i_s_1=0; i_s_1<v->count;i_s_1++) {
+ if (!netdfs_io_dfs_Info1_d("s", &v->s[i_s_1], ps, depth))
+ return False;
+ }
+ }
+
+ return True;
+}
+
+BOOL init_netdfs_dfs_EnumArray2(NETDFS_DFS_ENUMARRAY2 *v, uint32 count, NETDFS_DFS_INFO2 **s)
+{
+ DEBUG(5,("init_netdfs_dfs_EnumArray2\n"));
+
+ v->count = count;
+
+ if (s) {
+ v->ptr0_s = 1;
+ v->s = *s;
+ } else {
+ v->ptr0_s = 0;
+ }
+
+ return True;
+}
+
+BOOL netdfs_io_dfs_EnumArray2_p(const char *desc, NETDFS_DFS_ENUMARRAY2 *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
return False;
- if(!prs_uint32("level2", ps, depth, &q_d->level2))
+
+ prs_debug(ps, depth, desc, "netdfs_io_dfs_EnumArray2_p");
+ depth++;
+ if (!prs_uint32("count", ps, depth, &v->count))
return False;
- if(!prs_uint32("level3", ps, depth, &q_d->level2))
+
+ if (!prs_uint32("ptr0_s", ps, depth, &v->ptr0_s))
return False;
-
- if(!prs_uint32("ptr_num_entries", ps, depth, &q_d->ptr_num_entries))
+
+
+ return True;
+}
+
+BOOL netdfs_io_dfs_EnumArray2_d(const char *desc, NETDFS_DFS_ENUMARRAY2 *v, prs_struct *ps, int depth)
+{
+ uint32 i_s_1;
+
+ if (v == NULL)
return False;
- if(!prs_uint32("num_entries", ps, depth, &q_d->num_entries))
+
+ prs_debug(ps, depth, desc, "netdfs_io_dfs_EnumArray2_d");
+ depth++;
+
+ if (v->ptr0_s) {
+ if (!prs_align_custom(ps, 4))
+ return False;
+
+ if (!prs_uint32("size_s", ps, depth, &v->size_s))
+ return False;
+
+ if (UNMARSHALLING(ps)) {
+ v->s = (void *)PRS_ALLOC_MEM_VOID(ps,sizeof(*v->s)*v->count);
+ }
+ for (i_s_1=0; i_s_1<v->count;i_s_1++) {
+ if (!netdfs_io_dfs_Info2_p("s", &v->s[i_s_1], ps, depth))
+ return False;
+ }
+ for (i_s_1=0; i_s_1<v->count;i_s_1++) {
+ if (!netdfs_io_dfs_Info2_d("s", &v->s[i_s_1], ps, depth))
+ return False;
+ }
+ }
+
+ return True;
+}
+
+BOOL init_netdfs_dfs_EnumArray3(NETDFS_DFS_ENUMARRAY3 *v, uint32 count, NETDFS_DFS_INFO3 **s)
+{
+ DEBUG(5,("init_netdfs_dfs_EnumArray3\n"));
+
+ v->count = count;
+
+ if (s) {
+ v->ptr0_s = 1;
+ v->s = *s;
+ } else {
+ v->ptr0_s = 0;
+ }
+
+ return True;
+}
+
+BOOL netdfs_io_dfs_EnumArray3_p(const char *desc, NETDFS_DFS_ENUMARRAY3 *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
return False;
- if(!prs_uint32("num_entries2", ps, depth, &q_d->num_entries2))
+
+ prs_debug(ps, depth, desc, "netdfs_io_dfs_EnumArray3_p");
+ depth++;
+ if (!prs_uint32("count", ps, depth, &v->count))
return False;
- if(!smb_io_enum_hnd("resume_hnd",&q_d->reshnd, ps, depth))
+
+ if (!prs_uint32("ptr0_s", ps, depth, &v->ptr0_s))
return False;
+
+
return True;
}
-/************************************************************
- Read/write a DFS_INFO_CTR structure
- ************************************************************/
-
-BOOL dfs_io_dfs_info_ctr(const char *desc, DFS_INFO_CTR* ctr, uint32 num_entries, uint32 level, prs_struct* ps, int depth)
+BOOL netdfs_io_dfs_EnumArray3_d(const char *desc, NETDFS_DFS_ENUMARRAY3 *v, prs_struct *ps, int depth)
{
- int i=0;
-
- switch(level) {
- case 1:
- depth++;
- /* should depend on whether marshalling or unmarshalling! */
- if(UNMARSHALLING(ps)) {
- ctr->dfs.info1 = PRS_ALLOC_MEM(ps, DFS_INFO_1, num_entries);
- if (!ctr->dfs.info1)
- return False;
+ uint32 i_s_1;
+
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_dfs_EnumArray3_d");
+ depth++;
+
+ if (v->ptr0_s) {
+ if (!prs_align_custom(ps, 4))
+ return False;
+
+ if (!prs_uint32("size_s", ps, depth, &v->size_s))
+ return False;
+
+ if (UNMARSHALLING(ps)) {
+ v->s = (void *)PRS_ALLOC_MEM_VOID(ps,sizeof(*v->s)*v->count);
}
-
- for(i=0;i<num_entries;i++) {
- if(!prs_uint32("ptr_entrypath",ps, depth, &ctr->dfs.info1[i].ptr_entrypath))
+ for (i_s_1=0; i_s_1<v->count;i_s_1++) {
+ if (!netdfs_io_dfs_Info3_p("s", &v->s[i_s_1], ps, depth))
return False;
}
- for(i=0;i<num_entries;i++) {
- if(!smb_io_unistr2("", &ctr->dfs.info1[i].entrypath, ctr->dfs.info1[i].ptr_entrypath, ps, depth))
+ for (i_s_1=0; i_s_1<v->count;i_s_1++) {
+ if (!netdfs_io_dfs_Info3_d("s", &v->s[i_s_1], ps, depth))
return False;
- if(!prs_align(ps))
+ }
+ }
+
+ return True;
+}
+
+BOOL init_netdfs_dfs_EnumArray4(NETDFS_DFS_ENUMARRAY4 *v, uint32 count, NETDFS_DFS_INFO4 **s)
+{
+ DEBUG(5,("init_netdfs_dfs_EnumArray4\n"));
+
+ v->count = count;
+
+ if (s) {
+ v->ptr0_s = 1;
+ v->s = *s;
+ } else {
+ v->ptr0_s = 0;
+ }
+
+ return True;
+}
+
+BOOL netdfs_io_dfs_EnumArray4_p(const char *desc, NETDFS_DFS_ENUMARRAY4 *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_dfs_EnumArray4_p");
+ depth++;
+ if (!prs_uint32("count", ps, depth, &v->count))
+ return False;
+
+ if (!prs_uint32("ptr0_s", ps, depth, &v->ptr0_s))
+ return False;
+
+
+ return True;
+}
+
+BOOL netdfs_io_dfs_EnumArray4_d(const char *desc, NETDFS_DFS_ENUMARRAY4 *v, prs_struct *ps, int depth)
+{
+ uint32 i_s_1;
+
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_dfs_EnumArray4_d");
+ depth++;
+
+ if (v->ptr0_s) {
+ if (!prs_align_custom(ps, 4))
+ return False;
+
+ if (!prs_uint32("size_s", ps, depth, &v->size_s))
+ return False;
+
+ if (UNMARSHALLING(ps)) {
+ v->s = (void *)PRS_ALLOC_MEM_VOID(ps,sizeof(*v->s)*v->count);
+ }
+ for (i_s_1=0; i_s_1<v->count;i_s_1++) {
+ if (!netdfs_io_dfs_Info4_p("s", &v->s[i_s_1], ps, depth))
return False;
}
- depth--;
- break;
- case 2:
- depth++;
- if(UNMARSHALLING(ps)) {
- ctr->dfs.info2 = PRS_ALLOC_MEM(ps, DFS_INFO_2, num_entries);
- if (!ctr->dfs.info2)
+ for (i_s_1=0; i_s_1<v->count;i_s_1++) {
+ if (!netdfs_io_dfs_Info4_d("s", &v->s[i_s_1], ps, depth))
return False;
}
+ }
+
+ return True;
+}
- for(i=0;i<num_entries;i++) {
- if(!prs_uint32("ptr_entrypath", ps, depth, &ctr->dfs.info2[i].ptr_entrypath))
- return False;
- if(!prs_uint32("ptr_comment", ps, depth, &ctr->dfs.info2[i].ptr_comment))
- return False;
- if(!prs_uint32("state", ps, depth, &ctr->dfs.info2[i].state))
- return False;
- if(!prs_uint32("num_storages", ps, depth, &ctr->dfs.info2[i].num_storages))
- return False;
+BOOL init_netdfs_dfs_EnumArray200(NETDFS_DFS_ENUMARRAY200 *v, uint32 count, NETDFS_DFS_INFO200 **s)
+{
+ DEBUG(5,("init_netdfs_dfs_EnumArray200\n"));
+
+ v->count = count;
+
+ if (s) {
+ v->ptr0_s = 1;
+ v->s = *s;
+ } else {
+ v->ptr0_s = 0;
+ }
+
+ return True;
+}
+
+BOOL netdfs_io_dfs_EnumArray200_p(const char *desc, NETDFS_DFS_ENUMARRAY200 *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_dfs_EnumArray200_p");
+ depth++;
+ if (!prs_uint32("count", ps, depth, &v->count))
+ return False;
+
+ if (!prs_uint32("ptr0_s", ps, depth, &v->ptr0_s))
+ return False;
+
+
+ return True;
+}
+
+BOOL netdfs_io_dfs_EnumArray200_d(const char *desc, NETDFS_DFS_ENUMARRAY200 *v, prs_struct *ps, int depth)
+{
+ uint32 i_s_1;
+
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_dfs_EnumArray200_d");
+ depth++;
+
+ if (v->ptr0_s) {
+ if (!prs_align_custom(ps, 4))
+ return False;
+
+ if (!prs_uint32("size_s", ps, depth, &v->size_s))
+ return False;
+
+ if (UNMARSHALLING(ps)) {
+ v->s = (void *)PRS_ALLOC_MEM_VOID(ps,sizeof(*v->s)*v->count);
}
- for(i=0;i<num_entries;i++) {
- if(!smb_io_unistr2("", &ctr->dfs.info2[i].entrypath, ctr->dfs.info2[i].ptr_entrypath, ps, depth))
- return False;
- if(!prs_align(ps))
- return False;
- if(!smb_io_unistr2("",&ctr->dfs.info2[i].comment, ctr->dfs.info2[i].ptr_comment, ps, depth))
- return False;
- if(!prs_align(ps))
+ for (i_s_1=0; i_s_1<v->count;i_s_1++) {
+ if (!netdfs_io_dfs_Info200_p("s", &v->s[i_s_1], ps, depth))
return False;
}
- depth--;
- break;
- case 3:
- depth++;
- if(UNMARSHALLING(ps)) {
- ctr->dfs.info3 = PRS_ALLOC_MEM(ps, DFS_INFO_3, num_entries);
- if (!ctr->dfs.info3)
+ for (i_s_1=0; i_s_1<v->count;i_s_1++) {
+ if (!netdfs_io_dfs_Info200_d("s", &v->s[i_s_1], ps, depth))
return False;
}
+ }
+
+ return True;
+}
- for(i=0;i<num_entries;i++) {
- if(!prs_uint32("ptr_entrypath", ps, depth, &ctr->dfs.info3[i].ptr_entrypath))
- return False;
- if(!prs_uint32("ptr_comment", ps, depth, &ctr->dfs.info3[i].ptr_comment))
- return False;
- if(!prs_uint32("state", ps, depth, &ctr->dfs.info3[i].state))
- return False;
- if(!prs_uint32("num_storages", ps, depth, &ctr->dfs.info3[i].num_storages))
+BOOL init_netdfs_dfs_EnumArray300(NETDFS_DFS_ENUMARRAY300 *v, uint32 count, NETDFS_DFS_INFO300 **s)
+{
+ DEBUG(5,("init_netdfs_dfs_EnumArray300\n"));
+
+ v->count = count;
+
+ if (s) {
+ v->ptr0_s = 1;
+ v->s = *s;
+ } else {
+ v->ptr0_s = 0;
+ }
+
+ return True;
+}
+
+BOOL netdfs_io_dfs_EnumArray300_p(const char *desc, NETDFS_DFS_ENUMARRAY300 *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_dfs_EnumArray300_p");
+ depth++;
+ if (!prs_uint32("count", ps, depth, &v->count))
+ return False;
+
+ if (!prs_uint32("ptr0_s", ps, depth, &v->ptr0_s))
+ return False;
+
+
+ return True;
+}
+
+BOOL netdfs_io_dfs_EnumArray300_d(const char *desc, NETDFS_DFS_ENUMARRAY300 *v, prs_struct *ps, int depth)
+{
+ uint32 i_s_1;
+
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_dfs_EnumArray300_d");
+ depth++;
+
+ if (v->ptr0_s) {
+ if (!prs_align_custom(ps, 4))
+ return False;
+
+ if (!prs_uint32("size_s", ps, depth, &v->size_s))
+ return False;
+
+ if (UNMARSHALLING(ps)) {
+ v->s = (void *)PRS_ALLOC_MEM_VOID(ps,sizeof(*v->s)*v->count);
+ }
+ for (i_s_1=0; i_s_1<v->count;i_s_1++) {
+ if (!netdfs_io_dfs_Info300_p("s", &v->s[i_s_1], ps, depth))
return False;
- if(!prs_uint32("ptr_storages", ps, depth, &ctr->dfs.info3[i].ptr_storages))
+ }
+ for (i_s_1=0; i_s_1<v->count;i_s_1++) {
+ if (!netdfs_io_dfs_Info300_d("s", &v->s[i_s_1], ps, depth))
return False;
}
- for(i=0;i<num_entries;i++) {
- if(!smb_io_unistr2("", &ctr->dfs.info3[i].entrypath, ctr->dfs.info3[i].ptr_entrypath, ps, depth))
+ }
+
+ return True;
+}
+
+BOOL netdfs_io_dfs_EnumInfo_p(const char *desc, NETDFS_DFS_ENUMINFO_CTR* v, prs_struct *ps, int depth)
+{
+ if (!prs_uint32("switch_value", ps, depth, &v->switch_value))
+ return False;
+
+ switch (v->switch_value) {
+ case 1:
+ depth++;
+ if (!prs_uint32("ptr0_info1", ps, depth, &v->ptr0))
return False;
- if(!prs_align(ps))
+
+ depth--;
+ break;
+
+ case 2:
+ depth++;
+ if (!prs_uint32("ptr0_info2", ps, depth, &v->ptr0))
return False;
- if(!smb_io_unistr2("", &ctr->dfs.info3[i].comment, ctr->dfs.info3[i].ptr_comment, ps, depth))
+
+ depth--;
+ break;
+
+ case 3:
+ depth++;
+ if (!prs_uint32("ptr0_info3", ps, depth, &v->ptr0))
return False;
- if(!prs_align(ps))
+
+ depth--;
+ break;
+
+ case 4:
+ depth++;
+ if (!prs_uint32("ptr0_info4", ps, depth, &v->ptr0))
return False;
- if(!prs_uint32("num_storage_infos", ps, depth, &ctr->dfs.info3[i].num_storage_infos))
+
+ depth--;
+ break;
+
+ case 200:
+ depth++;
+ if (!prs_uint32("ptr0_info200", ps, depth, &v->ptr0))
return False;
-
- if(!dfs_io_dfs_storage_info("storage_info", &ctr->dfs.info3[i], ps, depth))
+
+ depth--;
+ break;
+
+ case 300:
+ depth++;
+ if (!prs_uint32("ptr0_info300", ps, depth, &v->ptr0))
return False;
- }
+
+ depth--;
+ break;
+
+ default:
+ return False;
+
}
+
+ return True;
+}
+BOOL netdfs_io_dfs_EnumInfo_d(const char *desc, NETDFS_DFS_ENUMINFO_CTR* v, prs_struct *ps, int depth)
+{
+ switch (v->switch_value) {
+ case 1:
+ depth++;
+ if (v->ptr0) {
+ if (!prs_align_custom(ps, 4))
+ return False;
+
+ if (!netdfs_io_dfs_EnumArray1_p("info1", &v->u.info1, ps, depth))
+ return False;
+ if (!netdfs_io_dfs_EnumArray1_d("info1", &v->u.info1, ps, depth))
+ return False;
+ }
+ depth--;
+ break;
+
+ case 2:
+ depth++;
+ if (v->ptr0) {
+ if (!prs_align_custom(ps, 4))
+ return False;
+
+ if (!netdfs_io_dfs_EnumArray2_p("info2", &v->u.info2, ps, depth))
+ return False;
+ if (!netdfs_io_dfs_EnumArray2_d("info2", &v->u.info2, ps, depth))
+ return False;
+ }
+ depth--;
+ break;
+
+ case 3:
+ depth++;
+ if (v->ptr0) {
+ if (!prs_align_custom(ps, 4))
+ return False;
+
+ if (!netdfs_io_dfs_EnumArray3_p("info3", &v->u.info3, ps, depth))
+ return False;
+ if (!netdfs_io_dfs_EnumArray3_d("info3", &v->u.info3, ps, depth))
+ return False;
+ }
+ depth--;
+ break;
+
+ case 4:
+ depth++;
+ if (v->ptr0) {
+ if (!prs_align_custom(ps, 4))
+ return False;
+
+ if (!netdfs_io_dfs_EnumArray4_p("info4", &v->u.info4, ps, depth))
+ return False;
+ if (!netdfs_io_dfs_EnumArray4_d("info4", &v->u.info4, ps, depth))
+ return False;
+ }
+ depth--;
+ break;
+
+ case 200:
+ depth++;
+ if (v->ptr0) {
+ if (!prs_align_custom(ps, 4))
+ return False;
+
+ if (!netdfs_io_dfs_EnumArray200_p("info200", &v->u.info200, ps, depth))
+ return False;
+ if (!netdfs_io_dfs_EnumArray200_d("info200", &v->u.info200, ps, depth))
+ return False;
+ }
+ depth--;
+ break;
+
+ case 300:
+ depth++;
+ if (v->ptr0) {
+ if (!prs_align_custom(ps, 4))
+ return False;
+
+ if (!netdfs_io_dfs_EnumArray300_p("info300", &v->u.info300, ps, depth))
+ return False;
+ if (!netdfs_io_dfs_EnumArray300_d("info300", &v->u.info300, ps, depth))
+ return False;
+ }
+ depth--;
+ break;
+
+ }
+
+ return True;
+}
+BOOL init_netdfs_dfs_EnumStruct(NETDFS_DFS_ENUMSTRUCT *v, uint32 level, NETDFS_DFS_ENUMINFO_CTR e)
+{
+ DEBUG(5,("init_netdfs_dfs_EnumStruct\n"));
+
+ v->level = level;
+
+ v->e = e;
+ v->e.switch_value = v->level;
+
return True;
}
-/************************************************************
- Read/write a DFS_R_DFS_ENUM structure
- ************************************************************/
+BOOL netdfs_io_dfs_EnumStruct_p(const char *desc, NETDFS_DFS_ENUMSTRUCT *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_dfs_EnumStruct_p");
+ depth++;
+ if (!prs_uint32("level", ps, depth, &v->level))
+ return False;
+
+ if (!netdfs_io_dfs_EnumInfo_p("e", &v->e, ps, depth))
+ return False;
+
+ return True;
+}
-BOOL dfs_io_r_dfs_enum(const char *desc, DFS_R_DFS_ENUM *q_d, prs_struct *ps, int depth)
+BOOL netdfs_io_dfs_EnumStruct_d(const char *desc, NETDFS_DFS_ENUMSTRUCT *v, prs_struct *ps, int depth)
{
- DFS_INFO_CTR *ctr;
- if(q_d == NULL)
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_dfs_EnumStruct_d");
+ depth++;
+
+ if (!prs_align_custom(ps, 4))
return False;
- ctr = q_d->ctr;
- if(ctr == NULL)
+
+ if (!netdfs_io_dfs_EnumInfo_d("e", &v->e, ps, depth))
return False;
+
+ return True;
+}
- prs_debug(ps, depth, desc, "dfs_io_r_dfs_enum");
+/* netdfs functions */
+BOOL init_netdfs_q_dfs_GetManagerVersion(NETDFS_Q_DFS_GETMANAGERVERSION *v)
+{
+ DEBUG(5,("init_netdfs_q_dfs_GetManagerVersion\n"));
+
+ return True;
+}
+
+BOOL netdfs_io_q_dfs_GetManagerVersion(const char *desc, NETDFS_Q_DFS_GETMANAGERVERSION *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_q_dfs_GetManagerVersion");
depth++;
+ return True;
+}
- if(!prs_align(ps))
+BOOL init_netdfs_r_dfs_GetManagerVersion(NETDFS_R_DFS_GETMANAGERVERSION *v, uint32 *exist_flag)
+{
+ DEBUG(5,("init_netdfs_r_dfs_GetManagerVersion\n"));
+
+ if (!exist_flag)
return False;
+
+ v->exist_flag = *exist_flag;
+
+ return True;
+}
- if(!prs_uint32("ptr_buffer", ps, depth, &q_d->ptr_buffer))
+BOOL netdfs_io_r_dfs_GetManagerVersion(const char *desc, NETDFS_R_DFS_GETMANAGERVERSION *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
return False;
- if(!prs_uint32("level", ps, depth, &q_d->level))
+
+ prs_debug(ps, depth, desc, "netdfs_io_r_dfs_GetManagerVersion");
+ depth++;
+ if (!prs_uint32("exist_flag", ps, depth, &v->exist_flag))
return False;
- if(!prs_uint32("level2", ps, depth, &ctr->switch_value))
+
+ return True;
+}
+
+BOOL init_netdfs_q_dfs_Add(NETDFS_Q_DFS_ADD *v, const char *path, const char *server, const char *share, const char *comment, uint32 flags)
+{
+ DEBUG(5,("init_netdfs_q_dfs_Add\n"));
+
+ if (!path)
+ return False;
+
+ init_unistr2(&v->path, path, UNI_FLAGS_NONE);
+
+ if (!server)
+ return False;
+
+ init_unistr2(&v->server, server, UNI_FLAGS_NONE);
+
+ if (share) {
+ v->ptr0_share = 1;
+ init_unistr2(&v->share, share, UNI_FLAGS_NONE);
+ } else {
+ v->ptr0_share = 0;
+ }
+
+ if (comment) {
+ v->ptr0_comment = 1;
+ init_unistr2(&v->comment, comment, UNI_FLAGS_NONE);
+ } else {
+ v->ptr0_comment = 0;
+ }
+
+ v->flags = flags;
+
+ return True;
+}
+
+BOOL netdfs_io_q_dfs_Add(const char *desc, NETDFS_Q_DFS_ADD *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_q_dfs_Add");
+ depth++;
+ if (!prs_align_custom(ps, 4))
+ return False;
+
+ if (!smb_io_unistr2("path", &v->path, 1, ps, depth))
return False;
- if(!prs_uint32("ptr_num_entries", ps, depth, &q_d->ptr_num_entries))
+
+ if (!prs_align_custom(ps, 4))
return False;
- if(q_d->ptr_num_entries)
- if(!prs_uint32("num_entries", ps, depth, &q_d->num_entries))
+
+ if (!smb_io_unistr2("server", &v->server, 1, ps, depth))
+ return False;
+
+ if (!prs_align_custom(ps, 4))
+ return False;
+
+ if (!prs_uint32("ptr0_share", ps, depth, &v->ptr0_share))
+ return False;
+
+ if (v->ptr0_share) {
+ if (!prs_align_custom(ps, 4))
+ return False;
+
+ if (!smb_io_unistr2("share", &v->share, 1, ps, depth))
return False;
- if(!prs_uint32("ptr_num_entries2", ps, depth, &q_d->ptr_num_entries2))
+ }
+
+ if (!prs_align_custom(ps, 4))
+ return False;
+
+ if (!prs_uint32("ptr0_comment", ps, depth, &v->ptr0_comment))
return False;
- if(q_d->ptr_num_entries2)
- if(!prs_uint32("num_entries2", ps, depth, &ctr->num_entries))
+
+ if (v->ptr0_comment) {
+ if (!prs_align_custom(ps, 4))
+ return False;
+
+ if (!smb_io_unistr2("comment", &v->comment, 1, ps, depth))
return False;
+ }
+
+ if (!prs_align_custom(ps, 4))
+ return False;
+
+ if (!prs_uint32("flags", ps, depth, &v->flags))
+ return False;
+
+ return True;
+}
+
+BOOL init_netdfs_r_dfs_Add(NETDFS_R_DFS_ADD *v, const char *path, const char *server, const char *share, const char *comment, uint32 flags, WERROR status)
+{
+ DEBUG(5,("init_netdfs_r_dfs_Add\n"));
+
+ v->status = status;
+
+ return True;
+}
- if(!dfs_io_dfs_info_ctr("", ctr, q_d->num_entries, q_d->level, ps, depth))
+BOOL netdfs_io_r_dfs_Add(const char *desc, NETDFS_R_DFS_ADD *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_r_dfs_Add");
+ depth++;
+ if (!prs_werror("status", ps, depth, &v->status))
+ return False;
+
+ return True;
+}
- if(!smb_io_enum_hnd("resume_hnd", &q_d->reshnd, ps, depth))
+BOOL init_netdfs_q_dfs_Remove(NETDFS_Q_DFS_REMOVE *v, const char *path, const char *server, const char *share)
+{
+ DEBUG(5,("init_netdfs_q_dfs_Remove\n"));
+
+ if (!path)
+ return False;
+
+ init_unistr2(&v->path, path, UNI_FLAGS_NONE);
+
+ if (server) {
+ v->ptr0_server = 1;
+ init_unistr2(&v->server, server, UNI_FLAGS_NONE);
+ } else {
+ v->ptr0_server = 0;
+ }
+
+ if (share) {
+ v->ptr0_share = 1;
+ init_unistr2(&v->share, share, UNI_FLAGS_NONE);
+ } else {
+ v->ptr0_share = 0;
+ }
+
+ return True;
+}
+
+BOOL netdfs_io_q_dfs_Remove(const char *desc, NETDFS_Q_DFS_REMOVE *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_q_dfs_Remove");
+ depth++;
+ if (!prs_align_custom(ps, 4))
+ return False;
+
+ if (!smb_io_unistr2("path", &v->path, 1, ps, depth))
+ return False;
+
+ if (!prs_align_custom(ps, 4))
+ return False;
+
+ if (!prs_uint32("ptr0_server", ps, depth, &v->ptr0_server))
return False;
- if(!prs_werror("status", ps, depth, &q_d->status))
+
+ if (v->ptr0_server) {
+ if (!prs_align_custom(ps, 4))
+ return False;
+
+ if (!smb_io_unistr2("server", &v->server, 1, ps, depth))
+ return False;
+ }
+
+ if (!prs_align_custom(ps, 4))
+ return False;
+
+ if (!prs_uint32("ptr0_share", ps, depth, &v->ptr0_share))
return False;
+
+ if (v->ptr0_share) {
+ if (!prs_align_custom(ps, 4))
+ return False;
+
+ if (!smb_io_unistr2("share", &v->share, 1, ps, depth))
+ return False;
+ }
+
return True;
}
-BOOL dfs_io_dfs_storage_info(const char *desc, DFS_INFO_3* info3, prs_struct *ps, int depth)
+BOOL init_netdfs_r_dfs_Remove(NETDFS_R_DFS_REMOVE *v, const char *path, const char *server, const char *share, WERROR status)
{
- int i=0;
- if(info3 == NULL)
+ DEBUG(5,("init_netdfs_r_dfs_Remove\n"));
+
+ v->status = status;
+
+ return True;
+}
+
+BOOL netdfs_io_r_dfs_Remove(const char *desc, NETDFS_R_DFS_REMOVE *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
return False;
-
- prs_debug(ps, depth, desc, "smb_io_dfs_storage_info");
+
+ prs_debug(ps, depth, desc, "netdfs_io_r_dfs_Remove");
depth++;
+ if (!prs_werror("status", ps, depth, &v->status))
+ return False;
+
+ return True;
+}
- if(UNMARSHALLING(ps)) {
- info3->storages = PRS_ALLOC_MEM(ps, DFS_STORAGE_INFO, info3->num_storage_infos);
- if (!info3->storages)
- return False;
+BOOL init_netdfs_q_dfs_SetInfo(NETDFS_Q_DFS_SETINFO *v)
+{
+ DEBUG(5,("init_netdfs_q_dfs_SetInfo\n"));
+
+ return True;
+}
+
+BOOL netdfs_io_q_dfs_SetInfo(const char *desc, NETDFS_Q_DFS_SETINFO *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_q_dfs_SetInfo");
+ depth++;
+ return True;
+}
+
+BOOL init_netdfs_r_dfs_SetInfo(NETDFS_R_DFS_SETINFO *v, WERROR status)
+{
+ DEBUG(5,("init_netdfs_r_dfs_SetInfo\n"));
+
+ v->status = status;
+
+ return True;
+}
+
+BOOL netdfs_io_r_dfs_SetInfo(const char *desc, NETDFS_R_DFS_SETINFO *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_r_dfs_SetInfo");
+ depth++;
+ if (!prs_werror("status", ps, depth, &v->status))
+ return False;
+
+ return True;
+}
+
+BOOL init_netdfs_q_dfs_GetInfo(NETDFS_Q_DFS_GETINFO *v, const char *path, const char *server, const char *share, uint32 level)
+{
+ DEBUG(5,("init_netdfs_q_dfs_GetInfo\n"));
+
+ if (!path)
+ return False;
+
+ init_unistr2(&v->path, path, UNI_FLAGS_NONE);
+
+ if (server) {
+ v->ptr0_server = 1;
+ init_unistr2(&v->server, server, UNI_FLAGS_NONE);
+ } else {
+ v->ptr0_server = 0;
+ }
+
+ if (share) {
+ v->ptr0_share = 1;
+ init_unistr2(&v->share, share, UNI_FLAGS_NONE);
+ } else {
+ v->ptr0_share = 0;
}
+
+ v->level = level;
+
+ return True;
+}
- for(i=0;i<info3->num_storage_infos;i++) {
- if(!prs_uint32("storage_state", ps, depth, &info3->storages[i].state))
+BOOL netdfs_io_q_dfs_GetInfo(const char *desc, NETDFS_Q_DFS_GETINFO *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_q_dfs_GetInfo");
+ depth++;
+ if (!prs_align_custom(ps, 4))
+ return False;
+
+ if (!smb_io_unistr2("path", &v->path, 1, ps, depth))
+ return False;
+
+ if (!prs_align_custom(ps, 4))
+ return False;
+
+ if (!prs_uint32("ptr0_server", ps, depth, &v->ptr0_server))
+ return False;
+
+ if (v->ptr0_server) {
+ if (!prs_align_custom(ps, 4))
return False;
- if(!prs_uint32("ptr_servername", ps, depth, &info3->storages[i].ptr_servername))
+
+ if (!smb_io_unistr2("server", &v->server, 1, ps, depth))
return False;
- if(!prs_uint32("ptr_sharename", ps, depth, &info3->storages[i].ptr_sharename))
+ }
+
+ if (!prs_align_custom(ps, 4))
+ return False;
+
+ if (!prs_uint32("ptr0_share", ps, depth, &v->ptr0_share))
+ return False;
+
+ if (v->ptr0_share) {
+ if (!prs_align_custom(ps, 4))
+ return False;
+
+ if (!smb_io_unistr2("share", &v->share, 1, ps, depth))
return False;
}
+
+ if (!prs_align_custom(ps, 4))
+ return False;
+
+ if (!prs_uint32("level", ps, depth, &v->level))
+ return False;
+
+ return True;
+}
- for(i=0;i<info3->num_storage_infos;i++) {
- if(!smb_io_unistr2("servername", &info3->storages[i].servername, info3->storages[i].ptr_servername, ps, depth))
+BOOL init_netdfs_r_dfs_GetInfo(NETDFS_R_DFS_GETINFO *v, const char *path, const char *server, const char *share, uint32 level, NETDFS_DFS_INFO_CTR *info, WERROR status)
+{
+ DEBUG(5,("init_netdfs_r_dfs_GetInfo\n"));
+
+ if (!info)
+ return False;
+
+ v->info = *info;
+ v->info.switch_value = level;
+
+ v->status = status;
+
+ return True;
+}
+
+BOOL netdfs_io_r_dfs_GetInfo(const char *desc, NETDFS_R_DFS_GETINFO *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_r_dfs_GetInfo");
+ depth++;
+ if (!netdfs_io_dfs_Info_p("info", &v->info, ps, depth))
+ return False;
+ if (!netdfs_io_dfs_Info_d("info", &v->info, ps, depth))
+ return False;
+
+ if (!prs_align_custom(ps, 4))
+ return False;
+
+ if (!prs_werror("status", ps, depth, &v->status))
+ return False;
+
+ return True;
+}
+
+BOOL init_netdfs_q_dfs_Enum(NETDFS_Q_DFS_ENUM *v, uint32 level, uint32 bufsize, NETDFS_DFS_ENUMSTRUCT *info, uint32 *unknown, uint32 *total)
+{
+ DEBUG(5,("init_netdfs_q_dfs_Enum\n"));
+
+ v->level = level;
+
+ v->bufsize = bufsize;
+
+ if (info) {
+ v->ptr0_info = 1;
+ v->info = *info;
+ } else {
+ v->ptr0_info = 0;
+ }
+
+ if (unknown) {
+ v->ptr0_unknown = 1;
+ v->unknown = *unknown;
+ } else {
+ v->ptr0_unknown = 0;
+ }
+
+ if (total) {
+ v->ptr0_total = 1;
+ v->total = *total;
+ } else {
+ v->ptr0_total = 0;
+ }
+
+ return True;
+}
+
+BOOL netdfs_io_q_dfs_Enum(const char *desc, NETDFS_Q_DFS_ENUM *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_q_dfs_Enum");
+ depth++;
+ if (!prs_uint32("level", ps, depth, &v->level))
+ return False;
+
+ if (!prs_uint32("bufsize", ps, depth, &v->bufsize))
+ return False;
+
+ if (!prs_uint32("ptr0_info", ps, depth, &v->ptr0_info))
+ return False;
+
+ if (v->ptr0_info) {
+ if (!netdfs_io_dfs_EnumStruct_p("info", &v->info, ps, depth))
return False;
- if(!prs_align(ps))
+ if (!netdfs_io_dfs_EnumStruct_d("info", &v->info, ps, depth))
return False;
- if(!smb_io_unistr2("sharename", &info3->storages[i].sharename, info3->storages[i].ptr_sharename, ps, depth))
+ }
+
+ if (!prs_align_custom(ps, 4))
+ return False;
+
+ if (!prs_uint32("ptr0_unknown", ps, depth, &v->ptr0_unknown))
+ return False;
+
+ if (v->ptr0_unknown) {
+ if (!prs_uint32("unknown", ps, depth, &v->unknown))
return False;
- if(!prs_align(ps))
+ }
+
+ if (!prs_align_custom(ps, 4))
+ return False;
+
+ if (!prs_uint32("ptr0_total", ps, depth, &v->ptr0_total))
+ return False;
+
+ if (v->ptr0_total) {
+ if (!prs_uint32("total", ps, depth, &v->total))
return False;
}
+
+ return True;
+}
+
+BOOL init_netdfs_r_dfs_Enum(NETDFS_R_DFS_ENUM *v, uint32 level, uint32 bufsize, NETDFS_DFS_ENUMSTRUCT *info, uint32 *unknown, uint32 *total, WERROR status)
+{
+ DEBUG(5,("init_netdfs_r_dfs_Enum\n"));
+
+ if (info) {
+ v->ptr0_info = 1;
+ v->info = *info;
+ } else {
+ v->ptr0_info = 0;
+ }
+
+ if (total) {
+ v->ptr0_total = 1;
+ v->total = *total;
+ } else {
+ v->ptr0_total = 0;
+ }
+
+ v->status = status;
+
+ return True;
+}
+
+BOOL netdfs_io_r_dfs_Enum(const char *desc, NETDFS_R_DFS_ENUM *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_r_dfs_Enum");
+ depth++;
+ if (!prs_uint32("ptr0_info", ps, depth, &v->ptr0_info))
+ return False;
+
+ if (v->ptr0_info) {
+ if (!netdfs_io_dfs_EnumStruct_p("info", &v->info, ps, depth))
+ return False;
+ if (!netdfs_io_dfs_EnumStruct_d("info", &v->info, ps, depth))
+ return False;
+ }
+
+ if (!prs_align_custom(ps, 4))
+ return False;
+
+ if (!prs_uint32("ptr0_total", ps, depth, &v->ptr0_total))
+ return False;
+
+ if (v->ptr0_total) {
+ if (!prs_uint32("total", ps, depth, &v->total))
+ return False;
+ }
+
+ if (!prs_align_custom(ps, 4))
+ return False;
+
+ if (!prs_werror("status", ps, depth, &v->status))
+ return False;
+
+ return True;
+}
+
+BOOL init_netdfs_q_dfs_Rename(NETDFS_Q_DFS_RENAME *v)
+{
+ DEBUG(5,("init_netdfs_q_dfs_Rename\n"));
+
+ return True;
+}
+
+BOOL netdfs_io_q_dfs_Rename(const char *desc, NETDFS_Q_DFS_RENAME *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_q_dfs_Rename");
+ depth++;
+ return True;
+}
+
+BOOL init_netdfs_r_dfs_Rename(NETDFS_R_DFS_RENAME *v, WERROR status)
+{
+ DEBUG(5,("init_netdfs_r_dfs_Rename\n"));
+
+ v->status = status;
+
+ return True;
+}
+
+BOOL netdfs_io_r_dfs_Rename(const char *desc, NETDFS_R_DFS_RENAME *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_r_dfs_Rename");
+ depth++;
+ if (!prs_werror("status", ps, depth, &v->status))
+ return False;
+
+ return True;
+}
+
+BOOL init_netdfs_q_dfs_Move(NETDFS_Q_DFS_MOVE *v)
+{
+ DEBUG(5,("init_netdfs_q_dfs_Move\n"));
+
+ return True;
+}
+
+BOOL netdfs_io_q_dfs_Move(const char *desc, NETDFS_Q_DFS_MOVE *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_q_dfs_Move");
+ depth++;
+ return True;
+}
+
+BOOL init_netdfs_r_dfs_Move(NETDFS_R_DFS_MOVE *v, WERROR status)
+{
+ DEBUG(5,("init_netdfs_r_dfs_Move\n"));
+
+ v->status = status;
+
+ return True;
+}
+
+BOOL netdfs_io_r_dfs_Move(const char *desc, NETDFS_R_DFS_MOVE *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_r_dfs_Move");
+ depth++;
+ if (!prs_werror("status", ps, depth, &v->status))
+ return False;
+
+ return True;
+}
+
+BOOL init_netdfs_q_dfs_ManagerGetConfigInfo(NETDFS_Q_DFS_MANAGERGETCONFIGINFO *v)
+{
+ DEBUG(5,("init_netdfs_q_dfs_ManagerGetConfigInfo\n"));
+
+ return True;
+}
+
+BOOL netdfs_io_q_dfs_ManagerGetConfigInfo(const char *desc, NETDFS_Q_DFS_MANAGERGETCONFIGINFO *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_q_dfs_ManagerGetConfigInfo");
+ depth++;
+ return True;
+}
+
+BOOL init_netdfs_r_dfs_ManagerGetConfigInfo(NETDFS_R_DFS_MANAGERGETCONFIGINFO *v, WERROR status)
+{
+ DEBUG(5,("init_netdfs_r_dfs_ManagerGetConfigInfo\n"));
+
+ v->status = status;
+
+ return True;
+}
+
+BOOL netdfs_io_r_dfs_ManagerGetConfigInfo(const char *desc, NETDFS_R_DFS_MANAGERGETCONFIGINFO *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_r_dfs_ManagerGetConfigInfo");
+ depth++;
+ if (!prs_werror("status", ps, depth, &v->status))
+ return False;
+
+ return True;
+}
+
+BOOL init_netdfs_q_dfs_ManagerSendSiteInfo(NETDFS_Q_DFS_MANAGERSENDSITEINFO *v)
+{
+ DEBUG(5,("init_netdfs_q_dfs_ManagerSendSiteInfo\n"));
+
+ return True;
+}
+
+BOOL netdfs_io_q_dfs_ManagerSendSiteInfo(const char *desc, NETDFS_Q_DFS_MANAGERSENDSITEINFO *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_q_dfs_ManagerSendSiteInfo");
+ depth++;
+ return True;
+}
+
+BOOL init_netdfs_r_dfs_ManagerSendSiteInfo(NETDFS_R_DFS_MANAGERSENDSITEINFO *v, WERROR status)
+{
+ DEBUG(5,("init_netdfs_r_dfs_ManagerSendSiteInfo\n"));
+
+ v->status = status;
+
+ return True;
+}
+
+BOOL netdfs_io_r_dfs_ManagerSendSiteInfo(const char *desc, NETDFS_R_DFS_MANAGERSENDSITEINFO *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_r_dfs_ManagerSendSiteInfo");
+ depth++;
+ if (!prs_werror("status", ps, depth, &v->status))
+ return False;
+
+ return True;
+}
+
+BOOL init_netdfs_q_dfs_AddFtRoot(NETDFS_Q_DFS_ADDFTROOT *v)
+{
+ DEBUG(5,("init_netdfs_q_dfs_AddFtRoot\n"));
+
+ return True;
+}
+
+BOOL netdfs_io_q_dfs_AddFtRoot(const char *desc, NETDFS_Q_DFS_ADDFTROOT *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_q_dfs_AddFtRoot");
+ depth++;
+ return True;
+}
+
+BOOL init_netdfs_r_dfs_AddFtRoot(NETDFS_R_DFS_ADDFTROOT *v, WERROR status)
+{
+ DEBUG(5,("init_netdfs_r_dfs_AddFtRoot\n"));
+
+ v->status = status;
+
+ return True;
+}
+
+BOOL netdfs_io_r_dfs_AddFtRoot(const char *desc, NETDFS_R_DFS_ADDFTROOT *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_r_dfs_AddFtRoot");
+ depth++;
+ if (!prs_werror("status", ps, depth, &v->status))
+ return False;
+
+ return True;
+}
+
+BOOL init_netdfs_q_dfs_RemoveFtRoot(NETDFS_Q_DFS_REMOVEFTROOT *v)
+{
+ DEBUG(5,("init_netdfs_q_dfs_RemoveFtRoot\n"));
+
+ return True;
+}
+
+BOOL netdfs_io_q_dfs_RemoveFtRoot(const char *desc, NETDFS_Q_DFS_REMOVEFTROOT *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_q_dfs_RemoveFtRoot");
+ depth++;
+ return True;
+}
+
+BOOL init_netdfs_r_dfs_RemoveFtRoot(NETDFS_R_DFS_REMOVEFTROOT *v, WERROR status)
+{
+ DEBUG(5,("init_netdfs_r_dfs_RemoveFtRoot\n"));
+
+ v->status = status;
+
+ return True;
+}
+
+BOOL netdfs_io_r_dfs_RemoveFtRoot(const char *desc, NETDFS_R_DFS_REMOVEFTROOT *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_r_dfs_RemoveFtRoot");
+ depth++;
+ if (!prs_werror("status", ps, depth, &v->status))
+ return False;
+
+ return True;
+}
+
+BOOL init_netdfs_q_dfs_AddStdRoot(NETDFS_Q_DFS_ADDSTDROOT *v)
+{
+ DEBUG(5,("init_netdfs_q_dfs_AddStdRoot\n"));
+
+ return True;
+}
+
+BOOL netdfs_io_q_dfs_AddStdRoot(const char *desc, NETDFS_Q_DFS_ADDSTDROOT *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_q_dfs_AddStdRoot");
+ depth++;
+ return True;
+}
+
+BOOL init_netdfs_r_dfs_AddStdRoot(NETDFS_R_DFS_ADDSTDROOT *v, WERROR status)
+{
+ DEBUG(5,("init_netdfs_r_dfs_AddStdRoot\n"));
+
+ v->status = status;
+
+ return True;
+}
+
+BOOL netdfs_io_r_dfs_AddStdRoot(const char *desc, NETDFS_R_DFS_ADDSTDROOT *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_r_dfs_AddStdRoot");
+ depth++;
+ if (!prs_werror("status", ps, depth, &v->status))
+ return False;
+
+ return True;
+}
+
+BOOL init_netdfs_q_dfs_RemoveStdRoot(NETDFS_Q_DFS_REMOVESTDROOT *v)
+{
+ DEBUG(5,("init_netdfs_q_dfs_RemoveStdRoot\n"));
+
+ return True;
+}
+
+BOOL netdfs_io_q_dfs_RemoveStdRoot(const char *desc, NETDFS_Q_DFS_REMOVESTDROOT *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_q_dfs_RemoveStdRoot");
+ depth++;
+ return True;
+}
+
+BOOL init_netdfs_r_dfs_RemoveStdRoot(NETDFS_R_DFS_REMOVESTDROOT *v, WERROR status)
+{
+ DEBUG(5,("init_netdfs_r_dfs_RemoveStdRoot\n"));
+
+ v->status = status;
+
+ return True;
+}
+
+BOOL netdfs_io_r_dfs_RemoveStdRoot(const char *desc, NETDFS_R_DFS_REMOVESTDROOT *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_r_dfs_RemoveStdRoot");
+ depth++;
+ if (!prs_werror("status", ps, depth, &v->status))
+ return False;
+
+ return True;
+}
+
+BOOL init_netdfs_q_dfs_ManagerInitialize(NETDFS_Q_DFS_MANAGERINITIALIZE *v)
+{
+ DEBUG(5,("init_netdfs_q_dfs_ManagerInitialize\n"));
+
+ return True;
+}
+
+BOOL netdfs_io_q_dfs_ManagerInitialize(const char *desc, NETDFS_Q_DFS_MANAGERINITIALIZE *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_q_dfs_ManagerInitialize");
+ depth++;
+ return True;
+}
+
+BOOL init_netdfs_r_dfs_ManagerInitialize(NETDFS_R_DFS_MANAGERINITIALIZE *v, WERROR status)
+{
+ DEBUG(5,("init_netdfs_r_dfs_ManagerInitialize\n"));
+
+ v->status = status;
+
+ return True;
+}
+
+BOOL netdfs_io_r_dfs_ManagerInitialize(const char *desc, NETDFS_R_DFS_MANAGERINITIALIZE *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_r_dfs_ManagerInitialize");
+ depth++;
+ if (!prs_werror("status", ps, depth, &v->status))
+ return False;
+
+ return True;
+}
+
+BOOL init_netdfs_q_dfs_AddStdRootForced(NETDFS_Q_DFS_ADDSTDROOTFORCED *v)
+{
+ DEBUG(5,("init_netdfs_q_dfs_AddStdRootForced\n"));
+
+ return True;
+}
+
+BOOL netdfs_io_q_dfs_AddStdRootForced(const char *desc, NETDFS_Q_DFS_ADDSTDROOTFORCED *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_q_dfs_AddStdRootForced");
+ depth++;
+ return True;
+}
+
+BOOL init_netdfs_r_dfs_AddStdRootForced(NETDFS_R_DFS_ADDSTDROOTFORCED *v, WERROR status)
+{
+ DEBUG(5,("init_netdfs_r_dfs_AddStdRootForced\n"));
+
+ v->status = status;
+
+ return True;
+}
+
+BOOL netdfs_io_r_dfs_AddStdRootForced(const char *desc, NETDFS_R_DFS_ADDSTDROOTFORCED *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_r_dfs_AddStdRootForced");
+ depth++;
+ if (!prs_werror("status", ps, depth, &v->status))
+ return False;
+
+ return True;
+}
+
+BOOL init_netdfs_q_dfs_GetDcAddress(NETDFS_Q_DFS_GETDCADDRESS *v)
+{
+ DEBUG(5,("init_netdfs_q_dfs_GetDcAddress\n"));
+
+ return True;
+}
+
+BOOL netdfs_io_q_dfs_GetDcAddress(const char *desc, NETDFS_Q_DFS_GETDCADDRESS *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_q_dfs_GetDcAddress");
+ depth++;
+ return True;
+}
+
+BOOL init_netdfs_r_dfs_GetDcAddress(NETDFS_R_DFS_GETDCADDRESS *v, WERROR status)
+{
+ DEBUG(5,("init_netdfs_r_dfs_GetDcAddress\n"));
+
+ v->status = status;
+
+ return True;
+}
+
+BOOL netdfs_io_r_dfs_GetDcAddress(const char *desc, NETDFS_R_DFS_GETDCADDRESS *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_r_dfs_GetDcAddress");
+ depth++;
+ if (!prs_werror("status", ps, depth, &v->status))
+ return False;
+
+ return True;
+}
+
+BOOL init_netdfs_q_dfs_SetDcAddress(NETDFS_Q_DFS_SETDCADDRESS *v)
+{
+ DEBUG(5,("init_netdfs_q_dfs_SetDcAddress\n"));
+
+ return True;
+}
+
+BOOL netdfs_io_q_dfs_SetDcAddress(const char *desc, NETDFS_Q_DFS_SETDCADDRESS *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_q_dfs_SetDcAddress");
+ depth++;
+ return True;
+}
+
+BOOL init_netdfs_r_dfs_SetDcAddress(NETDFS_R_DFS_SETDCADDRESS *v, WERROR status)
+{
+ DEBUG(5,("init_netdfs_r_dfs_SetDcAddress\n"));
+
+ v->status = status;
+
+ return True;
+}
+
+BOOL netdfs_io_r_dfs_SetDcAddress(const char *desc, NETDFS_R_DFS_SETDCADDRESS *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_r_dfs_SetDcAddress");
+ depth++;
+ if (!prs_werror("status", ps, depth, &v->status))
+ return False;
+
+ return True;
+}
+
+BOOL init_netdfs_q_dfs_FlushFtTable(NETDFS_Q_DFS_FLUSHFTTABLE *v)
+{
+ DEBUG(5,("init_netdfs_q_dfs_FlushFtTable\n"));
+
+ return True;
+}
+
+BOOL netdfs_io_q_dfs_FlushFtTable(const char *desc, NETDFS_Q_DFS_FLUSHFTTABLE *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_q_dfs_FlushFtTable");
+ depth++;
+ return True;
+}
+
+BOOL init_netdfs_r_dfs_FlushFtTable(NETDFS_R_DFS_FLUSHFTTABLE *v, WERROR status)
+{
+ DEBUG(5,("init_netdfs_r_dfs_FlushFtTable\n"));
+
+ v->status = status;
+
+ return True;
+}
+
+BOOL netdfs_io_r_dfs_FlushFtTable(const char *desc, NETDFS_R_DFS_FLUSHFTTABLE *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_r_dfs_FlushFtTable");
+ depth++;
+ if (!prs_werror("status", ps, depth, &v->status))
+ return False;
+
+ return True;
+}
+
+BOOL init_netdfs_q_dfs_Add2(NETDFS_Q_DFS_ADD2 *v)
+{
+ DEBUG(5,("init_netdfs_q_dfs_Add2\n"));
+
+ return True;
+}
+BOOL netdfs_io_q_dfs_Add2(const char *desc, NETDFS_Q_DFS_ADD2 *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_q_dfs_Add2");
+ depth++;
+ return True;
+}
+
+BOOL init_netdfs_r_dfs_Add2(NETDFS_R_DFS_ADD2 *v, WERROR status)
+{
+ DEBUG(5,("init_netdfs_r_dfs_Add2\n"));
+
+ v->status = status;
+
return True;
}
+
+BOOL netdfs_io_r_dfs_Add2(const char *desc, NETDFS_R_DFS_ADD2 *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_r_dfs_Add2");
+ depth++;
+ if (!prs_werror("status", ps, depth, &v->status))
+ return False;
+
+ return True;
+}
+
+BOOL init_netdfs_q_dfs_Remove2(NETDFS_Q_DFS_REMOVE2 *v)
+{
+ DEBUG(5,("init_netdfs_q_dfs_Remove2\n"));
+
+ return True;
+}
+
+BOOL netdfs_io_q_dfs_Remove2(const char *desc, NETDFS_Q_DFS_REMOVE2 *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_q_dfs_Remove2");
+ depth++;
+ return True;
+}
+
+BOOL init_netdfs_r_dfs_Remove2(NETDFS_R_DFS_REMOVE2 *v, WERROR status)
+{
+ DEBUG(5,("init_netdfs_r_dfs_Remove2\n"));
+
+ v->status = status;
+
+ return True;
+}
+
+BOOL netdfs_io_r_dfs_Remove2(const char *desc, NETDFS_R_DFS_REMOVE2 *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_r_dfs_Remove2");
+ depth++;
+ if (!prs_werror("status", ps, depth, &v->status))
+ return False;
+
+ return True;
+}
+
+BOOL init_netdfs_q_dfs_EnumEx(NETDFS_Q_DFS_ENUMEX *v)
+{
+ DEBUG(5,("init_netdfs_q_dfs_EnumEx\n"));
+
+ return True;
+}
+
+BOOL netdfs_io_q_dfs_EnumEx(const char *desc, NETDFS_Q_DFS_ENUMEX *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_q_dfs_EnumEx");
+ depth++;
+ return True;
+}
+
+BOOL init_netdfs_r_dfs_EnumEx(NETDFS_R_DFS_ENUMEX *v, WERROR status)
+{
+ DEBUG(5,("init_netdfs_r_dfs_EnumEx\n"));
+
+ v->status = status;
+
+ return True;
+}
+
+BOOL netdfs_io_r_dfs_EnumEx(const char *desc, NETDFS_R_DFS_ENUMEX *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_r_dfs_EnumEx");
+ depth++;
+ if (!prs_werror("status", ps, depth, &v->status))
+ return False;
+
+ return True;
+}
+
+BOOL init_netdfs_q_dfs_SetInfo2(NETDFS_Q_DFS_SETINFO2 *v)
+{
+ DEBUG(5,("init_netdfs_q_dfs_SetInfo2\n"));
+
+ return True;
+}
+
+BOOL netdfs_io_q_dfs_SetInfo2(const char *desc, NETDFS_Q_DFS_SETINFO2 *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_q_dfs_SetInfo2");
+ depth++;
+ return True;
+}
+
+BOOL init_netdfs_r_dfs_SetInfo2(NETDFS_R_DFS_SETINFO2 *v, WERROR status)
+{
+ DEBUG(5,("init_netdfs_r_dfs_SetInfo2\n"));
+
+ v->status = status;
+
+ return True;
+}
+
+BOOL netdfs_io_r_dfs_SetInfo2(const char *desc, NETDFS_R_DFS_SETINFO2 *v, prs_struct *ps, int depth)
+{
+ if (v == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "netdfs_io_r_dfs_SetInfo2");
+ depth++;
+ if (!prs_werror("status", ps, depth, &v->status))
+ return False;
+
+ return True;
+}
+
diff --git a/source3/rpc_parse/parse_lsa.c b/source3/rpc_parse/parse_lsa.c
index 3d28b657f3..1edc017510 100644
--- a/source3/rpc_parse/parse_lsa.c
+++ b/source3/rpc_parse/parse_lsa.c
@@ -508,8 +508,9 @@ BOOL lsa_io_q_enum_trust_dom(const char *desc, LSA_Q_ENUM_TRUST_DOM *q_e,
Inits an LSA_R_ENUM_TRUST_DOM structure.
********************************************************************/
-void init_r_enum_trust_dom(TALLOC_CTX *ctx, LSA_R_ENUM_TRUST_DOM *out, uint32 enum_context,
- uint32 req_num_domains, uint32 num_domains, TRUSTDOM **td)
+void init_r_enum_trust_dom(TALLOC_CTX *ctx, LSA_R_ENUM_TRUST_DOM *out,
+ uint32 enum_context, uint32 num_domains,
+ struct trustdom_info **td)
{
unsigned int i;
@@ -523,7 +524,8 @@ void init_r_enum_trust_dom(TALLOC_CTX *ctx, LSA_R_ENUM_TRUST_DOM *out, uint32 en
/* allocate container memory */
out->domlist = TALLOC_P( ctx, DOMAIN_LIST );
- out->domlist->domains = TALLOC_ARRAY( ctx, DOMAIN_INFO, out->count );
+ out->domlist->domains = TALLOC_ARRAY( ctx, DOMAIN_INFO,
+ out->count );
if ( !out->domlist || !out->domlist->domains ) {
out->status = NT_STATUS_NO_MEMORY;
@@ -535,13 +537,21 @@ void init_r_enum_trust_dom(TALLOC_CTX *ctx, LSA_R_ENUM_TRUST_DOM *out, uint32 en
/* initialize the list of domains and their sid */
for (i = 0; i < num_domains; i++) {
- if ( !(out->domlist->domains[i].sid = TALLOC_P(ctx, DOM_SID2)) ) {
+ smb_ucs2_t *name;
+ if ( !(out->domlist->domains[i].sid =
+ TALLOC_P(ctx, DOM_SID2)) ) {
out->status = NT_STATUS_NO_MEMORY;
return;
}
- init_dom_sid2(out->domlist->domains[i].sid, &(td[i])->sid);
- init_unistr4_w(ctx, &out->domlist->domains[i].name, (td[i])->name);
+ init_dom_sid2(out->domlist->domains[i].sid,
+ &(td[i])->sid);
+ if (push_ucs2_talloc(ctx, &name, (td[i])->name) < 0){
+ out->status = NT_STATUS_NO_MEMORY;
+ return;
+ }
+ init_unistr4_w(ctx, &out->domlist->domains[i].name,
+ name);
}
}
@@ -2539,8 +2549,78 @@ BOOL lsa_io_q_open_trusted_domain(const char *desc, LSA_Q_OPEN_TRUSTED_DOMAIN *i
}
#endif
+
+/*******************************************************************
+ Inits an LSA_Q_OPEN_TRUSTED_DOMAIN_BY_NAME structure.
+********************************************************************/
+
+void init_lsa_q_open_trusted_domain_by_name(LSA_Q_OPEN_TRUSTED_DOMAIN_BY_NAME *q,
+ POLICY_HND *hnd,
+ const char *name,
+ uint32 desired_access)
+{
+ memcpy(&q->pol, hnd, sizeof(q->pol));
+
+ init_lsa_string(&q->name, name);
+ q->access_mask = desired_access;
+}
+
+/*******************************************************************
+********************************************************************/
+
+
+/*******************************************************************
+ Reads or writes an LSA_Q_OPEN_TRUSTED_DOMAIN_BY_NAME structure.
+********************************************************************/
+
+BOOL lsa_io_q_open_trusted_domain_by_name(const char *desc, LSA_Q_OPEN_TRUSTED_DOMAIN_BY_NAME *q_o, prs_struct *ps, int depth)
+{
+ prs_debug(ps, depth, desc, "lsa_io_q_open_trusted_domain_by_name");
+ depth++;
+
+ if(!prs_align(ps))
+ return False;
+
+ if(!smb_io_pol_hnd("pol", &q_o->pol, ps, depth))
+ return False;
+
+ if(!prs_align(ps))
+ return False;
+
+ if(!smb_io_lsa_string("name", &q_o->name, ps, depth))
+ return False;
+
+ if(!prs_align(ps))
+ return False;
+
+ if(!prs_uint32("access", ps, depth, &q_o->access_mask))
+ return False;
+
+ return True;
+}
+
+/*******************************************************************
+ Reads or writes an LSA_R_OPEN_TRUSTED_DOMAIN_BY_NAME structure.
+********************************************************************/
+
+BOOL lsa_io_r_open_trusted_domain_by_name(const char *desc, LSA_R_OPEN_TRUSTED_DOMAIN_BY_NAME *out, prs_struct *ps, int depth)
+{
+ prs_debug(ps, depth, desc, "lsa_io_r_open_trusted_domain_by_name");
+ depth++;
+
+ if(!prs_align(ps))
+ return False;
+
+ if (!smb_io_pol_hnd("handle", &out->handle, ps, depth))
+ return False;
+
+ if(!prs_ntstatus("status", ps, depth, &out->status))
+ return False;
+
+ return True;
+}
+
/*******************************************************************
- Reads or writes an LSA_Q_OPEN_TRUSTED_DOMAIN structure.
********************************************************************/
BOOL lsa_io_q_open_trusted_domain(const char *desc, LSA_Q_OPEN_TRUSTED_DOMAIN *q_o, prs_struct *ps, int depth)
@@ -3111,3 +3191,130 @@ BOOL lsa_io_r_query_trusted_domain_info(const char *desc,
return True;
}
+/*******************************************************************
+ Inits an LSA_Q_QUERY_DOM_INFO_POLICY structure.
+********************************************************************/
+
+void init_q_query_dom_info(LSA_Q_QUERY_DOM_INFO_POLICY *in, POLICY_HND *hnd, uint16 info_class)
+{
+ DEBUG(5, ("init_q_query_dom_info\n"));
+
+ memcpy(&in->pol, hnd, sizeof(in->pol));
+
+ in->info_class = info_class;
+}
+
+/*******************************************************************
+ Reads or writes an LSA_Q_QUERY_DOM_INFO_POLICY structure.
+********************************************************************/
+
+BOOL lsa_io_q_query_dom_info(const char *desc, LSA_Q_QUERY_DOM_INFO_POLICY *in, prs_struct *ps, int depth)
+{
+ prs_debug(ps, depth, desc, "lsa_io_q_query_dom_info");
+ depth++;
+
+ if(!prs_align(ps))
+ return False;
+
+ if(!smb_io_pol_hnd("pol", &in->pol, ps, depth))
+ return False;
+
+ if(!prs_uint16("info_class", ps, depth, &in->info_class))
+ return False;
+
+ return True;
+}
+
+/*******************************************************************
+ Reads or writes an LSA_R_QUERY_DOM_INFO_POLICY structure.
+********************************************************************/
+
+static BOOL lsa_io_dominfo_query_3(const char *desc, LSA_DOM_INFO_POLICY_KERBEROS *krb_policy,
+ prs_struct *ps, int depth)
+{
+ if (!prs_align_uint64(ps))
+ return False;
+
+ if (!prs_align(ps))
+ return False;
+
+ if (!prs_uint32("enforce_restrictions", ps, depth, &krb_policy->enforce_restrictions))
+ return False;
+
+ if (!prs_align_uint64(ps))
+ return False;
+
+ if (!smb_io_nttime("service_tkt_lifetime", ps, depth, &krb_policy->service_tkt_lifetime))
+ return False;
+
+ if (!prs_align_uint64(ps))
+ return False;
+
+ if (!smb_io_nttime("user_tkt_lifetime", ps, depth, &krb_policy->user_tkt_lifetime))
+ return False;
+
+ if (!prs_align_uint64(ps))
+ return False;
+
+ if (!smb_io_nttime("user_tkt_renewaltime", ps, depth, &krb_policy->user_tkt_renewaltime))
+ return False;
+
+ if (!prs_align_uint64(ps))
+ return False;
+
+ if (!smb_io_nttime("clock_skew", ps, depth, &krb_policy->clock_skew))
+ return False;
+
+ if (!prs_align_uint64(ps))
+ return False;
+
+ if (!smb_io_nttime("unknown6", ps, depth, &krb_policy->unknown6))
+ return False;
+
+ return True;
+}
+
+static BOOL lsa_io_dom_info_query(const char *desc, prs_struct *ps, int depth, LSA_DOM_INFO_UNION *info)
+{
+ prs_debug(ps, depth, desc, "lsa_io_dom_info_query");
+ depth++;
+
+ if(!prs_align_uint16(ps))
+ return False;
+
+ if(!prs_uint16("info_class", ps, depth, &info->info_class))
+ return False;
+
+ switch (info->info_class) {
+ case 3:
+ if (!lsa_io_dominfo_query_3("krb_policy", &info->krb_policy, ps, depth))
+ return False;
+ break;
+ default:
+ DEBUG(0,("unsupported info-level: %d\n", info->info_class));
+ return False;
+ break;
+ }
+
+ return True;
+}
+
+
+BOOL lsa_io_r_query_dom_info(const char *desc, LSA_R_QUERY_DOM_INFO_POLICY *out,
+ prs_struct *ps, int depth)
+{
+ prs_debug(ps, depth, desc, "lsa_io_r_query_dom_info");
+ depth++;
+
+ if (!prs_pointer("dominfo", ps, depth, (void**)&out->info,
+ sizeof(LSA_DOM_INFO_UNION),
+ (PRS_POINTER_CAST)lsa_io_dom_info_query) )
+ return False;
+
+ if(!prs_ntstatus("status", ps, depth, &out->status))
+ return False;
+
+ return True;
+}
+
+
diff --git a/source3/rpc_parse/parse_net.c b/source3/rpc_parse/parse_net.c
index 3bd6977dbb..e7b1cdc767 100644
--- a/source3/rpc_parse/parse_net.c
+++ b/source3/rpc_parse/parse_net.c
@@ -1396,7 +1396,7 @@ void init_net_user_info3(TALLOC_CTX *ctx, NET_USER_INFO_3 *usr,
uint32 user_flgs, uchar user_session_key[16],
uchar lm_session_key[16],
const char *logon_srv, const char *logon_dom,
- const DOM_SID *dom_sid, const char *other_sids)
+ const DOM_SID *dom_sid)
{
/* only cope with one "other" sid, right now. */
/* need to count the number of space-delimited sids */
@@ -1454,7 +1454,7 @@ void init_net_user_info3(TALLOC_CTX *ctx, NET_USER_INFO_3 *usr,
memcpy(usr->lm_sess_key, lm_session_key, sizeof(usr->lm_sess_key));
}
- num_other_sids = init_dom_sid2s(ctx, other_sids, &usr->other_sids);
+ num_other_sids = init_dom_sid2s(ctx, NULL, &usr->other_sids);
usr->num_other_sids = num_other_sids;
usr->buffer_other_sids = (num_other_sids != 0) ? 1 : 0;
@@ -1490,6 +1490,47 @@ void init_net_user_info3(TALLOC_CTX *ctx, NET_USER_INFO_3 *usr,
/* "other" sids are set up above */
}
+ void dump_acct_flags(uint32 acct_flags) {
+
+ int lvl = 10;
+ DEBUG(lvl,("dump_acct_flags\n"));
+ if (acct_flags & ACB_NORMAL) {
+ DEBUGADD(lvl,("\taccount has UF_NORMAL_ACCOUNT\n"));
+ }
+ if (acct_flags & ACB_PWNOEXP) {
+ DEBUGADD(lvl,("\taccount has UF_DONT_EXPIRE_PASSWD\n"));
+ }
+ if (acct_flags & ACB_ENC_TXT_PWD_ALLOWED) {
+ DEBUGADD(lvl,("\taccount has UF_ENCRYPTED_TEXT_PASSWORD_ALLOWED\n"));
+ }
+ if (acct_flags & ACB_NOT_DELEGATED) {
+ DEBUGADD(lvl,("\taccount has UF_NOT_DELEGATED\n"));
+ }
+ if (acct_flags & ACB_USE_DES_KEY_ONLY) {
+ DEBUGADD(lvl,("\taccount has UF_USE_DES_KEY_ONLY set, sig verify wont work\n"));
+ }
+}
+
+ void dump_user_flgs(uint32 user_flags) {
+
+ int lvl = 10;
+ DEBUG(lvl,("dump_user_flgs\n"));
+ if (user_flags & LOGON_EXTRA_SIDS) {
+ DEBUGADD(lvl,("\taccount has LOGON_EXTRA_SIDS\n"));
+ }
+ if (user_flags & LOGON_RESOURCE_GROUPS) {
+ DEBUGADD(lvl,("\taccount has LOGON_RESOURCE_GROUPS\n"));
+ }
+ if (user_flags & LOGON_NTLMV2_ENABLED) {
+ DEBUGADD(lvl,("\taccount has LOGON_NTLMV2_ENABLED\n"));
+ }
+ if (user_flags & LOGON_CACHED_ACCOUNT) {
+ DEBUGADD(lvl,("\taccount has LOGON_CACHED_ACCOUNT\n"));
+ }
+
+
+}
+
/*******************************************************************
This code has been modified to cope with a NET_USER_INFO_2 - which is
exactly the same as a NET_USER_INFO_3, minus the other sids parameters.
@@ -1562,7 +1603,7 @@ BOOL net_io_user_info3(const char *desc, NET_USER_INFO_3 *usr, prs_struct *ps,
return False;
if(!prs_uint32("user_flgs ", ps, depth, &usr->user_flgs)) /* user flags */
return False;
-
+ dump_user_flgs(usr->user_flgs);
if(!prs_uint8s(False, "user_sess_key", ps, depth, usr->user_sess_key, 16)) /* user session key */
return False;
@@ -1579,7 +1620,7 @@ BOOL net_io_user_info3(const char *desc, NET_USER_INFO_3 *usr, prs_struct *ps,
if(!prs_uint32("acct_flags ", ps, depth, &usr->acct_flags)) /* Account flags */
return False;
-
+ dump_acct_flags(usr->acct_flags);
for (i = 0; i < 7; i++)
{
if (!prs_uint32("unkown", ps, depth, &usr->unknown[i])) /* unknown */
diff --git a/source3/rpc_parse/parse_prs.c b/source3/rpc_parse/parse_prs.c
index 7c84ee800b..c4f9f512ab 100644
--- a/source3/rpc_parse/parse_prs.c
+++ b/source3/rpc_parse/parse_prs.c
@@ -1303,6 +1303,35 @@ BOOL prs_string(const char *name, prs_struct *ps, int depth, char *str, int max_
return True;
}
+BOOL prs_string_alloc(const char *name, prs_struct *ps, int depth, const char **str)
+{
+ size_t len;
+ char *tmp_str;
+
+ if (UNMARSHALLING(ps)) {
+ len = strlen(&ps->data_p[ps->data_offset]);
+ } else {
+ len = strlen(*str);
+ }
+
+ tmp_str = PRS_ALLOC_MEM(ps, char, len+1);
+
+ if (tmp_str == NULL) {
+ return False;
+ }
+
+ if (MARSHALLING(ps)) {
+ strncpy(tmp_str, *str, len);
+ }
+
+ if (!prs_string(name, ps, depth, tmp_str, len+1)) {
+ return False;
+ }
+
+ *str = tmp_str;
+ return True;
+}
+
/*******************************************************************
prs_uint16 wrapper. Call this and it sets up a pointer to where the
uint16 should be stored, or gets the size if reading.
diff --git a/source3/rpc_parse/parse_rpc.c b/source3/rpc_parse/parse_rpc.c
index ea4ec2c863..544d139acb 100644
--- a/source3/rpc_parse/parse_rpc.c
+++ b/source3/rpc_parse/parse_rpc.c
@@ -191,16 +191,6 @@ interface/version dce/rpc pipe identification
}, 0x00 \
}
-#define SYNT_UNIXINFO_V0 \
-{ \
- { \
- 0x9c54e310, 0xa955, 0x4885, \
- { 0xbd, 0x31 }, \
- { 0x78, 0x78, \
- 0x71, 0x47, 0xdf, 0xa6 } \
- }, 0x00 \
-}
-
#define SYNT_NTSVCS_V1 \
{ \
{ \
diff --git a/source3/rpc_parse/parse_samr.c b/source3/rpc_parse/parse_samr.c
index 6c2b4f4ea7..7cbaa4e3c9 100644
--- a/source3/rpc_parse/parse_samr.c
+++ b/source3/rpc_parse/parse_samr.c
@@ -5031,7 +5031,7 @@ inits a SAMR_Q_QUERY_USERINFO structure.
********************************************************************/
void init_samr_q_query_userinfo(SAMR_Q_QUERY_USERINFO * q_u,
- POLICY_HND *hnd, uint16 switch_value)
+ const POLICY_HND *hnd, uint16 switch_value)
{
DEBUG(5, ("init_samr_q_query_userinfo\n"));
@@ -6541,7 +6541,7 @@ inits a SAMR_Q_SET_USERINFO structure.
********************************************************************/
void init_samr_q_set_userinfo(SAMR_Q_SET_USERINFO * q_u,
- POLICY_HND *hnd, DATA_BLOB *sess_key,
+ const POLICY_HND *hnd, DATA_BLOB *sess_key,
uint16 switch_value, void *info)
{
DEBUG(5, ("init_samr_q_set_userinfo\n"));
@@ -6615,7 +6615,7 @@ inits a SAMR_Q_SET_USERINFO2 structure.
********************************************************************/
void init_samr_q_set_userinfo2(SAMR_Q_SET_USERINFO2 * q_u,
- POLICY_HND *hnd, DATA_BLOB *sess_key,
+ const POLICY_HND *hnd, DATA_BLOB *sess_key,
uint16 switch_value, SAM_USERINFO_CTR * ctr)
{
DEBUG(5, ("init_samr_q_set_userinfo2\n"));