summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1999-02-16 18:04:21 +0000
committerLuke Leighton <lkcl@samba.org>1999-02-16 18:04:21 +0000
commit52fb07aea26cc3041e571fafdc843622f1741a19 (patch)
tree674846ac410652cfbcdc9cd1827c28e87c5b5b26 /source3/include
parent78314c2e327ccd67e75dbc92be497ff2852b1817 (diff)
downloadsamba-52fb07aea26cc3041e571fafdc843622f1741a19.tar.gz
samba-52fb07aea26cc3041e571fafdc843622f1741a19.tar.bz2
samba-52fb07aea26cc3041e571fafdc843622f1741a19.zip
rpcclient shutdown command
(This used to be commit 59f081069a58f6a070ed6016c06153d5e695da93)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/proto.h13
-rw-r--r--source3/include/rpc_reg.h21
-rw-r--r--source3/include/smb.h7
3 files changed, 39 insertions, 2 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 1d3b041e4d..a1b8f2eeac 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -561,6 +561,8 @@ BOOL string_set(char **dest,const char *src);
void string_sub(char *s,const char *pattern,const char *insert);
void all_string_sub(char *s,const char *pattern,const char *insert);
void split_at_last_component(char *path, char *front, char sep, char *back);
+char *bit_field_to_str(uint32 type, struct field_info *bs);
+char *enum_field_to_str(uint32 type, struct field_info *bs, BOOL first_default);
/*The following definitions come from lib/util_unistr.c */
@@ -568,11 +570,11 @@ char *ascii_to_unibuf(char *dest, const char *src, int maxlen);
void unibuf_to_ascii(char *dest, const char *src, int maxlen);
void ascii_to_unistr(uint16 *dest, const char *src, int maxlen);
void unistr_to_ascii(char *dest, const uint16 *src, int len);
-void unistr2_to_ascii(char *dest, const UNISTR2 *str, int destlen);
+void unistr2_to_ascii(char *dest, const UNISTR2 *str, int maxlen);
char *skip_unibuf(char *srcbuf, int len);
char *uni_strncpy(char *destbuf, const char *srcbuf, int len);
uint32 buffer2_to_uint32(const BUFFER2 *str);
-void buffer2_to_multistr(char *dest, const BUFFER2 *str, int destlen);
+void buffer2_to_multistr(char *dest, const BUFFER2 *str, int maxlen);
/*The following definitions come from libsmb/clientgen.c */
@@ -1632,6 +1634,8 @@ BOOL do_reg_open_entry(struct cli_state *cli, uint16 fnum, POLICY_HND *hnd,
char *key_name, uint32 unk_0,
POLICY_HND *key_hnd);
BOOL do_reg_close(struct cli_state *cli, uint16 fnum, POLICY_HND *hnd);
+BOOL do_reg_shutdown(struct cli_state *cli, uint16 fnum,
+ char *msg, uint32 timeout, uint16 flags);
/*The following definitions come from rpc_client/cli_samr.c */
@@ -2092,6 +2096,10 @@ void reg_io_q_open_entry(char *desc, REG_Q_OPEN_ENTRY *r_q, prs_struct *ps, int
void make_reg_r_open_entry(REG_R_OPEN_ENTRY *r_r,
POLICY_HND *pol, uint32 status);
void reg_io_r_open_entry(char *desc, REG_R_OPEN_ENTRY *r_r, prs_struct *ps, int depth);
+void make_reg_q_shutdown(REG_Q_SHUTDOWN *q_i,
+ char *msg, uint32 timeout, uint16 flags);
+void reg_io_q_shutdown(char *desc, REG_Q_SHUTDOWN *q_q, prs_struct *ps, int depth);
+void reg_io_r_shutdown(char *desc, REG_R_SHUTDOWN *r_q, prs_struct *ps, int depth);
/*The following definitions come from rpc_parse/parse_rpc.c */
@@ -2677,6 +2685,7 @@ void cmd_reg_delete_key(struct client_info *info);
void cmd_reg_create_key(struct client_info *info);
void cmd_reg_test_key_sec(struct client_info *info);
void cmd_reg_get_key_sec(struct client_info *info);
+void cmd_reg_shutdown(struct client_info *info);
/*The following definitions come from rpcclient/cmd_samr.c */
diff --git a/source3/include/rpc_reg.h b/source3/include/rpc_reg.h
index 7766052588..cc163540d7 100644
--- a/source3/include/rpc_reg.h
+++ b/source3/include/rpc_reg.h
@@ -42,6 +42,7 @@
#define REG_OPEN_ENTRY 0x0f
#define REG_INFO 0x11
#define REG_CLOSE 0x05
+#define REG_SHUTDOWN 0x18
#define HKEY_LOCAL_MACHINE 0x80000000
#define HKEY_USERS 0x80000003
@@ -461,6 +462,26 @@ typedef struct r_reg_open_entry_info
} REG_R_OPEN_ENTRY;
+/* REG_Q_SHUTDOWN */
+typedef struct q_reg_shutdown_info
+{
+ uint32 ptr_0;
+ uint32 ptr_1;
+ uint32 ptr_2;
+ UNIHDR hdr_msg; /* shutdown message */
+ UNISTR2 uni_msg;
+ uint32 timeout; /* seconds */
+ uint16 flags;
+
+} REG_Q_SHUTDOWN;
+
+/* REG_R_SHUTDOWN */
+typedef struct r_reg_shutdown_info
+{
+ uint32 status; /* return status */
+
+} REG_R_SHUTDOWN;
+
#endif /* _RPC_REG_H */
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 662ba245b1..daf617bd7f 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -1900,6 +1900,13 @@ struct nmb_name {
#define MAP_TO_GUEST_ON_BAD_USER 1
#define MAP_TO_GUEST_ON_BAD_PASSWORD 2
+/* associate bit field or enumeration field with a string */
+struct field_info
+{
+ uint32 bits;
+ char *str;
+};
+
#endif /* _SMB_H */
/* _SMB_H */