summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-04-06 18:25:17 +0000
committerJeremy Allison <jra@samba.org>2001-04-06 18:25:17 +0000
commit97cf9d3a3de4d005477ee07423b7d9c34d6d1761 (patch)
treec369d62f11fb58b4f60fd30a04ec1be7405c7547 /source3/rpc_server
parent3874261774ef9b56461602b4aea3cf4e7b9cc5a0 (diff)
downloadsamba-97cf9d3a3de4d005477ee07423b7d9c34d6d1761.tar.gz
samba-97cf9d3a3de4d005477ee07423b7d9c34d6d1761.tar.bz2
samba-97cf9d3a3de4d005477ee07423b7d9c34d6d1761.zip
Implemented stub function for NET_SHARE_DELETE. Now to implement the real
internals to support server manager. Jeremy (This used to be commit 3512ba1f655d5588db87f1afa1d12f599ad7b74a)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_srvsvc.c33
-rw-r--r--source3/rpc_server/srv_srvsvc_nt.c29
2 files changed, 57 insertions, 5 deletions
diff --git a/source3/rpc_server/srv_srvsvc.c b/source3/rpc_server/srv_srvsvc.c
index d588298c88..d4d5e1bfe8 100644
--- a/source3/rpc_server/srv_srvsvc.c
+++ b/source3/rpc_server/srv_srvsvc.c
@@ -258,7 +258,7 @@ static BOOL api_srv_net_share_set_info(pipes_struct *p)
}
/*******************************************************************
- RPC to add share information. Use the SET wire format.
+ RPC to add share information.
********************************************************************/
static BOOL api_srv_net_share_add(pipes_struct *p)
@@ -288,6 +288,36 @@ static BOOL api_srv_net_share_add(pipes_struct *p)
}
/*******************************************************************
+ RPC to delete share information.
+********************************************************************/
+
+static BOOL api_srv_net_share_del(pipes_struct *p)
+{
+ SRV_Q_NET_SHARE_DEL q_u;
+ SRV_R_NET_SHARE_DEL r_u;
+ prs_struct *data = &p->in_data.data;
+ prs_struct *rdata = &p->out_data.rdata;
+
+ ZERO_STRUCT(q_u);
+ ZERO_STRUCT(r_u);
+
+ /* Unmarshall the net server del info. */
+ if(!srv_io_q_net_share_del("", &q_u, data, 0)) {
+ DEBUG(0,("api_srv_net_share_del: Failed to unmarshall SRV_Q_NET_SHARE_DEL.\n"));
+ return False;
+ }
+
+ r_u.status = _srv_net_share_del(p, &q_u, &r_u);
+
+ if(!srv_io_r_net_share_del("", &r_u, rdata, 0)) {
+ DEBUG(0,("api_srv_net_share_del: Failed to marshall SRV_R_NET_SHARE_DEL.\n"));
+ return False;
+ }
+
+ return True;
+}
+
+/*******************************************************************
api_srv_net_remote_tod
********************************************************************/
@@ -325,6 +355,7 @@ struct api_struct api_srv_cmds[] =
{ "SRV_NETSHAREENUM_ALL" , SRV_NETSHAREENUM_ALL , api_srv_net_share_enum_all },
{ "SRV_NETSHAREENUM" , SRV_NETSHAREENUM , api_srv_net_share_enum },
{ "SRV_NET_SHARE_ADD" , SRV_NET_SHARE_ADD , api_srv_net_share_add },
+ { "SRV_NET_SHARE_DEL" , SRV_NET_SHARE_DEL , api_srv_net_share_del },
{ "SRV_NET_SHARE_GET_INFO", SRV_NET_SHARE_GET_INFO, api_srv_net_share_get_info },
{ "SRV_NET_SHARE_SET_INFO", SRV_NET_SHARE_SET_INFO, api_srv_net_share_set_info },
{ "SRV_NETFILEENUM" , SRV_NETFILEENUM , api_srv_net_file_enum },
diff --git a/source3/rpc_server/srv_srvsvc_nt.c b/source3/rpc_server/srv_srvsvc_nt.c
index acb8846db6..0e03918bfb 100644
--- a/source3/rpc_server/srv_srvsvc_nt.c
+++ b/source3/rpc_server/srv_srvsvc_nt.c
@@ -955,7 +955,7 @@ uint32 _srv_net_share_set_info(pipes_struct *p, SRV_Q_NET_SHARE_SET_INFO *q_u, S
share_name = dos_unistr2_to_str(&q_u->uni_share_name);
- r_u->switch_value = q_u->info_level;
+ r_u->switch_value = 0;
snum = find_service(share_name);
@@ -985,7 +985,6 @@ uint32 _srv_net_share_set_info(pipes_struct *p, SRV_Q_NET_SHARE_SET_INFO *q_u, S
status = NT_STATUS_BAD_NETWORK_NAME;
}
- r_u->switch_value = 0;
r_u->status = status;
DEBUG(5,("_srv_net_share_set_info: %d\n", __LINE__));
@@ -1003,7 +1002,7 @@ uint32 _srv_net_share_add(pipes_struct *p, SRV_Q_NET_SHARE_ADD *q_u, SRV_R_NET_S
DEBUG(5,("_srv_net_share_add: %d\n", __LINE__));
- r_u->switch_value = q_u->info_level;
+ r_u->switch_value = 0;
switch (q_u->info_level) {
case 1:
@@ -1025,7 +1024,6 @@ uint32 _srv_net_share_add(pipes_struct *p, SRV_Q_NET_SHARE_ADD *q_u, SRV_R_NET_S
break;
}
- r_u->switch_value = 0;
r_u->status = status;
DEBUG(5,("_srv_net_share_add: %d\n", __LINE__));
@@ -1034,6 +1032,29 @@ uint32 _srv_net_share_add(pipes_struct *p, SRV_Q_NET_SHARE_ADD *q_u, SRV_R_NET_S
}
/*******************************************************************
+ Net share delete. Stub for now. JRA.
+********************************************************************/
+
+uint32 _srv_net_share_del(pipes_struct *p, SRV_Q_NET_SHARE_DEL *q_u, SRV_R_NET_SHARE_DEL *r_u)
+{
+ char *share_name;
+ uint32 status = NT_STATUS_NOPROBLEMO;
+ int snum;
+
+ DEBUG(5,("_srv_net_share_del: %d\n", __LINE__));
+
+ share_name = dos_unistr2_to_str(&q_u->uni_share_name);
+
+ snum = find_service(share_name);
+
+ if (snum < 0)
+ return NT_STATUS_BAD_NETWORK_NAME;
+
+ /* Stub... */
+ return ERROR_ACCESS_DENIED;
+}
+
+/*******************************************************************
time of day
********************************************************************/