summaryrefslogtreecommitdiff
path: root/source3/rpc_parse
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-04-06 17:41:47 +0000
committerJeremy Allison <jra@samba.org>2001-04-06 17:41:47 +0000
commit3874261774ef9b56461602b4aea3cf4e7b9cc5a0 (patch)
tree48fd16e3932124e1c62a63a418c1f32520ca7213 /source3/rpc_parse
parentfd4c525d5832d80fc7684255f94c606bb83c0e28 (diff)
downloadsamba-3874261774ef9b56461602b4aea3cf4e7b9cc5a0.tar.gz
samba-3874261774ef9b56461602b4aea3cf4e7b9cc5a0.tar.bz2
samba-3874261774ef9b56461602b4aea3cf4e7b9cc5a0.zip
Added stub function for NET_SHARE_ADD. Once this is implemented to call a hook
function (same for NET_SHARE_DELETE and NET_SHARE_SET) we will be able to manage the shares section in smb.conf via NT server manager........ This should enhance the friendliness of Samba in NT-only shops by an order of magnitude. Jeremy. (This used to be commit a2cd5f2ba11164a17622b96374ab43070f9ed691)
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r--source3/rpc_parse/parse_srv.c58
1 files changed, 58 insertions, 0 deletions
diff --git a/source3/rpc_parse/parse_srv.c b/source3/rpc_parse/parse_srv.c
index dd70c5521c..fd38594b0d 100644
--- a/source3/rpc_parse/parse_srv.c
+++ b/source3/rpc_parse/parse_srv.c
@@ -757,6 +757,64 @@ BOOL srv_io_r_net_share_set_info(char *desc, SRV_R_NET_SHARE_SET_INFO *q_n, prs_
}
/*******************************************************************
+ Reads or writes a structure.
+********************************************************************/
+
+BOOL srv_io_q_net_share_add(char *desc, SRV_Q_NET_SHARE_ADD *q_n, prs_struct *ps, int depth)
+{
+ if (q_n == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "srv_io_q_net_share_add");
+ depth++;
+
+ if(!prs_align(ps))
+ return False;
+
+ if(!prs_uint32("ptr_srv_name", ps, depth, &q_n->ptr_srv_name))
+ return False;
+ if(!smb_io_unistr2("", &q_n->uni_srv_name, True, ps, depth))
+ return False;
+
+ if(!prs_align(ps))
+ return False;
+
+ if(!prs_uint32("info_level", ps, depth, &q_n->info_level))
+ return False;
+
+ if(!prs_align(ps))
+ return False;
+
+ if(!srv_io_srv_share_info("info ", ps, depth, &q_n->info))
+ return False;
+
+ return True;
+}
+
+/*******************************************************************
+ Reads or writes a structure.
+********************************************************************/
+
+BOOL srv_io_r_net_share_add(char *desc, SRV_R_NET_SHARE_ADD *q_n, prs_struct *ps, int depth)
+{
+ if (q_n == NULL)
+ return False;
+
+ prs_debug(ps, depth, desc, "srv_io_r_net_share_add");
+ depth++;
+
+ if(!prs_align(ps))
+ return False;
+
+ if(!prs_uint32("switch_value ", ps, depth, &q_n->switch_value))
+ return False;
+ if(!prs_uint32("status ", ps, depth, &q_n->status))
+ return False;
+
+ return True;
+}
+
+/*******************************************************************
Inits a SESS_INFO_0_STR structure
********************************************************************/