summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJim McDonough <jmcd@samba.org>2003-10-24 13:49:25 +0000
committerJim McDonough <jmcd@samba.org>2003-10-24 13:49:25 +0000
commit65ae858c1b49efa64c759a914b09204eca14db42 (patch)
tree55729d4e511f6824b2b4496e6df55ce769dc6435 /source3
parent6258550534050e59a80ae8e39d9fb308b2e648fb (diff)
downloadsamba-65ae858c1b49efa64c759a914b09204eca14db42.tar.gz
samba-65ae858c1b49efa64c759a914b09204eca14db42.tar.bz2
samba-65ae858c1b49efa64c759a914b09204eca14db42.zip
Add initshutdown pipe commands to rpcclient. Second part of fix to bug
#534 (This used to be commit 99f4fa54497ba1c0fc0ba39d51b3ce201a8e6cd2)
Diffstat (limited to 'source3')
-rw-r--r--source3/Makefile.in9
-rw-r--r--source3/include/ntdomain.h1
-rw-r--r--source3/include/smb.h6
-rw-r--r--source3/rpc_parse/parse_rpc.c10
-rw-r--r--source3/rpcclient/rpcclient.c2
5 files changed, 22 insertions, 6 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 8c1c65e865..b0d9be55ec 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -235,7 +235,7 @@ LIBMSRPC_OBJ = rpc_client/cli_lsarpc.o rpc_client/cli_samr.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_epmapper.o
+ rpc_client/cli_shutdown.o rpc_client/cli_epmapper.o
REGOBJS_OBJ = registry/reg_objects.o
REGISTRY_OBJ = registry/reg_frontend.o registry/reg_cachehook.o registry/reg_printing.o \
@@ -278,8 +278,8 @@ 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_epmapper.o \
- $(REGOBJS_OBJ)
+ rpc_parse/parse_echo.o rpc_parse/parse_shutdown.o \
+ rpc_parse/parse_epmapper.o $(REGOBJS_OBJ)
RPC_CLIENT_OBJ = rpc_client/cli_pipe.o
@@ -448,7 +448,8 @@ 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_epmapper.o
+ rpcclient/cmd_echo.o rpcclient/cmd_shutdown.o \
+ rpcclient/cmd_epmapper.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 66057424ca..5da6d86410 100644
--- a/source3/include/ntdomain.h
+++ b/source3/include/ntdomain.h
@@ -403,5 +403,6 @@ struct acct_info
#include "rpc_ds.h"
#include "rpc_echo.h"
#include "rpc_epmapper.h"
+#include "rpc_shutdown.h"
#endif /* _NT_DOMAIN_H */
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 1e4c48132a..689e6ebe1d 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_EPM "\\PIPE\\epmapper"
#define PIPE_NETLOGON_PLAIN "\\NETLOGON"
@@ -208,8 +209,9 @@ typedef smb_ucs2_t wfstring[FSTRING_LEN];
#define PI_SPOOLSS 7
#define PI_NETDFS 8
#define PI_ECHO 9
-#define PI_EPM 10
-#define PI_MAX_PIPES 11
+#define PI_SHUTDOWN 10
+#define PI_EPM 11
+#define PI_MAX_PIPES 12
/* 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 f053297192..18ac37778c 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 \
+}
+
#define SYNT_EPM_V3 \
{ \
{ \
@@ -174,6 +183,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 },
{ PIPE_EPM , SYNT_EPM_V3 , PIPE_EPM , TRANS_SYNT_V2 },
{ NULL , SYNT_NONE_V0 , NULL , SYNT_NONE_V0 }
};
diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c
index f60cb67cba..0b60dea2fa 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[];
extern struct cmd_set epm_commands[];
static struct cmd_set *rpcclient_command_list[] = {
@@ -475,6 +476,7 @@ static struct cmd_set *rpcclient_command_list[] = {
dfs_commands,
reg_commands,
echo_commands,
+ shutdown_commands,
epm_commands,
NULL
};