diff options
Diffstat (limited to 'source3/rpc_parse/parse_reg.c')
-rw-r--r-- | source3/rpc_parse/parse_reg.c | 92 |
1 files changed, 44 insertions, 48 deletions
diff --git a/source3/rpc_parse/parse_reg.c b/source3/rpc_parse/parse_reg.c index 456fad69b4..2698e82440 100644 --- a/source3/rpc_parse/parse_reg.c +++ b/source3/rpc_parse/parse_reg.c @@ -62,7 +62,7 @@ void init_reg_q_open_hkcr(REG_Q_OPEN_HKCR *q_o, reads or writes a structure. ********************************************************************/ -BOOL reg_io_q_open_hkcr(const char *desc, REG_Q_OPEN_HKCR *r_q, prs_struct *ps, int depth) +BOOL reg_io_q_open_hkcr(char *desc, REG_Q_OPEN_HKCR *r_q, prs_struct *ps, int depth) { if (r_q == NULL) return False; @@ -93,7 +93,7 @@ BOOL reg_io_q_open_hkcr(const char *desc, REG_Q_OPEN_HKCR *r_q, prs_struct *ps, reads or writes a structure. ********************************************************************/ -BOOL reg_io_r_open_hkcr(const char *desc, REG_R_OPEN_HKCR *r_r, prs_struct *ps, int depth) +BOOL reg_io_r_open_hkcr(char *desc, REG_R_OPEN_HKCR *r_r, prs_struct *ps, int depth) { if (r_r == NULL) return False; @@ -130,7 +130,7 @@ void init_reg_q_open_hklm(REG_Q_OPEN_HKLM * q_o, /******************************************************************* reads or writes a structure. ********************************************************************/ -BOOL reg_io_q_open_hklm(const char *desc, REG_Q_OPEN_HKLM * r_q, prs_struct *ps, +BOOL reg_io_q_open_hklm(char *desc, REG_Q_OPEN_HKLM * r_q, prs_struct *ps, int depth) { if (r_q == NULL) @@ -161,7 +161,7 @@ BOOL reg_io_q_open_hklm(const char *desc, REG_Q_OPEN_HKLM * r_q, prs_struct *ps, /******************************************************************* reads or writes a structure. ********************************************************************/ -BOOL reg_io_r_open_hklm(const char *desc, REG_R_OPEN_HKLM * r_r, prs_struct *ps, +BOOL reg_io_r_open_hklm(char *desc, REG_R_OPEN_HKLM * r_r, prs_struct *ps, int depth) { if (r_r == NULL) @@ -198,7 +198,7 @@ void init_reg_q_flush_key(REG_Q_FLUSH_KEY *q_u, POLICY_HND *pol) reads or writes a structure. ********************************************************************/ -BOOL reg_io_q_flush_key(const char *desc, REG_Q_FLUSH_KEY *r_q, prs_struct *ps, int depth) +BOOL reg_io_q_flush_key(char *desc, REG_Q_FLUSH_KEY *r_q, prs_struct *ps, int depth) { if (r_q == NULL) return False; @@ -219,7 +219,7 @@ BOOL reg_io_q_flush_key(const char *desc, REG_Q_FLUSH_KEY *r_q, prs_struct *ps, reads or writes a structure. ********************************************************************/ -BOOL reg_io_r_flush_key(const char *desc, REG_R_FLUSH_KEY *r_r, prs_struct *ps, int depth) +BOOL reg_io_r_flush_key(char *desc, REG_R_FLUSH_KEY *r_r, prs_struct *ps, int depth) { if (r_r == NULL) return False; @@ -311,7 +311,7 @@ void init_reg_q_create_key(REG_Q_CREATE_KEY *q_c, POLICY_HND *hnd, reads or writes a structure. ********************************************************************/ -BOOL reg_io_q_create_key(const char *desc, REG_Q_CREATE_KEY *r_q, prs_struct *ps, int depth) +BOOL reg_io_q_create_key(char *desc, REG_Q_CREATE_KEY *r_q, prs_struct *ps, int depth) { if (r_q == NULL) return False; @@ -367,7 +367,7 @@ BOOL reg_io_q_create_key(const char *desc, REG_Q_CREATE_KEY *r_q, prs_struct *p reads or writes a structure. ********************************************************************/ -BOOL reg_io_r_create_key(const char *desc, REG_R_CREATE_KEY *r_r, prs_struct *ps, int depth) +BOOL reg_io_r_create_key(char *desc, REG_R_CREATE_KEY *r_r, prs_struct *ps, int depth) { if (r_r == NULL) return False; @@ -410,7 +410,7 @@ void init_reg_q_delete_val(REG_Q_DELETE_VALUE *q_c, POLICY_HND *hnd, reads or writes a structure. ********************************************************************/ -BOOL reg_io_q_delete_val(const char *desc, REG_Q_DELETE_VALUE *r_q, prs_struct *ps, int depth) +BOOL reg_io_q_delete_val(char *desc, REG_Q_DELETE_VALUE *r_q, prs_struct *ps, int depth) { if (r_q == NULL) return False; @@ -439,7 +439,7 @@ BOOL reg_io_q_delete_val(const char *desc, REG_Q_DELETE_VALUE *r_q, prs_struct reads or writes a structure. ********************************************************************/ -BOOL reg_io_r_delete_val(const char *desc, REG_R_DELETE_VALUE *r_r, prs_struct *ps, int depth) +BOOL reg_io_r_delete_val(char *desc, REG_R_DELETE_VALUE *r_r, prs_struct *ps, int depth) { if (r_r == NULL) return False; @@ -476,7 +476,7 @@ void init_reg_q_delete_key(REG_Q_DELETE_KEY *q_c, POLICY_HND *hnd, reads or writes a structure. ********************************************************************/ -BOOL reg_io_q_delete_key(const char *desc, REG_Q_DELETE_KEY *r_q, prs_struct *ps, int depth) +BOOL reg_io_q_delete_key(char *desc, REG_Q_DELETE_KEY *r_q, prs_struct *ps, int depth) { if (r_q == NULL) return False; @@ -504,7 +504,7 @@ BOOL reg_io_q_delete_key(const char *desc, REG_Q_DELETE_KEY *r_q, prs_struct *p reads or writes a structure. ********************************************************************/ -BOOL reg_io_r_delete_key(const char *desc, REG_R_DELETE_KEY *r_r, prs_struct *ps, int depth) +BOOL reg_io_r_delete_key(char *desc, REG_R_DELETE_KEY *r_r, prs_struct *ps, int depth) { if (r_r == NULL) return False; @@ -539,7 +539,7 @@ void init_reg_q_query_key(REG_Q_QUERY_KEY *q_o, POLICY_HND *hnd, reads or writes a structure. ********************************************************************/ -BOOL reg_io_q_query_key(const char *desc, REG_Q_QUERY_KEY *r_q, prs_struct *ps, int depth) +BOOL reg_io_q_query_key(char *desc, REG_Q_QUERY_KEY *r_q, prs_struct *ps, int depth) { if (r_q == NULL) return False; @@ -568,7 +568,7 @@ BOOL reg_io_q_query_key(const char *desc, REG_Q_QUERY_KEY *r_q, prs_struct *ps, reads or writes a structure. ********************************************************************/ -BOOL reg_io_r_query_key(const char *desc, REG_R_QUERY_KEY *r_r, prs_struct *ps, int depth) +BOOL reg_io_r_query_key(char *desc, REG_R_QUERY_KEY *r_r, prs_struct *ps, int depth) { if (r_r == NULL) return False; @@ -624,7 +624,7 @@ void init_reg_q_unknown_1a(REG_Q_UNKNOWN_1A *q_o, POLICY_HND *hnd) reads or writes a structure. ********************************************************************/ -BOOL reg_io_q_unknown_1a(const char *desc, REG_Q_UNKNOWN_1A *r_q, prs_struct *ps, int depth) +BOOL reg_io_q_unknown_1a(char *desc, REG_Q_UNKNOWN_1A *r_q, prs_struct *ps, int depth) { if (r_q == NULL) return False; @@ -645,7 +645,7 @@ BOOL reg_io_q_unknown_1a(const char *desc, REG_Q_UNKNOWN_1A *r_q, prs_struct *p reads or writes a structure. ********************************************************************/ -BOOL reg_io_r_unknown_1a(const char *desc, REG_R_UNKNOWN_1A *r_r, prs_struct *ps, int depth) +BOOL reg_io_r_unknown_1a(char *desc, REG_R_UNKNOWN_1A *r_r, prs_struct *ps, int depth) { if (r_r == NULL) return False; @@ -669,7 +669,7 @@ BOOL reg_io_r_unknown_1a(const char *desc, REG_R_UNKNOWN_1A *r_r, prs_struct *p reads or writes a structure. ********************************************************************/ -BOOL reg_io_q_save_key(const char *desc, REG_Q_SAVE_KEY *r_q, prs_struct *ps, int depth) +BOOL reg_io_q_save_key(char *desc, REG_Q_SAVE_KEY *r_q, prs_struct *ps, int depth) { if (r_q == NULL) return False; @@ -698,7 +698,7 @@ BOOL reg_io_q_save_key(const char *desc, REG_Q_SAVE_KEY *r_q, prs_struct *ps, i reads or writes a structure. ********************************************************************/ -BOOL reg_io_r_save_key(const char *desc, REG_R_SAVE_KEY *r_r, prs_struct *ps, int depth) +BOOL reg_io_r_save_key(char *desc, REG_R_SAVE_KEY *r_r, prs_struct *ps, int depth) { if (r_r == NULL) return False; @@ -732,7 +732,7 @@ void init_reg_q_open_hku(REG_Q_OPEN_HKU *q_o, reads or writes a structure. ********************************************************************/ -BOOL reg_io_q_open_hku(const char *desc, REG_Q_OPEN_HKU *r_q, prs_struct *ps, int depth) +BOOL reg_io_q_open_hku(char *desc, REG_Q_OPEN_HKU *r_q, prs_struct *ps, int depth) { if (r_q == NULL) return False; @@ -761,7 +761,7 @@ BOOL reg_io_q_open_hku(const char *desc, REG_Q_OPEN_HKU *r_q, prs_struct *ps, i reads or writes a structure. ********************************************************************/ -BOOL reg_io_r_open_hku(const char *desc, REG_R_OPEN_HKU *r_r, prs_struct *ps, int depth) +BOOL reg_io_r_open_hku(char *desc, REG_R_OPEN_HKU *r_r, prs_struct *ps, int depth) { if (r_r == NULL) return False; @@ -796,7 +796,7 @@ void init_reg_q_close(REG_Q_CLOSE *q_c, POLICY_HND *hnd) reads or writes a structure. ********************************************************************/ -BOOL reg_io_q_close(const char *desc, REG_Q_CLOSE *q_u, prs_struct *ps, int depth) +BOOL reg_io_q_close(char *desc, REG_Q_CLOSE *q_u, prs_struct *ps, int depth) { if (q_u == NULL) return False; @@ -819,7 +819,7 @@ BOOL reg_io_q_close(const char *desc, REG_Q_CLOSE *q_u, prs_struct *ps, int dep reads or writes a structure. ********************************************************************/ -BOOL reg_io_r_close(const char *desc, REG_R_CLOSE *r_u, prs_struct *ps, int depth) +BOOL reg_io_r_close(char *desc, REG_R_CLOSE *r_u, prs_struct *ps, int depth) { if (r_u == NULL) return False; @@ -860,7 +860,7 @@ void init_reg_q_set_key_sec(REG_Q_SET_KEY_SEC *q_i, POLICY_HND *pol, SEC_DESC_BU reads or writes a structure. ********************************************************************/ -BOOL reg_io_q_set_key_sec(const char *desc, REG_Q_SET_KEY_SEC *r_q, prs_struct *ps, int depth) +BOOL reg_io_q_set_key_sec(char *desc, REG_Q_SET_KEY_SEC *r_q, prs_struct *ps, int depth) { if (r_q == NULL) return False; @@ -889,7 +889,7 @@ BOOL reg_io_q_set_key_sec(const char *desc, REG_Q_SET_KEY_SEC *r_q, prs_struct reads or writes a structure. ********************************************************************/ -BOOL reg_io_r_set_key_sec(const char *desc, REG_R_SET_KEY_SEC *r_q, prs_struct *ps, int depth) +BOOL reg_io_r_set_key_sec(char *desc, REG_R_SET_KEY_SEC *r_q, prs_struct *ps, int depth) { if (r_q == NULL) return False; @@ -930,7 +930,7 @@ void init_reg_q_get_key_sec(REG_Q_GET_KEY_SEC *q_i, POLICY_HND *pol, reads or writes a structure. ********************************************************************/ -BOOL reg_io_q_get_key_sec(const char *desc, REG_Q_GET_KEY_SEC *r_q, prs_struct *ps, int depth) +BOOL reg_io_q_get_key_sec(char *desc, REG_Q_GET_KEY_SEC *r_q, prs_struct *ps, int depth) { if (r_q == NULL) return False; @@ -975,7 +975,7 @@ makes a structure. reads or writes a structure. ********************************************************************/ -BOOL reg_io_r_get_key_sec(const char *desc, REG_R_GET_KEY_SEC *r_q, prs_struct *ps, int depth) +BOOL reg_io_r_get_key_sec(char *desc, REG_R_GET_KEY_SEC *r_q, prs_struct *ps, int depth) { if (r_q == NULL) return False; @@ -1041,7 +1041,7 @@ BOOL init_reg_q_info(REG_Q_INFO *q_i, POLICY_HND *pol, char* val_name) reads or writes a structure. ********************************************************************/ -BOOL reg_io_q_info(const char *desc, REG_Q_INFO *r_q, prs_struct *ps, int depth) +BOOL reg_io_q_info(char *desc, REG_Q_INFO *r_q, prs_struct *ps, int depth) { if (r_q == NULL) return False; @@ -1174,7 +1174,7 @@ BOOL init_reg_r_info(uint32 include_keyval, REG_R_INFO *r_r, reads or writes a structure. ********************************************************************/ -BOOL reg_io_r_info(const char *desc, REG_R_INFO *r_r, prs_struct *ps, int depth) +BOOL reg_io_r_info(char *desc, REG_R_INFO *r_r, prs_struct *ps, int depth) { if (r_r == NULL) return False; @@ -1298,7 +1298,7 @@ void init_reg_r_enum_val(REG_R_ENUM_VALUE *r_u, REGISTRY_VALUE *val ) reads or writes a structure. ********************************************************************/ -BOOL reg_io_q_enum_val(const char *desc, REG_Q_ENUM_VALUE *q_q, prs_struct *ps, int depth) +BOOL reg_io_q_enum_val(char *desc, REG_Q_ENUM_VALUE *q_q, prs_struct *ps, int depth) { if (q_q == NULL) return False; @@ -1357,7 +1357,7 @@ BOOL reg_io_q_enum_val(const char *desc, REG_Q_ENUM_VALUE *q_q, prs_struct *ps, reads or writes a structure. ********************************************************************/ -BOOL reg_io_r_enum_val(const char *desc, REG_R_ENUM_VALUE *r_q, prs_struct *ps, int depth) +BOOL reg_io_r_enum_val(char *desc, REG_R_ENUM_VALUE *r_q, prs_struct *ps, int depth) { if (r_q == NULL) return False; @@ -1435,7 +1435,7 @@ void init_reg_q_create_val(REG_Q_CREATE_VALUE *q_i, POLICY_HND *pol, reads or writes a structure. ********************************************************************/ -BOOL reg_io_q_create_val(const char *desc, REG_Q_CREATE_VALUE *q_q, prs_struct *ps, int depth) +BOOL reg_io_q_create_val(char *desc, REG_Q_CREATE_VALUE *q_q, prs_struct *ps, int depth) { if (q_q == NULL) return False; @@ -1470,7 +1470,7 @@ BOOL reg_io_q_create_val(const char *desc, REG_Q_CREATE_VALUE *q_q, prs_struct reads or writes a structure. ********************************************************************/ -BOOL reg_io_r_create_val(const char *desc, REG_R_CREATE_VALUE *r_q, prs_struct *ps, int depth) +BOOL reg_io_r_create_val(char *desc, REG_R_CREATE_VALUE *r_q, prs_struct *ps, int depth) { if (r_q == NULL) return False; @@ -1537,7 +1537,7 @@ void init_reg_r_enum_key(REG_R_ENUM_KEY *r_u, char *subkey, uint32 unknown_1, reads or writes a structure. ********************************************************************/ -BOOL reg_io_q_enum_key(const char *desc, REG_Q_ENUM_KEY *q_q, prs_struct *ps, int depth) +BOOL reg_io_q_enum_key(char *desc, REG_Q_ENUM_KEY *q_q, prs_struct *ps, int depth) { if (q_q == NULL) return False; @@ -1591,7 +1591,7 @@ BOOL reg_io_q_enum_key(const char *desc, REG_Q_ENUM_KEY *q_q, prs_struct *ps, i reads or writes a structure. ********************************************************************/ -BOOL reg_io_r_enum_key(const char *desc, REG_R_ENUM_KEY *r_q, prs_struct *ps, int depth) +BOOL reg_io_r_enum_key(char *desc, REG_R_ENUM_KEY *r_q, prs_struct *ps, int depth) { if (r_q == NULL) return False; @@ -1665,7 +1665,7 @@ void init_reg_q_open_entry(REG_Q_OPEN_ENTRY *r_q, POLICY_HND *pol, reads or writes a structure. ********************************************************************/ -BOOL reg_io_q_open_entry(const char *desc, REG_Q_OPEN_ENTRY *r_q, prs_struct *ps, int depth) +BOOL reg_io_q_open_entry(char *desc, REG_Q_OPEN_ENTRY *r_q, prs_struct *ps, int depth) { if (r_q == NULL) return False; @@ -1713,7 +1713,7 @@ void init_reg_r_open_entry(REG_R_OPEN_ENTRY *r_r, reads or writes a structure. ********************************************************************/ -BOOL reg_io_r_open_entry(const char *desc, REG_R_OPEN_ENTRY *r_r, prs_struct *ps, int depth) +BOOL reg_io_r_open_entry(char *desc, REG_R_OPEN_ENTRY *r_r, prs_struct *ps, int depth) { if (r_r == NULL) return False; @@ -1736,8 +1736,8 @@ BOOL reg_io_r_open_entry(const char *desc, REG_R_OPEN_ENTRY *r_r, prs_struct *p /******************************************************************* Inits a structure. ********************************************************************/ -void init_reg_q_shutdown(REG_Q_SHUTDOWN * q_s, const char *msg, - uint32 timeout, BOOL reboot, BOOL force) +void init_reg_q_shutdown(REG_Q_SHUTDOWN * q_s, + const char *msg, uint32 timeout, uint16 flags) { int msg_len; msg_len = strlen(msg); @@ -1750,16 +1750,14 @@ void init_reg_q_shutdown(REG_Q_SHUTDOWN * q_s, const char *msg, init_unistr2(&(q_s->uni_msg), msg, msg_len); q_s->timeout = timeout; - - q_s->reboot = reboot ? 1 : 0; - q_s->force = force ? 1 : 0; + q_s->flags = flags; } /******************************************************************* reads or writes a structure. ********************************************************************/ -BOOL reg_io_q_shutdown(const char *desc, REG_Q_SHUTDOWN * q_s, prs_struct *ps, +BOOL reg_io_q_shutdown(char *desc, REG_Q_SHUTDOWN * q_s, prs_struct *ps, int depth) { if (q_s == NULL) @@ -1787,9 +1785,7 @@ BOOL reg_io_q_shutdown(const char *desc, REG_Q_SHUTDOWN * q_s, prs_struct *ps, if (!prs_uint32("timeout", ps, depth, &(q_s->timeout))) return False; - if (!prs_uint8("force ", ps, depth, &(q_s->force))) - return False; - if (!prs_uint8("reboot ", ps, depth, &(q_s->reboot))) + if (!prs_uint16("flags ", ps, depth, &(q_s->flags))) return False; return True; @@ -1798,7 +1794,7 @@ BOOL reg_io_q_shutdown(const char *desc, REG_Q_SHUTDOWN * q_s, prs_struct *ps, /******************************************************************* reads or writes a structure. ********************************************************************/ -BOOL reg_io_r_shutdown(const char *desc, REG_R_SHUTDOWN * r_s, prs_struct *ps, +BOOL reg_io_r_shutdown(char *desc, REG_R_SHUTDOWN * r_s, prs_struct *ps, int depth) { if (r_s == NULL) @@ -1829,7 +1825,7 @@ void init_reg_q_abort_shutdown(REG_Q_ABORT_SHUTDOWN * q_s) /******************************************************************* reads or writes a structure. ********************************************************************/ -BOOL reg_io_q_abort_shutdown(const char *desc, REG_Q_ABORT_SHUTDOWN * q_s, +BOOL reg_io_q_abort_shutdown(char *desc, REG_Q_ABORT_SHUTDOWN * q_s, prs_struct *ps, int depth) { if (q_s == NULL) @@ -1853,7 +1849,7 @@ BOOL reg_io_q_abort_shutdown(const char *desc, REG_Q_ABORT_SHUTDOWN * q_s, /******************************************************************* reads or writes a structure. ********************************************************************/ -BOOL reg_io_r_abort_shutdown(const char *desc, REG_R_ABORT_SHUTDOWN * r_s, +BOOL reg_io_r_abort_shutdown(char *desc, REG_R_ABORT_SHUTDOWN * r_s, prs_struct *ps, int depth) { if (r_s == NULL) |