diff options
author | Andrew Tridgell <tridge@samba.org> | 2001-09-04 07:13:01 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2001-09-04 07:13:01 +0000 |
commit | 19fea3242cf6234786b6cbb60631e0071f31ff9f (patch) | |
tree | 1de6e79890a80a1e03cf0dce5813513aaf51bc59 /source3/rpc_parse | |
parent | 55cf37488f66eba2826dba08e80dd4ab6df33fc3 (diff) | |
download | samba-19fea3242cf6234786b6cbb60631e0071f31ff9f.tar.gz samba-19fea3242cf6234786b6cbb60631e0071f31ff9f.tar.bz2 samba-19fea3242cf6234786b6cbb60631e0071f31ff9f.zip |
the next stage in the NTSTATUS/WERROR change. smbd and nmbd now compile, but the client code still needs some work
(This used to be commit dcd6e735f709a9231860ceb9682db40ff26c9a66)
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r-- | source3/rpc_parse/parse_dfs.c | 10 | ||||
-rw-r--r-- | source3/rpc_parse/parse_lsa.c | 34 | ||||
-rw-r--r-- | source3/rpc_parse/parse_net.c | 28 | ||||
-rw-r--r-- | source3/rpc_parse/parse_prs.c | 61 | ||||
-rw-r--r-- | source3/rpc_parse/parse_reg.c | 38 | ||||
-rw-r--r-- | source3/rpc_parse/parse_rpc.c | 2 | ||||
-rw-r--r-- | source3/rpc_parse/parse_samr.c | 108 | ||||
-rw-r--r-- | source3/rpc_parse/parse_spoolss.c | 88 | ||||
-rw-r--r-- | source3/rpc_parse/parse_srv.c | 32 | ||||
-rw-r--r-- | source3/rpc_parse/parse_wks.c | 2 |
10 files changed, 232 insertions, 171 deletions
diff --git a/source3/rpc_parse/parse_dfs.c b/source3/rpc_parse/parse_dfs.c index 0c7ea54315..70270e2c36 100644 --- a/source3/rpc_parse/parse_dfs.c +++ b/source3/rpc_parse/parse_dfs.c @@ -66,7 +66,7 @@ BOOL dfs_io_r_dfs_exist(char *desc, DFS_R_DFS_EXIST *q_d, prs_struct *ps, int de if(!prs_align(ps)) return False; - if(!prs_uint32("exist flag", ps, 0, &q_d->status)) + if(!prs_ntstatus("exist flag", ps, 0, &q_d->status)) return False; return True; @@ -139,7 +139,7 @@ BOOL dfs_io_r_dfs_remove(char *desc, DFS_R_DFS_REMOVE *r_d, prs_struct *ps, int prs_debug(ps, depth, desc, "dfs_io_r_dfs_remove"); depth++; - if(!prs_uint32("status", ps, depth, &r_d->status)) + if(!prs_ntstatus("status", ps, depth, &r_d->status)) return False; return True; @@ -225,7 +225,7 @@ BOOL dfs_io_r_dfs_add(char *desc, DFS_R_DFS_ADD *r_d, prs_struct *ps, int depth) prs_debug(ps, depth, desc, "dfs_io_r_dfs_add"); depth++; - if(!prs_uint32("status", ps, depth, &r_d->status)) + if(!prs_ntstatus("status", ps, depth, &r_d->status)) return False; return True; @@ -300,7 +300,7 @@ BOOL dfs_io_r_dfs_get_info(char* desc, DFS_R_DFS_GET_INFO* r_i, prs_struct* ps, if(!dfs_io_dfs_info_ctr("", &r_i->ctr, 1, r_i->level, ps, depth)) return False; - if(!prs_uint32("status", ps, depth, &r_i->status)) + if(!prs_ntstatus("status", ps, depth, &r_i->status)) return False; return True; } @@ -501,7 +501,7 @@ BOOL dfs_io_r_dfs_enum(char *desc, DFS_R_DFS_ENUM *q_d, prs_struct *ps, int dept if(!smb_io_enum_hnd("resume_hnd", &q_d->reshnd, ps, depth)) return False; - if(!prs_uint32("status", ps, depth, &q_d->status)) + if(!prs_ntstatus("status", ps, depth, &q_d->status)) return False; return True; } diff --git a/source3/rpc_parse/parse_lsa.c b/source3/rpc_parse/parse_lsa.c index 9bfb6746bb..29da2c6913 100644 --- a/source3/rpc_parse/parse_lsa.c +++ b/source3/rpc_parse/parse_lsa.c @@ -324,7 +324,7 @@ BOOL lsa_io_r_open_pol(char *desc, LSA_R_OPEN_POL *r_p, prs_struct *ps, if(!smb_io_pol_hnd("", &r_p->pol, ps, depth)) return False; - if(!prs_uint32("status", ps, depth, &r_p->status)) + if(!prs_ntstatus("status", ps, depth, &r_p->status)) return False; return True; @@ -391,7 +391,7 @@ BOOL lsa_io_r_open_pol2(char *desc, LSA_R_OPEN_POL2 *r_p, prs_struct *ps, if(!smb_io_pol_hnd("", &r_p->pol, ps, depth)) return False; - if(!prs_uint32("status", ps, depth, &r_p->status)) + if(!prs_ntstatus("status", ps, depth, &r_p->status)) return False; return True; @@ -452,7 +452,7 @@ BOOL lsa_io_r_query_sec_obj(char *desc, LSA_R_QUERY_SEC_OBJ *r_u, return False; } - if (!prs_uint32("status", ps, depth, &r_u->status)) + if (!prs_ntstatus("status", ps, depth, &r_u->status)) return False; return True; @@ -538,7 +538,7 @@ void init_r_enum_trust_dom(TALLOC_CTX *ctx, LSA_R_ENUM_TRUST_DOM *r_e, uint32 en r_e->enum_context = enum_context; - if (status == 0) { + if (NT_STATUS_IS_OK(status)) { int len_domain_name = strlen(domain_name) + 1; r_e->num_domains = 1; @@ -619,7 +619,7 @@ BOOL lsa_io_r_enum_trust_dom(char *desc, LSA_R_ENUM_TRUST_DOM *r_e, } } - if(!prs_uint32("status", ps, depth, &r_e->status)) + if(!prs_ntstatus("status", ps, depth, &r_e->status)) return False; return True; @@ -789,7 +789,7 @@ BOOL lsa_io_r_query(char *desc, LSA_R_QUERY_INFO *r_q, prs_struct *ps, if(!prs_align(ps)) return False; - if(!prs_uint32("status", ps, depth, &r_q->status)) + if(!prs_ntstatus("status", ps, depth, &r_q->status)) return False; return True; @@ -1031,7 +1031,7 @@ BOOL lsa_io_r_lookup_sids(char *desc, LSA_R_LOOKUP_SIDS *r_s, if(!prs_uint32("mapped_count", ps, depth, &r_s->mapped_count)) return False; - if(!prs_uint32("status ", ps, depth, &r_s->status)) + if(!prs_ntstatus("status ", ps, depth, &r_s->status)) return False; return True; @@ -1192,7 +1192,7 @@ BOOL lsa_io_r_lookup_names(char *desc, LSA_R_LOOKUP_NAMES *r_r, if(!prs_uint32("mapped_count", ps, depth, &r_r->mapped_count)) return False; - if(!prs_uint32("status ", ps, depth, &r_r->status)) + if(!prs_ntstatus("status ", ps, depth, &r_r->status)) return False; return True; @@ -1237,7 +1237,7 @@ BOOL lsa_io_r_close(char *desc, LSA_R_CLOSE *r_c, prs_struct *ps, int depth) if(!smb_io_pol_hnd("", &r_c->pol, ps, depth)) return False; - if(!prs_uint32("status", ps, depth, &r_c->status)) + if(!prs_ntstatus("status", ps, depth, &r_c->status)) return False; return True; @@ -1276,7 +1276,7 @@ BOOL lsa_io_r_open_secret(char *desc, LSA_R_OPEN_SECRET *r_c, prs_struct *ps, in return False; if(!prs_uint32("dummy4", ps, depth, &r_c->dummy4)) return False; - if(!prs_uint32("status", ps, depth, &r_c->status)) + if(!prs_ntstatus("status", ps, depth, &r_c->status)) return False; return True; @@ -1391,7 +1391,7 @@ BOOL lsa_io_r_enum_privs(char *desc, LSA_R_ENUM_PRIVS *r_q, prs_struct *ps, int if(!prs_align(ps)) return False; - if(!prs_uint32("status", ps, depth, &r_q->status)) + if(!prs_ntstatus("status", ps, depth, &r_q->status)) return False; return True; @@ -1461,7 +1461,7 @@ BOOL lsa_io_r_priv_get_dispname(char *desc, LSA_R_PRIV_GET_DISPNAME *r_q, prs_st if(!prs_align(ps)) return False; - if(!prs_uint32("status", ps, depth, &r_q->status)) + if(!prs_ntstatus("status", ps, depth, &r_q->status)) return False; return True; @@ -1532,7 +1532,7 @@ BOOL lsa_io_r_enum_accounts(char *desc, LSA_R_ENUM_ACCOUNTS *r_q, prs_struct *ps if (!prs_align(ps)) return False; - if(!prs_uint32("status", ps, depth, &r_q->status)) + if(!prs_ntstatus("status", ps, depth, &r_q->status)) return False; return True; @@ -1603,7 +1603,7 @@ BOOL lsa_io_r_unk_get_connuser(char *desc, LSA_R_UNK_GET_CONNUSER *r_c, prs_stru if (!prs_align(ps)) return False; - if(!prs_uint32("status", ps, depth, &r_c->status)) + if(!prs_ntstatus("status", ps, depth, &r_c->status)) return False; return True; @@ -1648,7 +1648,7 @@ BOOL lsa_io_r_open_account(char *desc, LSA_R_OPENACCOUNT *r_c, prs_struct *ps, if(!smb_io_pol_hnd("pol", &r_c->pol, ps, depth)) return False; - if(!prs_uint32("status", ps, depth, &r_c->status)) + if(!prs_ntstatus("status", ps, depth, &r_c->status)) return False; return True; @@ -1776,7 +1776,7 @@ BOOL lsa_io_r_enum_privsaccount(char *desc, LSA_R_ENUMPRIVSACCOUNT *r_c, prs_str return False; } - if(!prs_uint32("status", ps, depth, &r_c->status)) + if(!prs_ntstatus("status", ps, depth, &r_c->status)) return False; return True; @@ -1817,7 +1817,7 @@ BOOL lsa_io_r_getsystemaccount(char *desc, LSA_R_GETSYSTEMACCOUNT *r_c, prs_str if(!prs_uint32("access", ps, depth, &r_c->access)) return False; - if(!prs_uint32("status", ps, depth, &r_c->status)) + if(!prs_ntstatus("status", ps, depth, &r_c->status)) return False; return True; diff --git a/source3/rpc_parse/parse_net.c b/source3/rpc_parse/parse_net.c index 7f777c9434..bb8b2608b3 100644 --- a/source3/rpc_parse/parse_net.c +++ b/source3/rpc_parse/parse_net.c @@ -249,18 +249,18 @@ void init_net_r_logon_ctrl2(NET_R_LOGON_CTRL2 *r_l, uint32 query_level, case 1: r_l->ptr = 1; /* undocumented pointer */ init_netinfo_1(&r_l->logon.info1, flags, pdc_status); - r_l->status = 0; + r_l->status = NT_STATUS_OK; break; case 2: r_l->ptr = 1; /* undocumented pointer */ init_netinfo_2(&r_l->logon.info2, flags, pdc_status, tc_status, trusted_domain_name); - r_l->status = 0; + r_l->status = NT_STATUS_OK; break; case 3: r_l->ptr = 1; /* undocumented pointer */ init_netinfo_3(&(r_l->logon.info3), flags, logon_attempts); - r_l->status = 0; + r_l->status = NT_STATUS_OK; break; default: DEBUG(2,("init_r_logon_ctrl2: unsupported switch value %d\n", @@ -311,7 +311,7 @@ BOOL net_io_r_logon_ctrl2(char *desc, NET_R_LOGON_CTRL2 *r_l, prs_struct *ps, in } } - if(!prs_uint32("status ", ps, depth, &r_l->status)) + if(!prs_ntstatus("status ", ps, depth, &r_l->status)) return False; return True; @@ -377,7 +377,7 @@ void init_net_r_logon_ctrl(NET_R_LOGON_CTRL *r_l, uint32 query_level, case 1: r_l->ptr = 1; /* undocumented pointer */ init_netinfo_1(&r_l->logon.info1, flags, pdc_status); - r_l->status = 0; + r_l->status = NT_STATUS_OK; break; default: DEBUG(2,("init_r_logon_ctrl: unsupported switch value %d\n", @@ -418,7 +418,7 @@ BOOL net_io_r_logon_ctrl(char *desc, NET_R_LOGON_CTRL *r_l, prs_struct *ps, } } - if(!prs_uint32("status ", ps, depth, &r_l->status)) + if(!prs_ntstatus("status ", ps, depth, &r_l->status)) return False; return True; @@ -451,7 +451,7 @@ void init_r_trust_dom(NET_R_TRUST_DOM_LIST *r_t, r_t->uni_trust_dom_name[i].undoc = 0x1; } - r_t->status = 0; + r_t->status = NT_STATUS_OK; } /******************************************************************* @@ -499,7 +499,7 @@ BOOL net_io_r_trust_dom(char *desc, NET_R_TRUST_DOM_LIST *r_t, prs_struct *ps, i return False; } - if(!prs_uint32("status", ps, depth, &r_t->status)) + if(!prs_ntstatus("status", ps, depth, &r_t->status)) return False; #endif return True; @@ -602,7 +602,7 @@ BOOL net_io_r_req_chal(char *desc, NET_R_REQ_CHAL *r_c, prs_struct *ps, int dept if(!smb_io_chal("", &r_c->srv_chal, ps, depth)) /* server challenge */ return False; - if(!prs_uint32("status", ps, depth, &r_c->status)) + if(!prs_ntstatus("status", ps, depth, &r_c->status)) return False; return True; @@ -658,7 +658,7 @@ BOOL net_io_r_auth(char *desc, NET_R_AUTH *r_a, prs_struct *ps, int depth) if(!smb_io_chal("", &r_a->srv_chal, ps, depth)) /* server challenge */ return False; - if(!prs_uint32("status", ps, depth, &r_a->status)) + if(!prs_ntstatus("status", ps, depth, &r_a->status)) return False; return True; @@ -734,7 +734,7 @@ BOOL net_io_r_auth_2(char *desc, NET_R_AUTH_2 *r_a, prs_struct *ps, int depth) if(!net_io_neg_flags("", &r_a->srv_flgs, ps, depth)) return False; - if(!prs_uint32("status", ps, depth, &r_a->status)) + if(!prs_ntstatus("status", ps, depth, &r_a->status)) return False; return True; @@ -796,7 +796,7 @@ BOOL net_io_r_srv_pwset(char *desc, NET_R_SRV_PWSET *r_s, prs_struct *ps, int de if(!smb_io_cred("", &r_s->srv_cred, ps, depth)) /* server challenge */ return False; - if(!prs_uint32("status", ps, depth, &r_s->status)) + if(!prs_ntstatus("status", ps, depth, &r_s->status)) return False; return True; @@ -1534,7 +1534,7 @@ BOOL net_io_r_sam_logon(char *desc, NET_R_SAM_LOGON *r_l, prs_struct *ps, int de if(!prs_uint32("auth_resp ", ps, depth, &r_l->auth_resp)) /* 1 - Authoritative response; 0 - Non-Auth? */ return False; - if(!prs_uint32("status ", ps, depth, &r_l->status)) + if(!prs_ntstatus("status ", ps, depth, &r_l->status)) return False; if(!prs_align(ps)) @@ -1584,7 +1584,7 @@ BOOL net_io_r_sam_logoff(char *desc, NET_R_SAM_LOGOFF *r_l, prs_struct *ps, int if(!smb_io_cred("", &r_l->srv_creds, ps, depth)) /* server credentials. server time stamp appears to be ignored. */ return False; - if(!prs_uint32("status ", ps, depth, &r_l->status)) + if(!prs_ntstatus("status ", ps, depth, &r_l->status)) return False; return True; diff --git a/source3/rpc_parse/parse_prs.c b/source3/rpc_parse/parse_prs.c index 6bab18ba9d..11fa46069a 100644 --- a/source3/rpc_parse/parse_prs.c +++ b/source3/rpc_parse/parse_prs.c @@ -551,6 +551,67 @@ BOOL prs_uint32(char *name, prs_struct *ps, int depth, uint32 *data32) return True; } +/******************************************************************* + Stream a NTSTATUS + ********************************************************************/ + +BOOL prs_ntstatus(char *name, prs_struct *ps, int depth, NTSTATUS *status) +{ + char *q = prs_mem_get(ps, sizeof(uint32)); + if (q == NULL) + return False; + + if (UNMARSHALLING(ps)) { + if (ps->bigendian_data) + *status = NT_STATUS(RIVAL(q,0)); + else + *status = NT_STATUS(IVAL(q,0)); + } else { + if (ps->bigendian_data) + RSIVAL(q,0,NT_STATUS_V(*status)); + else + SIVAL(q,0,NT_STATUS_V(*status)); + } + + DEBUG(5,("%s%04x %s: %s\n", tab_depth(depth), ps->data_offset, name, + get_nt_error_msg(*status))); + + ps->data_offset += sizeof(uint32); + + return True; +} + +/******************************************************************* + Stream a WERROR + ********************************************************************/ + +BOOL prs_werror(char *name, prs_struct *ps, int depth, WERROR *status) +{ + char *q = prs_mem_get(ps, sizeof(uint32)); + if (q == NULL) + return False; + + if (UNMARSHALLING(ps)) { + if (ps->bigendian_data) + *status = W_ERROR(RIVAL(q,0)); + else + *status = W_ERROR(IVAL(q,0)); + } else { + if (ps->bigendian_data) + RSIVAL(q,0,W_ERROR_V(*status)); + else + SIVAL(q,0,W_ERROR_V(*status)); + } + + DEBUG(5,("%s%04x %s: %s\n", tab_depth(depth), ps->data_offset, name, + werror_str(*status))); + + ps->data_offset += sizeof(uint32); + + return True; +} + + /****************************************************************** Stream an array of uint8s. Length is number of uint8s. ********************************************************************/ diff --git a/source3/rpc_parse/parse_reg.c b/source3/rpc_parse/parse_reg.c index 3a6f7ba819..e7c1b8ecfe 100644 --- a/source3/rpc_parse/parse_reg.c +++ b/source3/rpc_parse/parse_reg.c @@ -91,7 +91,7 @@ BOOL reg_io_r_open_hkcr(char *desc, REG_R_OPEN_HKCR *r_r, prs_struct *ps, int d if(!smb_io_pol_hnd("", &r_r->pol, ps, depth)) return False; - if(!prs_uint32("status", ps, depth, &r_r->status)) + if(!prs_ntstatus("status", ps, depth, &r_r->status)) return False; return True; @@ -160,7 +160,7 @@ BOOL reg_io_r_open_hklm(char *desc, REG_R_OPEN_HKLM * r_r, prs_struct *ps, if (!smb_io_pol_hnd("", &(r_r->pol), ps, depth)) return False; - if (!prs_uint32("status", ps, depth, &(r_r->status))) + if (!prs_ntstatus("status", ps, depth, &(r_r->status))) return False; return True; @@ -212,7 +212,7 @@ BOOL reg_io_r_flush_key(char *desc, REG_R_FLUSH_KEY *r_r, prs_struct *ps, int d if(!prs_align(ps)) return False; - if(!prs_uint32("status", ps, depth, &r_r->status)) + if(!prs_ntstatus("status", ps, depth, &r_r->status)) return False; return True; @@ -365,7 +365,7 @@ BOOL reg_io_r_create_key(char *desc, REG_R_CREATE_KEY *r_r, prs_struct *ps, int if(!prs_uint32("unknown", ps, depth, &r_r->unknown)) return False; - if(!prs_uint32("status", ps, depth, &r_r->status)) + if(!prs_ntstatus("status", ps, depth, &r_r->status)) return False; return True; @@ -432,7 +432,7 @@ BOOL reg_io_r_delete_val(char *desc, REG_R_DELETE_VALUE *r_r, prs_struct *ps, i if(!prs_align(ps)) return False; - if(!prs_uint32("status", ps, depth, &r_r->status)) + if(!prs_ntstatus("status", ps, depth, &r_r->status)) return False; return True; @@ -497,7 +497,7 @@ BOOL reg_io_r_delete_key(char *desc, REG_R_DELETE_KEY *r_r, prs_struct *ps, int if(!prs_align(ps)) return False; - if(!prs_uint32("status", ps, depth, &r_r->status)) + if(!prs_ntstatus("status", ps, depth, &r_r->status)) return False; return True; @@ -586,7 +586,7 @@ BOOL reg_io_r_query_key(char *desc, REG_R_QUERY_KEY *r_r, prs_struct *ps, int d if(!smb_io_time("mod_time ", &r_r->mod_time, ps, depth)) return False; - if(!prs_uint32("status", ps, depth, &r_r->status)) + if(!prs_ntstatus("status", ps, depth, &r_r->status)) return False; return True; @@ -639,7 +639,7 @@ BOOL reg_io_r_unk_1a(char *desc, REG_R_UNK_1A *r_r, prs_struct *ps, int depth) if(!prs_uint32("unknown", ps, depth, &r_r->unknown)) return False; - if(!prs_uint32("status" , ps, depth, &r_r->status)) + if(!prs_ntstatus("status" , ps, depth, &r_r->status)) return False; return True; @@ -705,7 +705,7 @@ BOOL reg_io_r_open_hku(char *desc, REG_R_OPEN_HKU *r_r, prs_struct *ps, int dep if(!smb_io_pol_hnd("", &r_r->pol, ps, depth)) return False; - if(!prs_uint32("status", ps, depth, &r_r->status)) + if(!prs_ntstatus("status", ps, depth, &r_r->status)) return False; return True; @@ -765,7 +765,7 @@ BOOL reg_io_r_close(char *desc, REG_R_CLOSE *r_u, prs_struct *ps, int depth) if(!prs_align(ps)) return False; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_ntstatus("status", ps, depth, &r_u->status)) return False; return True; @@ -830,7 +830,7 @@ BOOL reg_io_r_set_key_sec(char *desc, REG_R_SET_KEY_SEC *r_q, prs_struct *ps, in if(!prs_align(ps)) return False; - if(!prs_uint32("status", ps, depth, &r_q->status)) + if(!prs_ntstatus("status", ps, depth, &r_q->status)) return False; return True; @@ -928,7 +928,7 @@ BOOL reg_io_r_get_key_sec(char *desc, REG_R_GET_KEY_SEC *r_q, prs_struct *ps, i return False; } - if(!prs_uint32("status", ps, depth, &r_q->status)) + if(!prs_ntstatus("status", ps, depth, &r_q->status)) return False; return True; @@ -1103,7 +1103,7 @@ BOOL reg_io_r_info(char *desc, REG_R_INFO *r_r, prs_struct *ps, int depth) return False; } - if(!prs_uint32("status", ps, depth, &r_r->status)) + if(!prs_ntstatus("status", ps, depth, &r_r->status)) return False; return True; @@ -1247,7 +1247,7 @@ BOOL reg_io_r_enum_val(char *desc, REG_R_ENUM_VALUE *r_q, prs_struct *ps, int d return False; } - if(!prs_uint32("status", ps, depth, &r_q->status)) + if(!prs_ntstatus("status", ps, depth, &r_q->status)) return False; return True; @@ -1324,7 +1324,7 @@ BOOL reg_io_r_create_val(char *desc, REG_R_CREATE_VALUE *r_q, prs_struct *ps, i if(!prs_align(ps)) return False; - if(!prs_uint32("status", ps, depth, &r_q->status)) + if(!prs_ntstatus("status", ps, depth, &r_q->status)) return False; return True; @@ -1457,7 +1457,7 @@ BOOL reg_io_r_enum_key(char *desc, REG_R_ENUM_KEY *r_q, prs_struct *ps, int dep return False; } - if(!prs_uint32("status", ps, depth, &r_q->status)) + if(!prs_ntstatus("status", ps, depth, &r_q->status)) return False; return True; @@ -1543,7 +1543,7 @@ BOOL reg_io_r_open_entry(char *desc, REG_R_OPEN_ENTRY *r_r, prs_struct *ps, int if(!smb_io_pol_hnd("", &r_r->pol, ps, depth)) return False; - if(!prs_uint32("status", ps, depth, &r_r->status)) + if(!prs_ntstatus("status", ps, depth, &r_r->status)) return False; return True; @@ -1622,7 +1622,7 @@ BOOL reg_io_r_shutdown(char *desc, REG_R_SHUTDOWN * r_s, prs_struct *ps, if(!prs_align(ps)) return False; - if(!prs_uint32("status", ps, depth, &(r_s->status))) + if(!prs_ntstatus("status", ps, depth, &(r_s->status))) return False; return True; @@ -1677,7 +1677,7 @@ BOOL reg_io_r_abort_shutdown(char *desc, REG_R_ABORT_SHUTDOWN * r_s, if (!prs_align(ps)) return False; - if (!prs_uint32("status", ps, depth, &(r_s->status))) + if (!prs_ntstatus("status", ps, depth, &(r_s->status))) return False; return True; diff --git a/source3/rpc_parse/parse_rpc.c b/source3/rpc_parse/parse_rpc.c index a60bad0aa2..e457b48bf9 100644 --- a/source3/rpc_parse/parse_rpc.c +++ b/source3/rpc_parse/parse_rpc.c @@ -520,7 +520,7 @@ BOOL smb_io_rpc_hdr_fault(char *desc, RPC_HDR_FAULT *rpc, prs_struct *ps, int de prs_debug(ps, depth, desc, "smb_io_rpc_hdr_fault"); depth++; - if(!prs_uint32("status ", ps, depth, &rpc->status)) + if(!prs_ntstatus("status ", ps, depth, &rpc->status)) return False; if(!prs_uint32("reserved", ps, depth, &rpc->reserved)) return False; diff --git a/source3/rpc_parse/parse_samr.c b/source3/rpc_parse/parse_samr.c index f39104fed0..82902e5149 100644 --- a/source3/rpc_parse/parse_samr.c +++ b/source3/rpc_parse/parse_samr.c @@ -78,7 +78,7 @@ BOOL samr_io_r_close_hnd(char *desc, SAMR_R_CLOSE_HND * r_u, if(!smb_io_pol_hnd("pol", &r_u->pol, ps, depth)) return False; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_ntstatus("status", ps, depth, &r_u->status)) return False; return True; @@ -139,7 +139,7 @@ void init_samr_r_lookup_domain(SAMR_R_LOOKUP_DOMAIN * r_u, r_u->status = status; r_u->ptr_sid = 0; - if (status == 0x0) { + if (NT_STATUS_IS_OK(status)) { r_u->ptr_sid = 1; init_dom_sid2(&r_u->dom_sid, dom_sid); } @@ -171,7 +171,7 @@ BOOL samr_io_r_lookup_domain(char *desc, SAMR_R_LOOKUP_DOMAIN * r_u, return False; } - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_ntstatus("status", ps, depth, &r_u->status)) return False; return True; @@ -233,7 +233,7 @@ BOOL samr_io_r_unknown_2d(char *desc, SAMR_R_UNKNOWN_2D * r_u, if(!prs_align(ps)) return False; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_ntstatus("status", ps, depth, &r_u->status)) return False; return True; @@ -301,7 +301,7 @@ BOOL samr_io_r_open_domain(char *desc, SAMR_R_OPEN_DOMAIN * r_u, if(!smb_io_pol_hnd("domain_pol", &r_u->domain_pol, ps, depth)) return False; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_ntstatus("status", ps, depth, &r_u->status)) return False; return True; @@ -375,7 +375,7 @@ BOOL samr_io_r_get_usrdom_pwinfo(char *desc, SAMR_R_GET_USRDOM_PWINFO * r_u, return False; if(!prs_uint32("unknown_2", ps, depth, &r_u->unknown_2)) return False; - if(!prs_uint32("status ", ps, depth, &r_u->status)) + if(!prs_ntstatus("status ", ps, depth, &r_u->status)) return False; return True; @@ -770,7 +770,7 @@ void init_samr_r_query_dom_info(SAMR_R_QUERY_DOMAIN_INFO * r_u, r_u->switch_value = 0; r_u->status = status; /* return status */ - if (status == 0) { + if (NT_STATUS_IS_OK(status)) { r_u->switch_value = switch_value; r_u->ptr_0 = 1; r_u->ctr = ctr; @@ -842,7 +842,7 @@ BOOL samr_io_r_query_dom_info(char *desc, SAMR_R_QUERY_DOMAIN_INFO * r_u, if(!prs_align(ps)) return False; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_ntstatus("status", ps, depth, &r_u->status)) return False; return True; @@ -871,7 +871,7 @@ BOOL samr_io_r_query_sec_obj(char *desc, SAMR_R_QUERY_SEC_OBJ * r_u, return False; } - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_ntstatus("status", ps, depth, &r_u->status)) return False; return True; @@ -1361,7 +1361,7 @@ BOOL samr_io_r_enum_dom_users(char *desc, SAMR_R_ENUM_DOM_USERS * r_u, if(!prs_uint32("num_entries4", ps, depth, &r_u->num_entries4)) return False; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_ntstatus("status", ps, depth, &r_u->status)) return False; return True; @@ -2006,7 +2006,7 @@ BOOL samr_io_r_query_dispinfo(char *desc, SAMR_R_QUERY_DISPINFO * r_u, if (r_u->ptr_entries==0) { if(!prs_align(ps)) return False; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_ntstatus("status", ps, depth, &r_u->status)) return False; return True; @@ -2050,7 +2050,7 @@ BOOL samr_io_r_query_dispinfo(char *desc, SAMR_R_QUERY_DISPINFO * r_u, if(!prs_align(ps)) return False; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_ntstatus("status", ps, depth, &r_u->status)) return False; return True; @@ -2117,7 +2117,7 @@ BOOL samr_io_r_open_group(char *desc, SAMR_R_OPEN_GROUP * r_u, if(!smb_io_pol_hnd("pol", &r_u->pol, ps, depth)) return False; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_ntstatus("status", ps, depth, &r_u->status)) return False; return True; @@ -2338,7 +2338,7 @@ BOOL samr_io_r_create_dom_group(char *desc, SAMR_R_CREATE_DOM_GROUP * r_u, if(!prs_uint32("rid ", ps, depth, &r_u->rid)) return False; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_ntstatus("status", ps, depth, &r_u->status)) return False; return True; @@ -2394,7 +2394,7 @@ BOOL samr_io_r_delete_dom_group(char *desc, SAMR_R_DELETE_DOM_GROUP * r_u, if(!prs_align(ps)) return False; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_ntstatus("status", ps, depth, &r_u->status)) return False; return True; @@ -2466,7 +2466,7 @@ BOOL samr_io_r_del_groupmem(char *desc, SAMR_R_DEL_GROUPMEM * r_u, if(!prs_align(ps)) return False; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_ntstatus("status", ps, depth, &r_u->status)) return False; return True; @@ -2541,7 +2541,7 @@ BOOL samr_io_r_add_groupmem(char *desc, SAMR_R_ADD_GROUPMEM * r_u, if(!prs_align(ps)) return False; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_ntstatus("status", ps, depth, &r_u->status)) return False; return True; @@ -2612,7 +2612,7 @@ BOOL samr_io_r_set_groupinfo(char *desc, SAMR_R_SET_GROUPINFO * r_u, if(!prs_align(ps)) return False; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_ntstatus("status", ps, depth, &r_u->status)) return False; return True; @@ -2666,7 +2666,7 @@ void init_samr_r_query_groupinfo(SAMR_R_QUERY_GROUPINFO * r_u, { DEBUG(5, ("init_samr_r_query_groupinfo\n")); - r_u->ptr = (status == 0x0 && ctr != NULL) ? 1 : 0; + r_u->ptr = (NT_STATUS_IS_OK(status) && ctr != NULL) ? 1 : 0; r_u->ctr = ctr; r_u->status = status; } @@ -2697,7 +2697,7 @@ BOOL samr_io_r_query_groupinfo(char *desc, SAMR_R_QUERY_GROUPINFO * r_u, if(!prs_align(ps)) return False; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_ntstatus("status", ps, depth, &r_u->status)) return False; return True; @@ -2746,7 +2746,7 @@ void init_samr_r_query_groupmem(SAMR_R_QUERY_GROUPMEM * r_u, { DEBUG(5, ("init_samr_r_query_groupmem\n")); - if (status == 0x0) { + if (NT_STATUS_IS_OK(status)) { r_u->ptr = 1; r_u->num_entries = num_entries; @@ -2830,7 +2830,7 @@ BOOL samr_io_r_query_groupmem(char *desc, SAMR_R_QUERY_GROUPMEM * r_u, } } - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_ntstatus("status", ps, depth, &r_u->status)) return False; return True; @@ -2880,7 +2880,7 @@ void init_samr_r_query_usergroups(SAMR_R_QUERY_USERGROUPS * r_u, { DEBUG(5, ("init_samr_r_query_usergroups\n")); - if (status == 0) { + if (NT_STATUS_IS_OK(status)) { r_u->ptr_0 = 1; r_u->num_entries = num_gids; r_u->ptr_1 = (num_gids != 0) ? 1 : 0; @@ -2968,7 +2968,7 @@ BOOL samr_io_r_query_usergroups(char *desc, SAMR_R_QUERY_USERGROUPS * r_u, if(!prs_align(ps)) return False; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_ntstatus("status", ps, depth, &r_u->status)) return False; return True; @@ -3107,7 +3107,7 @@ BOOL samr_io_r_enum_domains(char *desc, SAMR_R_ENUM_DOMAINS * r_u, return False; if(!prs_uint32("num_entries4", ps, depth, &r_u->num_entries4)) return False; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_ntstatus("status", ps, depth, &r_u->status)) return False; return True; @@ -3241,7 +3241,7 @@ BOOL samr_io_r_enum_dom_groups(char *desc, SAMR_R_ENUM_DOM_GROUPS * r_u, return False; if(!prs_uint32("num_entries4", ps, depth, &r_u->num_entries4)) return False; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_ntstatus("status", ps, depth, &r_u->status)) return False; return True; @@ -3376,7 +3376,7 @@ BOOL samr_io_r_enum_dom_aliases(char *desc, SAMR_R_ENUM_DOM_ALIASES * r_u, return False; if(!prs_uint32("num_entries4", ps, depth, &r_u->num_entries4)) return False; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_ntstatus("status", ps, depth, &r_u->status)) return False; return True; @@ -3499,7 +3499,7 @@ void init_samr_r_query_aliasinfo(SAMR_R_QUERY_ALIASINFO * r_u, { DEBUG(5, ("init_samr_r_query_aliasinfo\n")); - r_u->ptr = (status == 0x0 && ctr != NULL) ? 1 : 0; + r_u->ptr = (NT_STATUS_IS_OK(status) && ctr != NULL) ? 1 : 0; r_u->ctr = *ctr; r_u->status = status; } @@ -3530,7 +3530,7 @@ BOOL samr_io_r_query_aliasinfo(char *desc, SAMR_R_QUERY_ALIASINFO * r_u, if(!prs_align(ps)) return False; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_ntstatus("status", ps, depth, &r_u->status)) return False; return True; @@ -3588,7 +3588,7 @@ BOOL samr_io_r_set_aliasinfo(char *desc, SAMR_R_SET_ALIASINFO * r_u, if(!prs_align(ps)) return False; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_ntstatus("status", ps, depth, &r_u->status)) return False; return True; @@ -3685,7 +3685,7 @@ void init_samr_r_query_useraliases(SAMR_R_QUERY_USERALIASES * r_u, { DEBUG(5, ("init_samr_r_query_useraliases\n")); - if (status == 0x0) { + if (NT_STATUS_IS_OK(status)) { r_u->num_entries = num_rids; r_u->ptr = 1; r_u->num_entries2 = num_rids; @@ -3767,7 +3767,7 @@ BOOL samr_io_r_query_useraliases(char *desc, SAMR_R_QUERY_USERALIASES * r_u, if(!prs_align(ps)) return False; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_ntstatus("status", ps, depth, &r_u->status)) return False; return True; @@ -3833,7 +3833,7 @@ BOOL samr_io_r_open_alias(char *desc, SAMR_R_OPEN_ALIAS * r_u, if(!smb_io_pol_hnd("pol", &r_u->pol, ps, depth)) return False; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_ntstatus("status", ps, depth, &r_u->status)) return False; return True; @@ -4027,7 +4027,7 @@ BOOL samr_io_r_lookup_rids(char *desc, SAMR_R_LOOKUP_RIDS * r_u, } } - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_ntstatus("status", ps, depth, &r_u->status)) return False; return True; @@ -4084,7 +4084,7 @@ BOOL samr_io_r_delete_alias(char *desc, SAMR_R_DELETE_DOM_ALIAS * r_u, if(!smb_io_pol_hnd("pol", &r_u->pol, ps, depth)) return False; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_ntstatus("status", ps, depth, &r_u->status)) return False; return True; @@ -4164,7 +4164,7 @@ BOOL samr_io_r_create_dom_alias(char *desc, SAMR_R_CREATE_DOM_ALIAS * r_u, if(!prs_uint32("rid", ps, depth, &r_u->rid)) return False; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_ntstatus("status", ps, depth, &r_u->status)) return False; return True; @@ -4223,7 +4223,7 @@ BOOL samr_io_r_add_aliasmem(char *desc, SAMR_R_ADD_ALIASMEM * r_u, if(!prs_align(ps)) return False; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_ntstatus("status", ps, depth, &r_u->status)) return False; return True; @@ -4282,7 +4282,7 @@ BOOL samr_io_r_del_aliasmem(char *desc, SAMR_R_DEL_ALIASMEM * r_u, if(!prs_align(ps)) return False; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_ntstatus("status", ps, depth, &r_u->status)) return False; return True; @@ -4350,7 +4350,7 @@ BOOL samr_io_r_delete_dom_alias(char *desc, SAMR_R_DELETE_DOM_ALIAS * r_u, if(!prs_align(ps)) return False; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_ntstatus("status", ps, depth, &r_u->status)) return False; return True; @@ -4400,7 +4400,7 @@ void init_samr_r_query_aliasmem(SAMR_R_QUERY_ALIASMEM * r_u, { DEBUG(5, ("init_samr_r_query_aliasmem\n")); - if (status == 0) { + if (NT_STATUS_IS_OK(status)) { r_u->num_sids = num_sids; r_u->ptr = (num_sids != 0) ? 1 : 0; r_u->num_sids1 = num_sids; @@ -4462,7 +4462,7 @@ BOOL samr_io_r_query_aliasmem(char *desc, SAMR_R_QUERY_ALIASMEM * r_u, if(!prs_align(ps)) return False; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_ntstatus("status", ps, depth, &r_u->status)) return False; return True; @@ -4568,7 +4568,7 @@ NTSTATUS init_samr_r_lookup_names(TALLOC_CTX *ctx, SAMR_R_LOOKUP_NAMES * r_u, { DEBUG(5, ("init_samr_r_lookup_names\n")); - if ((status == 0) && (num_rids != 0)) { + if (NT_STATUS_IS_OK(status) && (num_rids != 0)) { uint32 i; r_u->num_types1 = num_rids; @@ -4691,7 +4691,7 @@ BOOL samr_io_r_lookup_names(char *desc, SAMR_R_LOOKUP_NAMES * r_u, } } - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_ntstatus("status", ps, depth, &r_u->status)) return False; return True; @@ -4747,7 +4747,7 @@ BOOL samr_io_r_delete_dom_user(char *desc, SAMR_R_DELETE_DOM_USER * r_u, if(!prs_align(ps)) return False; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_ntstatus("status", ps, depth, &r_u->status)) return False; return True; @@ -4814,7 +4814,7 @@ BOOL samr_io_r_open_user(char *desc, SAMR_R_OPEN_USER * r_u, if(!smb_io_pol_hnd("user_pol", &r_u->user_pol, ps, depth)) return False; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_ntstatus("status", ps, depth, &r_u->status)) return False; return True; @@ -4901,7 +4901,7 @@ BOOL samr_io_r_create_user(char *desc, SAMR_R_CREATE_USER * r_u, return False; if(!prs_uint32("user_rid ", ps, depth, &r_u->user_rid)) return False; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_ntstatus("status", ps, depth, &r_u->status)) return False; return True; @@ -6237,7 +6237,7 @@ void init_samr_r_query_userinfo(SAMR_R_QUERY_USERINFO * r_u, r_u->ptr = 0; r_u->ctr = NULL; - if (status == 0) { + if (NT_STATUS_IS_OK(status)) { r_u->ptr = 1; r_u->ctr = ctr; } @@ -6271,7 +6271,7 @@ BOOL samr_io_r_query_userinfo(char *desc, SAMR_R_QUERY_USERINFO * r_u, if(!prs_align(ps)) return False; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_ntstatus("status", ps, depth, &r_u->status)) return False; return True; @@ -6345,7 +6345,7 @@ BOOL samr_io_r_set_userinfo(char *desc, SAMR_R_SET_USERINFO * r_u, if(!prs_align(ps)) return False; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_ntstatus("status", ps, depth, &r_u->status)) return False; return True; @@ -6433,7 +6433,7 @@ BOOL samr_io_r_set_userinfo2(char *desc, SAMR_R_SET_USERINFO2 * r_u, if(!prs_align(ps)) return False; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_ntstatus("status", ps, depth, &r_u->status)) return False; return True; @@ -6506,7 +6506,7 @@ BOOL samr_io_r_connect(char *desc, SAMR_R_CONNECT * r_u, if(!smb_io_pol_hnd("connect_pol", &r_u->connect_pol, ps, depth)) return False; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_ntstatus("status", ps, depth, &r_u->status)) return False; return True; @@ -6573,7 +6573,7 @@ BOOL samr_io_r_connect_anon(char *desc, SAMR_R_CONNECT_ANON * r_u, if(!smb_io_pol_hnd("connect_pol", &r_u->connect_pol, ps, depth)) return False; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_ntstatus("status", ps, depth, &r_u->status)) return False; return True; @@ -6652,7 +6652,7 @@ BOOL samr_io_r_get_dom_pwinfo(char *desc, SAMR_R_GET_DOM_PWINFO * r_u, if(!prs_align(ps)) return False; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_ntstatus("status", ps, depth, &r_u->status)) return False; return True; @@ -6848,7 +6848,7 @@ BOOL samr_io_r_chgpasswd_user(char *desc, SAMR_R_CHGPASSWD_USER * r_u, if(!prs_align(ps)) return False; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_ntstatus("status", ps, depth, &r_u->status)) return False; return True; diff --git a/source3/rpc_parse/parse_spoolss.c b/source3/rpc_parse/parse_spoolss.c index dd2c4a541a..027f8ceaa3 100644 --- a/source3/rpc_parse/parse_spoolss.c +++ b/source3/rpc_parse/parse_spoolss.c @@ -952,7 +952,7 @@ BOOL spoolss_io_r_open_printer_ex(char *desc, SPOOL_R_OPEN_PRINTER_EX *r_u, prs_ if (!smb_io_pol_hnd("printer handle",&(r_u->handle),ps,depth)) return False; - if (!prs_uint32("status code", ps, depth, &(r_u->status))) + if (!prs_werror("status code", ps, depth, &(r_u->status))) return False; return True; @@ -1040,7 +1040,7 @@ BOOL spoolss_io_r_deleteprinterdata(char *desc, SPOOL_R_DELETEPRINTERDATA *r_u, { prs_debug(ps, depth, desc, "spoolss_io_r_deleteprinterdata"); depth++; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_werror("status", ps, depth, &r_u->status)) return False; return True; @@ -1074,7 +1074,7 @@ BOOL spoolss_io_r_getprinterdata(char *desc, SPOOL_R_GETPRINTERDATA *r_u, prs_st if (!prs_uint32("needed", ps, depth, &r_u->needed)) return False; - if (!prs_uint32("status", ps, depth, &r_u->status)) + if (!prs_werror("status", ps, depth, &r_u->status)) return False; return True; @@ -1126,7 +1126,7 @@ BOOL spoolss_io_r_abortprinter(char *desc, SPOOL_R_ABORTPRINTER *r_u, prs_struct { prs_debug(ps, depth, desc, "spoolss_io_r_abortprinter"); depth++; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_werror("status", ps, depth, &r_u->status)) return False; return True; @@ -1170,7 +1170,7 @@ BOOL spoolss_io_r_deleteprinter(char *desc, SPOOL_R_DELETEPRINTER *r_u, prs_stru if (!smb_io_pol_hnd("printer handle",&r_u->handle,ps,depth)) return False; - if (!prs_uint32("status", ps, depth, &r_u->status)) + if (!prs_werror("status", ps, depth, &r_u->status)) return False; return True; @@ -1220,7 +1220,7 @@ BOOL spoolss_io_r_deleteprinterdriver(char *desc, SPOOL_R_DELETEPRINTERDRIVER *r if (!prs_align(ps)) return False; - if (!prs_uint32("status", ps, depth, &r_u->status)) + if (!prs_werror("status", ps, depth, &r_u->status)) return False; return True; @@ -1266,7 +1266,7 @@ BOOL spoolss_io_r_closeprinter(char *desc, SPOOL_R_CLOSEPRINTER *r_u, prs_struct if (!smb_io_pol_hnd("printer handle",&r_u->handle,ps,depth)) return False; - if (!prs_uint32("status", ps, depth, &r_u->status)) + if (!prs_werror("status", ps, depth, &r_u->status)) return False; return True; @@ -1307,7 +1307,7 @@ BOOL spoolss_io_r_startdocprinter(char *desc, SPOOL_R_STARTDOCPRINTER *r_u, prs_ depth++; if(!prs_uint32("jobid", ps, depth, &r_u->jobid)) return False; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_werror("status", ps, depth, &r_u->status)) return False; return True; @@ -1343,7 +1343,7 @@ BOOL spoolss_io_r_enddocprinter(char *desc, SPOOL_R_ENDDOCPRINTER *r_u, prs_stru { prs_debug(ps, depth, desc, "spoolss_io_r_enddocprinter"); depth++; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_werror("status", ps, depth, &r_u->status)) return False; return True; @@ -1379,7 +1379,7 @@ BOOL spoolss_io_r_startpageprinter(char *desc, SPOOL_R_STARTPAGEPRINTER *r_u, pr { prs_debug(ps, depth, desc, "spoolss_io_r_startpageprinter"); depth++; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_werror("status", ps, depth, &r_u->status)) return False; return True; @@ -1415,7 +1415,7 @@ BOOL spoolss_io_r_endpageprinter(char *desc, SPOOL_R_ENDPAGEPRINTER *r_u, prs_st { prs_debug(ps, depth, desc, "spoolss_io_r_endpageprinter"); depth++; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_werror("status", ps, depth, &r_u->status)) return False; return True; @@ -1469,7 +1469,7 @@ BOOL spoolss_io_r_writeprinter(char *desc, SPOOL_R_WRITEPRINTER *r_u, prs_struct depth++; if(!prs_uint32("buffer_written", ps, depth, &r_u->buffer_written)) return False; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_werror("status", ps, depth, &r_u->status)) return False; return True; @@ -1531,7 +1531,7 @@ BOOL spoolss_io_r_rffpcnex(char *desc, SPOOL_R_RFFPCNEX *r_u, prs_struct *ps, in prs_debug(ps, depth, desc, "spoolss_io_r_rffpcnex"); depth++; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_werror("status", ps, depth, &r_u->status)) return False; return True; @@ -1593,7 +1593,7 @@ BOOL spoolss_io_r_rfnpcnex(char *desc, SPOOL_R_RFNPCNEX *r_u, prs_struct *ps, in if(!prs_align(ps)) return False; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_werror("status", ps, depth, &r_u->status)) return False; return True; @@ -3329,7 +3329,7 @@ BOOL spoolss_io_r_getprinterdriver2(char *desc, SPOOL_R_GETPRINTERDRIVER2 *r_u, return False; if (!prs_uint32("serverminorversion", ps, depth, &r_u->serverminorversion)) return False; - if (!prs_uint32("status", ps, depth, &r_u->status)) + if (!prs_werror("status", ps, depth, &r_u->status)) return False; return True; @@ -3439,7 +3439,7 @@ BOOL spoolss_io_r_enumprinters(char *desc, SPOOL_R_ENUMPRINTERS *r_u, prs_struct if (!prs_uint32("returned", ps, depth, &r_u->returned)) return False; - if (!prs_uint32("status", ps, depth, &r_u->status)) + if (!prs_werror("status", ps, depth, &r_u->status)) return False; return True; @@ -3468,7 +3468,7 @@ BOOL spoolss_io_r_getprinter(char *desc, SPOOL_R_GETPRINTER *r_u, prs_struct *ps if (!prs_uint32("needed", ps, depth, &r_u->needed)) return False; - if (!prs_uint32("status", ps, depth, &r_u->status)) + if (!prs_werror("status", ps, depth, &r_u->status)) return False; return True; @@ -3608,7 +3608,7 @@ BOOL spoolss_io_r_setprinter(char *desc, SPOOL_R_SETPRINTER *r_u, prs_struct *ps if(!prs_align(ps)) return False; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_werror("status", ps, depth, &r_u->status)) return False; return True; @@ -3685,7 +3685,7 @@ BOOL spoolss_io_r_fcpn(char *desc, SPOOL_R_FCPN *r_u, prs_struct *ps, int depth) if(!prs_align(ps)) return False; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_werror("status", ps, depth, &r_u->status)) return False; return True; @@ -3730,7 +3730,7 @@ BOOL spoolss_io_r_addjob(char *desc, SPOOL_R_ADDJOB *r_u, prs_struct *ps, int de if(!prs_uint32("needed", ps, depth, &r_u->needed)) return False; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_werror("status", ps, depth, &r_u->status)) return False; return True; @@ -3787,7 +3787,7 @@ BOOL spoolss_io_r_enumjobs(char *desc, SPOOL_R_ENUMJOBS *r_u, prs_struct *ps, in if (!prs_uint32("returned", ps, depth, &r_u->returned)) return False; - if (!prs_uint32("status", ps, depth, &r_u->status)) + if (!prs_werror("status", ps, depth, &r_u->status)) return False; return True; @@ -3857,7 +3857,7 @@ BOOL spoolss_io_r_schedulejob(char *desc, SPOOL_R_SCHEDULEJOB *r_u, prs_struct * if(!prs_align(ps)) return False; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_werror("status", ps, depth, &r_u->status)) return False; return True; @@ -3893,7 +3893,7 @@ BOOL spoolss_io_r_setjob(char *desc, SPOOL_R_SETJOB *r_u, prs_struct *ps, int de if(!prs_align(ps)) return False; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_werror("status", ps, depth, &r_u->status)) return False; return True; @@ -3950,7 +3950,7 @@ BOOL spoolss_io_r_enumprinterdrivers(char *desc, SPOOL_R_ENUMPRINTERDRIVERS *r_u if (!prs_uint32("returned", ps, depth, &r_u->returned)) return False; - if (!prs_uint32("status", ps, depth, &r_u->status)) + if (!prs_werror("status", ps, depth, &r_u->status)) return False; return True; @@ -4068,7 +4068,7 @@ BOOL spoolss_io_r_enumforms(char *desc, SPOOL_R_ENUMFORMS *r_u, prs_struct *ps, if (!prs_uint32("numofforms", ps, depth, &r_u->numofforms)) return False; - if (!prs_uint32("status", ps, depth, &r_u->status)) + if (!prs_werror("status", ps, depth, &r_u->status)) return False; return True; @@ -4127,7 +4127,7 @@ BOOL spoolss_io_r_getform(char *desc, SPOOL_R_GETFORM *r_u, prs_struct *ps, int if (!prs_uint32("size of buffer needed", ps, depth, &r_u->needed)) return False; - if (!prs_uint32("status", ps, depth, &r_u->status)) + if (!prs_werror("status", ps, depth, &r_u->status)) return False; return True; @@ -4157,7 +4157,7 @@ BOOL spoolss_io_r_enumports(char *desc, SPOOL_R_ENUMPORTS *r_u, prs_struct *ps, if (!prs_uint32("returned", ps, depth, &r_u->returned)) return False; - if (!prs_uint32("status", ps, depth, &r_u->status)) + if (!prs_werror("status", ps, depth, &r_u->status)) return False; return True; @@ -4294,7 +4294,7 @@ BOOL spool_io_printer_info_level_2(char *desc, SPOOL_PRINTER_INFO_LEVEL_2 *il, p return False; if(!prs_uint32("untiltime", ps, depth, &il->untiltime)) return False; - if(!prs_uint32("status", ps, depth, &il->status)) + if(!prs_werror("status", ps, depth, &il->status)) return False; if(!prs_uint32("cjobs", ps, depth, &il->cjobs)) return False; @@ -4461,7 +4461,7 @@ BOOL spoolss_io_r_addprinterex(char *desc, SPOOL_R_ADDPRINTEREX *r_u, if(!smb_io_pol_hnd("printer handle",&r_u->handle,ps,depth)) return False; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_werror("status", ps, depth, &r_u->status)) return False; return True; @@ -4953,7 +4953,7 @@ BOOL spoolss_io_r_addprinterdriver(char *desc, SPOOL_R_ADDPRINTERDRIVER *q_u, pr prs_debug(ps, depth, desc, "spoolss_io_r_addprinterdriver"); depth++; - if(!prs_uint32("status", ps, depth, &q_u->status)) + if(!prs_werror("status", ps, depth, &q_u->status)) return False; return True; @@ -5190,7 +5190,7 @@ BOOL spoolss_io_r_getprinterdriverdir(char *desc, SPOOL_R_GETPRINTERDRIVERDIR *r if (!prs_uint32("needed", ps, depth, &r_u->needed)) return False; - if (!prs_uint32("status", ps, depth, &r_u->status)) + if (!prs_werror("status", ps, depth, &r_u->status)) return False; return True; @@ -5219,7 +5219,7 @@ BOOL spoolss_io_r_enumprintprocessors(char *desc, SPOOL_R_ENUMPRINTPROCESSORS *r if (!prs_uint32("returned", ps, depth, &r_u->returned)) return False; - if (!prs_uint32("status", ps, depth, &r_u->status)) + if (!prs_werror("status", ps, depth, &r_u->status)) return False; return True; @@ -5312,7 +5312,7 @@ BOOL spoolss_io_r_addprintprocessor(char *desc, SPOOL_R_ADDPRINTPROCESSOR *r_u, if (!prs_align(ps)) return False; - if (!prs_uint32("status", ps, depth, &r_u->status)) + if (!prs_werror("status", ps, depth, &r_u->status)) return False; return True; @@ -5341,7 +5341,7 @@ BOOL spoolss_io_r_enumprintprocdatatypes(char *desc, SPOOL_R_ENUMPRINTPROCDATATY if (!prs_uint32("returned", ps, depth, &r_u->returned)) return False; - if (!prs_uint32("status", ps, depth, &r_u->status)) + if (!prs_werror("status", ps, depth, &r_u->status)) return False; return True; @@ -5447,7 +5447,7 @@ BOOL spoolss_io_r_enumprintmonitors(char *desc, SPOOL_R_ENUMPRINTMONITORS *r_u, if (!prs_uint32("returned", ps, depth, &r_u->returned)) return False; - if (!prs_uint32("status", ps, depth, &r_u->status)) + if (!prs_werror("status", ps, depth, &r_u->status)) return False; return True; @@ -5487,7 +5487,7 @@ BOOL spoolss_io_r_enumprinterdata(char *desc, SPOOL_R_ENUMPRINTERDATA *r_u, prs_ if(!prs_uint32("realdatasize", ps, depth, &r_u->realdatasize)) return False; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_werror("status", ps, depth, &r_u->status)) return False; return True; @@ -5589,7 +5589,7 @@ BOOL spoolss_io_r_setprinterdata(char *desc, SPOOL_R_SETPRINTERDATA *r_u, prs_st if(!prs_align(ps)) return False; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_werror("status", ps, depth, &r_u->status)) return False; return True; @@ -5696,7 +5696,7 @@ BOOL spoolss_io_r_deleteform(char *desc, SPOOL_R_DELETEFORM *r_u, prs_struct *ps if(!prs_align(ps)) return False; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_werror("status", ps, depth, &r_u->status)) return False; return True; @@ -5741,7 +5741,7 @@ BOOL spoolss_io_r_addform(char *desc, SPOOL_R_ADDFORM *r_u, prs_struct *ps, int if(!prs_align(ps)) return False; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_werror("status", ps, depth, &r_u->status)) return False; return True; @@ -5792,7 +5792,7 @@ BOOL spoolss_io_r_setform(char *desc, SPOOL_R_SETFORM *r_u, prs_struct *ps, int if(!prs_align(ps)) return False; - if(!prs_uint32("status", ps, depth, &r_u->status)) + if(!prs_werror("status", ps, depth, &r_u->status)) return False; return True; @@ -5819,7 +5819,7 @@ BOOL spoolss_io_r_getjob(char *desc, SPOOL_R_GETJOB *r_u, prs_struct *ps, int de if (!prs_uint32("needed", ps, depth, &r_u->needed)) return False; - if (!prs_uint32("status", ps, depth, &r_u->status)) + if (!prs_werror("status", ps, depth, &r_u->status)) return False; return True; @@ -5958,7 +5958,7 @@ BOOL spoolss_io_r_replyopenprinter(char *desc, SPOOL_R_REPLYOPENPRINTER *r_u, pr if(!smb_io_pol_hnd("printer handle",&r_u->handle,ps,depth)) return False; - if (!prs_uint32("status", ps, depth, &r_u->status)) + if (!prs_werror("status", ps, depth, &r_u->status)) return False; return True; @@ -6011,7 +6011,7 @@ BOOL spoolss_io_r_replycloseprinter(char *desc, SPOOL_R_REPLYCLOSEPRINTER *r_u, if(!smb_io_pol_hnd("printer handle",&r_u->handle,ps,depth)) return False; - if (!prs_uint32("status", ps, depth, &r_u->status)) + if (!prs_werror("status", ps, depth, &r_u->status)) return False; return True; @@ -6096,7 +6096,7 @@ BOOL spoolss_io_r_reply_rrpcn(char *desc, SPOOL_R_REPLY_RRPCN *r_u, prs_struct * if (!prs_uint32("unknown0", ps, depth, &r_u->unknown0)) return False; - if (!prs_uint32("status", ps, depth, &r_u->status)) + if (!prs_werror("status", ps, depth, &r_u->status)) return False; return True; diff --git a/source3/rpc_parse/parse_srv.c b/source3/rpc_parse/parse_srv.c index d695eb136c..057367054a 100644 --- a/source3/rpc_parse/parse_srv.c +++ b/source3/rpc_parse/parse_srv.c @@ -617,7 +617,7 @@ BOOL srv_io_r_net_share_enum(char *desc, SRV_R_NET_SHARE_ENUM *r_n, prs_struct * return False; if(!smb_io_enum_hnd("enum_hnd", &r_n->enum_hnd, ps, depth)) return False; - if(!prs_uint32("status ", ps, depth, &r_n->status)) + if(!prs_ntstatus("status ", ps, depth, &r_n->status)) return False; return True; @@ -742,7 +742,7 @@ BOOL srv_io_r_net_share_get_info(char *desc, SRV_R_NET_SHARE_GET_INFO *r_n, prs_ if(!prs_align(ps)) return False; - if(!prs_uint32("status", ps, depth, &r_n->status)) + if(!prs_ntstatus("status", ps, depth, &r_n->status)) return False; return True; @@ -803,7 +803,7 @@ BOOL srv_io_r_net_share_set_info(char *desc, SRV_R_NET_SHARE_SET_INFO *q_n, prs_ if(!prs_uint32("switch_value ", ps, depth, &q_n->switch_value)) return False; - if(!prs_uint32("status ", ps, depth, &q_n->status)) + if(!prs_ntstatus("status ", ps, depth, &q_n->status)) return False; return True; @@ -861,7 +861,7 @@ BOOL srv_io_r_net_share_add(char *desc, SRV_R_NET_SHARE_ADD *q_n, prs_struct *ps if(!prs_uint32("switch_value ", ps, depth, &q_n->switch_value)) return False; - if(!prs_uint32("status ", ps, depth, &q_n->status)) + if(!prs_ntstatus("status ", ps, depth, &q_n->status)) return False; return True; @@ -908,7 +908,7 @@ BOOL srv_io_r_net_share_del(char *desc, SRV_R_NET_SHARE_DEL *q_n, prs_struct *ps if(!prs_align(ps)) return False; - if(!prs_uint32("status ", ps, depth, &q_n->status)) + if(!prs_ntstatus("status ", ps, depth, &q_n->status)) return False; return True; @@ -1311,7 +1311,7 @@ BOOL srv_io_r_net_sess_enum(char *desc, SRV_R_NET_SESS_ENUM *r_n, prs_struct *ps return False; if(!smb_io_enum_hnd("enum_hnd", &r_n->enum_hnd, ps, depth)) return False; - if(!prs_uint32("status ", ps, depth, &r_n->status)) + if(!prs_ntstatus("status ", ps, depth, &r_n->status)) return False; return True; @@ -1676,7 +1676,7 @@ BOOL srv_io_r_net_conn_enum(char *desc, SRV_R_NET_CONN_ENUM *r_n, prs_struct *p return False; if(!smb_io_enum_hnd("enum_hnd", &r_n->enum_hnd, ps, depth)) return False; - if(!prs_uint32("status ", ps, depth, &r_n->status)) + if(!prs_ntstatus("status ", ps, depth, &r_n->status)) return False; return True; @@ -1954,7 +1954,7 @@ BOOL srv_io_r_net_file_enum(char *desc, SRV_R_NET_FILE_ENUM *r_n, prs_struct *ps return False; if(!smb_io_enum_hnd("enum_hnd", &r_n->enum_hnd, ps, depth)) return False; - if(!prs_uint32("status ", ps, depth, &r_n->status)) + if(!prs_ntstatus("status ", ps, depth, &r_n->status)) return False; return True; @@ -2246,7 +2246,7 @@ void init_srv_r_net_srv_get_info(SRV_R_NET_SRV_GET_INFO *srv, srv->ctr = ctr; - if (status == 0x0) { + if (NT_STATUS_IS_OK(status)) { srv->ctr->switch_value = switch_value; srv->ctr->ptr_srv_ctr = 1; } else { @@ -2326,7 +2326,7 @@ BOOL srv_io_r_net_srv_get_info(char *desc, SRV_R_NET_SRV_GET_INFO *r_n, prs_stru if(!srv_io_info_ctr("ctr", r_n->ctr, ps, depth)) return False; - if(!prs_uint32("status ", ps, depth, &r_n->status)) + if(!prs_ntstatus("status ", ps, depth, &r_n->status)) return False; return True; @@ -2348,7 +2348,7 @@ BOOL srv_io_r_net_srv_set_info(char *desc, SRV_R_NET_SRV_SET_INFO *r_n, if(!prs_uint32("switch_value ", ps, depth, &r_n->switch_value)) return False; - if(!prs_uint32("status ", ps, depth, &r_n->status)) + if(!prs_ntstatus("status ", ps, depth, &r_n->status)) return False; return True; @@ -2467,7 +2467,7 @@ BOOL srv_io_r_net_remote_tod(char *desc, SRV_R_NET_REMOTE_TOD *r_n, prs_struct * if(!srv_io_time_of_day_info("tod", r_n->tod, ps, depth)) return False; - if(!prs_uint32("status ", ps, depth, &r_n->status)) + if(!prs_ntstatus("status ", ps, depth, &r_n->status)) return False; return True; @@ -2566,7 +2566,7 @@ BOOL srv_io_r_net_disk_enum(char *desc, SRV_R_NET_DISK_ENUM *r_n, prs_struct *ps if(!smb_io_enum_hnd("enum_hnd", &r_n->enum_hnd, ps, depth)) return False; - if(!prs_uint32("status", ps, depth, &r_n->status)) + if(!prs_ntstatus("status", ps, depth, &r_n->status)) return False; return True; @@ -2626,7 +2626,7 @@ BOOL srv_io_r_net_name_validate(char *desc, SRV_R_NET_NAME_VALIDATE *r_n, prs_st if(!prs_align(ps)) return False; - if(!prs_uint32("status", ps, depth, &r_n->status)) + if(!prs_ntstatus("status", ps, depth, &r_n->status)) return False; return True; @@ -2713,7 +2713,7 @@ BOOL srv_io_r_net_file_query_secdesc(char *desc, SRV_R_NET_FILE_QUERY_SECDESC *r if(!prs_align(ps)) return False; - if(!prs_uint32("status", ps, depth, &r_n->status)) + if(!prs_ntstatus("status", ps, depth, &r_n->status)) return False; return True; @@ -2791,7 +2791,7 @@ BOOL srv_io_r_net_file_set_secdesc(char *desc, SRV_R_NET_FILE_SET_SECDESC *r_n, if(!prs_align(ps)) return False; - if(!prs_uint32("status", ps, depth, &r_n->status)) + if(!prs_ntstatus("status", ps, depth, &r_n->status)) return False; return True; diff --git a/source3/rpc_parse/parse_wks.c b/source3/rpc_parse/parse_wks.c index f35bef83bd..07194e1c31 100644 --- a/source3/rpc_parse/parse_wks.c +++ b/source3/rpc_parse/parse_wks.c @@ -173,7 +173,7 @@ BOOL wks_io_r_query_info(char *desc, WKS_R_QUERY_INFO *r_u, prs_struct *ps, int if(!wks_io_wks_info_100("inf", r_u->wks100, ps, depth)) return False; - if(!prs_uint32("status ", ps, depth, &r_u->status)) + if(!prs_ntstatus("status ", ps, depth, &r_u->status)) return False; return True; |