summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim McDonough <jmcd@samba.org>2003-10-24 13:49:29 +0000
committerJim McDonough <jmcd@samba.org>2003-10-24 13:49:29 +0000
commit3d8e3f314b9f1ad3966afd5ad217a63b109de0f9 (patch)
tree07e46a5c7e7ab1f5a08b3aac5d1bc092d068decf
parentd2523233ea46945dea9c701ad4e5519f5cdc95c4 (diff)
downloadsamba-3d8e3f314b9f1ad3966afd5ad217a63b109de0f9.tar.gz
samba-3d8e3f314b9f1ad3966afd5ad217a63b109de0f9.tar.bz2
samba-3d8e3f314b9f1ad3966afd5ad217a63b109de0f9.zip
Add initshutdown pipe commands to rpcclient. Second part of fix to bug
#534 (This used to be commit 4e86243ea1d4bbe96720caaaf02300f5e15bee5a)
-rw-r--r--source3/Makefile.in7
-rw-r--r--source3/include/ntdomain.h1
-rw-r--r--source3/include/smb.h4
-rw-r--r--source3/rpc_parse/parse_rpc.c10
-rw-r--r--source3/rpcclient/rpcclient.c2
5 files changed, 20 insertions, 4 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 145e489f9f..617962f1a5 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -233,7 +233,8 @@ LIBMSRPC_OBJ = rpc_client/cli_lsarpc.o rpc_client/cli_samr.o \
rpc_client/cli_wkssvc.o rpc_client/cli_dfs.o \
rpc_client/cli_reg.o rpc_client/cli_pipe.o \
rpc_client/cli_spoolss.o rpc_client/cli_spoolss_notify.o \
- rpc_client/cli_ds.o rpc_client/cli_echo.o
+ rpc_client/cli_ds.o rpc_client/cli_echo.o \
+ rpc_client/cli_shutdown.o
REGOBJS_OBJ = registry/reg_objects.o
REGISTRY_OBJ = registry/reg_frontend.o registry/reg_cachehook.o registry/reg_printing.o \
@@ -274,7 +275,7 @@ RPC_PARSE_OBJ = rpc_parse/parse_lsa.o rpc_parse/parse_net.o \
rpc_parse/parse_samr.o rpc_parse/parse_srv.o \
rpc_parse/parse_wks.o rpc_parse/parse_ds.o \
rpc_parse/parse_spoolss.o rpc_parse/parse_dfs.o \
- rpc_parse/parse_echo.o \
+ rpc_parse/parse_echo.o rpc_parse/parse_shutdown.o \
$(REGOBJS_OBJ)
@@ -441,7 +442,7 @@ RPCCLIENT_OBJ1 = rpcclient/rpcclient.o rpcclient/cmd_lsarpc.o \
rpcclient/cmd_netlogon.o rpcclient/cmd_srvsvc.o \
rpcclient/cmd_dfs.o rpcclient/cmd_reg.o \
rpcclient/display_sec.o rpcclient/cmd_ds.o \
- rpcclient/cmd_echo.o
+ rpcclient/cmd_echo.o rpcclient/cmd_shutdown.o
RPCCLIENT_OBJ = $(RPCCLIENT_OBJ1) \
$(PARAM_OBJ) $(LIBSMB_OBJ) $(UBIQX_OBJ) $(LIB_OBJ) \
diff --git a/source3/include/ntdomain.h b/source3/include/ntdomain.h
index ccbc190c59..3fe8f41d8d 100644
--- a/source3/include/ntdomain.h
+++ b/source3/include/ntdomain.h
@@ -402,5 +402,6 @@ struct acct_info
#include "rpc_dfs.h"
#include "rpc_ds.h"
#include "rpc_echo.h"
+#include "rpc_shutdown.h"
#endif /* _NT_DOMAIN_H */
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 8c6f47f23f..e41b5834f7 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -194,6 +194,7 @@ typedef smb_ucs2_t wfstring[FSTRING_LEN];
#define PIPE_SPOOLSS "\\PIPE\\spoolss"
#define PIPE_NETDFS "\\PIPE\\netdfs"
#define PIPE_ECHO "\\PIPE\\rpcecho"
+#define PIPE_SHUTDOWN "\\PIPE\\initshutdown"
#define PIPE_NETLOGON_PLAIN "\\NETLOGON"
@@ -207,7 +208,8 @@ typedef smb_ucs2_t wfstring[FSTRING_LEN];
#define PI_SPOOLSS 7
#define PI_NETDFS 8
#define PI_ECHO 9
-#define PI_MAX_PIPES 10
+#define PI_SHUTDOWN 10
+#define PI_MAX_PIPES 11
/* 64 bit time (100usec) since ????? - cifs6.txt, section 3.5, page 30 */
typedef struct nttime_info
diff --git a/source3/rpc_parse/parse_rpc.c b/source3/rpc_parse/parse_rpc.c
index 1ea59feaed..e2781b2008 100644
--- a/source3/rpc_parse/parse_rpc.c
+++ b/source3/rpc_parse/parse_rpc.c
@@ -147,6 +147,15 @@ interface/version dce/rpc pipe identification
}, 0x01 \
}
+#define SYNT_SHUTDOWN_V1 \
+{ \
+ { \
+ 0x894de0c0, 0x0d55, 0x11d3, \
+ { 0xa3, 0x22, 0x00, 0xc0, \
+ 0x4f, 0xa3, 0x21, 0xa1 } \
+ }, 0x01 \
+}
+
/*
* IMPORTANT!! If you update this structure, make sure to
* update the index #defines in smb.h.
@@ -165,6 +174,7 @@ const struct pipe_id_info pipe_names [] =
{ PIPE_SPOOLSS , SYNT_SPOOLSS_V1 , PIPE_SPOOLSS , TRANS_SYNT_V2 },
{ PIPE_NETDFS , SYNT_NETDFS_V3 , PIPE_NETDFS , TRANS_SYNT_V2 },
{ PIPE_ECHO , SYNT_ECHO_V1 , PIPE_ECHO , TRANS_SYNT_V2 },
+ { PIPE_SHUTDOWN, SYNT_SHUTDOWN_V1 , PIPE_SHUTDOWN , TRANS_SYNT_V2 },
{ NULL , SYNT_NONE_V0 , NULL , SYNT_NONE_V0 }
};
diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c
index 773441a27c..f6dfd9bffa 100644
--- a/source3/rpcclient/rpcclient.c
+++ b/source3/rpcclient/rpcclient.c
@@ -462,6 +462,7 @@ extern struct cmd_set dfs_commands[];
extern struct cmd_set reg_commands[];
extern struct cmd_set ds_commands[];
extern struct cmd_set echo_commands[];
+extern struct cmd_set shutdown_commands[];
static struct cmd_set *rpcclient_command_list[] = {
rpcclient_commands,
@@ -474,6 +475,7 @@ static struct cmd_set *rpcclient_command_list[] = {
dfs_commands,
reg_commands,
echo_commands,
+ shutdown_commands,
NULL
};