summaryrefslogtreecommitdiffstats
path: root/source3/rpc_server/srv_srvsvc.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-04-06 01:39:12 +0000
committerJeremy Allison <jra@samba.org>2001-04-06 01:39:12 +0000
commit529f7c07f507f186c599826d0b10d10c131ff902 (patch)
tree07beeafe53d3618225fc6b7123694b0099754569 /source3/rpc_server/srv_srvsvc.c
parent72aa0d8073258a691d34b7aa4824a48ce90308c6 (diff)
downloadsamba-529f7c07f507f186c599826d0b10d10c131ff902.tar.gz
samba-529f7c07f507f186c599826d0b10d10c131ff902.tar.xz
samba-529f7c07f507f186c599826d0b10d10c131ff902.zip
We can now use server manager to look at Samba shares. NT still expects a ":"
in the path though.... I'm looking into it. Jeremy. (This used to be commit a152c2c59a9a8972a3c73287e26e4de2f49c2d65)
Diffstat (limited to 'source3/rpc_server/srv_srvsvc.c')
-rw-r--r--source3/rpc_server/srv_srvsvc.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/source3/rpc_server/srv_srvsvc.c b/source3/rpc_server/srv_srvsvc.c
index 76e6be2ec1..95896f36c8 100644
--- a/source3/rpc_server/srv_srvsvc.c
+++ b/source3/rpc_server/srv_srvsvc.c
@@ -141,6 +141,36 @@ static BOOL api_srv_net_sess_enum(pipes_struct *p)
RPC to enumerate shares.
********************************************************************/
+static BOOL api_srv_net_share_enum_all(pipes_struct *p)
+{
+ SRV_Q_NET_SHARE_ENUM q_u;
+ SRV_R_NET_SHARE_ENUM 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 get enum. */
+ if(!srv_io_q_net_share_enum("", &q_u, data, 0)) {
+ DEBUG(0,("api_srv_net_share_enum_all: Failed to unmarshall SRV_Q_NET_SHARE_ENUM.\n"));
+ return False;
+ }
+
+ r_u.status = _srv_net_share_enum_all(p, &q_u, &r_u);
+
+ if (!srv_io_r_net_share_enum("", &r_u, rdata, 0)) {
+ DEBUG(0,("api_srv_net_share_enum_all: Failed to marshall SRV_R_NET_SHARE_ENUM.\n"));
+ return False;
+ }
+
+ return True;
+}
+
+/*******************************************************************
+ RPC to enumerate shares.
+********************************************************************/
+
static BOOL api_srv_net_share_enum(pipes_struct *p)
{
SRV_Q_NET_SHARE_ENUM q_u;
@@ -262,6 +292,7 @@ struct api_struct api_srv_cmds[] =
{
{ "SRV_NETCONNENUM" , SRV_NETCONNENUM , api_srv_net_conn_enum },
{ "SRV_NETSESSENUM" , SRV_NETSESSENUM , api_srv_net_sess_enum },
+ { "SRV_NETSHAREENUM_ALL" , SRV_NETSHAREENUM_ALL , api_srv_net_share_enum_all },
{ "SRV_NETSHAREENUM" , SRV_NETSHAREENUM , api_srv_net_share_enum },
{ "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 },