diff options
Diffstat (limited to 'source4/librpc/ndr')
-rw-r--r-- | source4/librpc/ndr/ndr_compression.c | 48 | ||||
-rw-r--r-- | source4/librpc/ndr/ndr_drsuapi.c | 10 | ||||
-rw-r--r-- | source4/librpc/ndr/ndr_drsuapi.h | 4 | ||||
-rw-r--r-- | source4/librpc/ndr/ndr_krb5pac.c | 8 | ||||
-rw-r--r-- | source4/librpc/ndr/ndr_orpc.c | 20 | ||||
-rw-r--r-- | source4/librpc/ndr/ndr_sec_helper.c | 28 | ||||
-rw-r--r-- | source4/librpc/ndr/ndr_spoolss_buf.c | 84 |
7 files changed, 101 insertions, 101 deletions
diff --git a/source4/librpc/ndr/ndr_compression.c b/source4/librpc/ndr/ndr_compression.c index 4144396fa2..411d4a17e2 100644 --- a/source4/librpc/ndr/ndr_compression.c +++ b/source4/librpc/ndr/ndr_compression.c @@ -24,7 +24,7 @@ #include "librpc/ndr/libndr.h" #include "librpc/ndr/ndr_compression.h" -static NTSTATUS ndr_pull_compression_mszip_chunk(struct ndr_pull *ndrpull, +static enum ndr_err_code ndr_pull_compression_mszip_chunk(struct ndr_pull *ndrpull, struct ndr_push *ndrpush, struct decomp_state *decomp_state, bool *last) @@ -69,10 +69,10 @@ static NTSTATUS ndr_pull_compression_mszip_chunk(struct ndr_pull *ndrpull, *last = true; } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_compression_mszip(struct ndr_pull *subndr, +static enum ndr_err_code ndr_pull_compression_mszip(struct ndr_pull *subndr, struct ndr_pull **_comndr, ssize_t decompressed_len) { @@ -87,10 +87,10 @@ static NTSTATUS ndr_pull_compression_mszip(struct ndr_pull *subndr, bool last = false; ndrpush = ndr_push_init_ctx(subndr); - NT_STATUS_HAVE_NO_MEMORY(ndrpush); + NDR_ERR_HAVE_NO_MEMORY(ndrpush); decomp_state = ZIPdecomp_state(subndr); - NT_STATUS_HAVE_NO_MEMORY(decomp_state); + NDR_ERR_HAVE_NO_MEMORY(decomp_state); while (!last) { NDR_CHECK(ndr_pull_compression_mszip_chunk(subndr, ndrpush, decomp_state, &last)); @@ -104,7 +104,7 @@ static NTSTATUS ndr_pull_compression_mszip(struct ndr_pull *subndr, } comndr = talloc_zero(subndr, struct ndr_pull); - NT_STATUS_HAVE_NO_MEMORY(comndr); + NDR_ERR_HAVE_NO_MEMORY(comndr); comndr->flags = subndr->flags; comndr->current_mem_ctx = subndr->current_mem_ctx; @@ -142,16 +142,16 @@ static NTSTATUS ndr_pull_compression_mszip(struct ndr_pull *subndr, comndr->offset = 0; *_comndr = comndr; - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_push_compression_mszip(struct ndr_push *subndr, +static enum ndr_err_code ndr_push_compression_mszip(struct ndr_push *subndr, struct ndr_push *comndr) { return ndr_push_error(subndr, NDR_ERR_COMPRESSION, "Sorry MSZIP compression is not supported yet (PUSH)"); } -static NTSTATUS ndr_pull_compression_xpress_chunk(struct ndr_pull *ndrpull, +static enum ndr_err_code ndr_pull_compression_xpress_chunk(struct ndr_pull *ndrpull, struct ndr_push *ndrpush, bool *last) { @@ -185,10 +185,10 @@ static NTSTATUS ndr_pull_compression_xpress_chunk(struct ndr_pull *ndrpull, *last = true; } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_pull_compression_xpress(struct ndr_pull *subndr, +static enum ndr_err_code ndr_pull_compression_xpress(struct ndr_pull *subndr, struct ndr_pull **_comndr, ssize_t decompressed_len) { @@ -198,7 +198,7 @@ static NTSTATUS ndr_pull_compression_xpress(struct ndr_pull *subndr, bool last = false; ndrpush = ndr_push_init_ctx(subndr); - NT_STATUS_HAVE_NO_MEMORY(ndrpush); + NDR_ERR_HAVE_NO_MEMORY(ndrpush); while (!last) { NDR_CHECK(ndr_pull_compression_xpress_chunk(subndr, ndrpush, &last)); @@ -207,7 +207,7 @@ static NTSTATUS ndr_pull_compression_xpress(struct ndr_pull *subndr, uncompressed = ndr_push_blob(ndrpush); comndr = talloc_zero(subndr, struct ndr_pull); - NT_STATUS_HAVE_NO_MEMORY(comndr); + NDR_ERR_HAVE_NO_MEMORY(comndr); comndr->flags = subndr->flags; comndr->current_mem_ctx = subndr->current_mem_ctx; @@ -216,10 +216,10 @@ static NTSTATUS ndr_pull_compression_xpress(struct ndr_pull *subndr, comndr->offset = 0; *_comndr = comndr; - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -static NTSTATUS ndr_push_compression_xpress(struct ndr_push *subndr, +static enum ndr_err_code ndr_push_compression_xpress(struct ndr_push *subndr, struct ndr_push *comndr) { return ndr_push_error(subndr, NDR_ERR_COMPRESSION, "XPRESS compression is not supported yet (PUSH)"); @@ -229,7 +229,7 @@ static NTSTATUS ndr_push_compression_xpress(struct ndr_push *subndr, handle compressed subcontext buffers, which in midl land are user-marshalled, but we use magic in pidl to make them easier to cope with */ -NTSTATUS ndr_pull_compression_start(struct ndr_pull *subndr, +enum ndr_err_code ndr_pull_compression_start(struct ndr_pull *subndr, struct ndr_pull **_comndr, enum ndr_compression_alg compression_alg, ssize_t decompressed_len) @@ -243,21 +243,21 @@ NTSTATUS ndr_pull_compression_start(struct ndr_pull *subndr, return ndr_pull_error(subndr, NDR_ERR_COMPRESSION, "Bad compression algorithm %d (PULL)", compression_alg); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -NTSTATUS ndr_pull_compression_end(struct ndr_pull *subndr, +enum ndr_err_code ndr_pull_compression_end(struct ndr_pull *subndr, struct ndr_pull *comndr, enum ndr_compression_alg compression_alg, ssize_t decompressed_len) { - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } /* push a compressed subcontext */ -NTSTATUS ndr_push_compression_start(struct ndr_push *subndr, +enum ndr_err_code ndr_push_compression_start(struct ndr_push *subndr, struct ndr_push **_comndr, enum ndr_compression_alg compression_alg, ssize_t decompressed_len) @@ -265,17 +265,17 @@ NTSTATUS ndr_push_compression_start(struct ndr_push *subndr, struct ndr_push *comndr; comndr = ndr_push_init_ctx(subndr); - NT_STATUS_HAVE_NO_MEMORY(comndr); + NDR_ERR_HAVE_NO_MEMORY(comndr); comndr->flags = subndr->flags; *_comndr = comndr; - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } /* push a compressed subcontext */ -NTSTATUS ndr_push_compression_end(struct ndr_push *subndr, +enum ndr_err_code ndr_push_compression_end(struct ndr_push *subndr, struct ndr_push *comndr, enum ndr_compression_alg compression_alg, ssize_t decompressed_len) @@ -289,5 +289,5 @@ NTSTATUS ndr_push_compression_end(struct ndr_push *subndr, return ndr_push_error(subndr, NDR_ERR_COMPRESSION, "Bad compression algorithm %d (PUSH)", compression_alg); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } diff --git a/source4/librpc/ndr/ndr_drsuapi.c b/source4/librpc/ndr/ndr_drsuapi.c index 425df18d02..dedcb0601d 100644 --- a/source4/librpc/ndr/ndr_drsuapi.c +++ b/source4/librpc/ndr/ndr_drsuapi.c @@ -79,7 +79,7 @@ void ndr_print_drsuapi_DsReplicaObjectListItemEx(struct ndr_print *ndr, const ch } \ } while (0) -NTSTATUS ndr_push_drsuapi_DsReplicaOID(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaOID *r) +enum ndr_err_code ndr_push_drsuapi_DsReplicaOID(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaOID *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); @@ -106,10 +106,10 @@ NTSTATUS ndr_push_drsuapi_DsReplicaOID(struct ndr_push *ndr, int ndr_flags, cons NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, blob.data, blob.length)); } } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -NTSTATUS ndr_pull_drsuapi_DsReplicaOID(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaOID *r) +enum ndr_err_code ndr_pull_drsuapi_DsReplicaOID(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaOID *r) { uint32_t _ptr_oid; TALLOC_CTX *_mem_save_oid_0; @@ -141,7 +141,7 @@ NTSTATUS ndr_pull_drsuapi_DsReplicaOID(struct ndr_pull *ndr, int ndr_flags, stru if (_oid_array.length && _oid_array.data[0] == 0xFF) { _oid = data_blob_hex_string(ndr, &_oid_array); - NT_STATUS_HAVE_NO_MEMORY(_oid); + NDR_ERR_HAVE_NO_MEMORY(_oid); } else { _OID_PULL_CHECK(ber_read_OID_String(ndr, _oid_array, &_oid)); } @@ -153,7 +153,7 @@ NTSTATUS ndr_pull_drsuapi_DsReplicaOID(struct ndr_pull *ndr, int ndr_flags, stru NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->oid, r->__ndr_size)); } } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } size_t ndr_size_drsuapi_DsReplicaOID_oid(const char *oid, int flags) diff --git a/source4/librpc/ndr/ndr_drsuapi.h b/source4/librpc/ndr/ndr_drsuapi.h index faa23a1680..c663eadd7a 100644 --- a/source4/librpc/ndr/ndr_drsuapi.h +++ b/source4/librpc/ndr/ndr_drsuapi.h @@ -28,8 +28,8 @@ void ndr_print_drsuapi_DsReplicaObjectListItem(struct ndr_print *ndr, const char void ndr_print_drsuapi_DsReplicaObjectListItemEx(struct ndr_print *ndr, const char *name, const struct drsuapi_DsReplicaObjectListItemEx *r); -NTSTATUS ndr_push_drsuapi_DsReplicaOID(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaOID *r); -NTSTATUS ndr_pull_drsuapi_DsReplicaOID(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaOID *r); +enum ndr_err_code ndr_push_drsuapi_DsReplicaOID(struct ndr_push *ndr, int ndr_flags, const struct drsuapi_DsReplicaOID *r); +enum ndr_err_code ndr_pull_drsuapi_DsReplicaOID(struct ndr_pull *ndr, int ndr_flags, struct drsuapi_DsReplicaOID *r); size_t ndr_size_drsuapi_DsReplicaOID_oid(const char *oid, int flags); #endif /* _LIBRPC_NDR_NDR_DRSUAPI_H */ diff --git a/source4/librpc/ndr/ndr_krb5pac.c b/source4/librpc/ndr/ndr_krb5pac.c index a220b30849..ec8bae3eb1 100644 --- a/source4/librpc/ndr/ndr_krb5pac.c +++ b/source4/librpc/ndr/ndr_krb5pac.c @@ -40,7 +40,7 @@ static size_t _subcontext_size_PAC_INFO(const union PAC_INFO *r, uint32_t level, return NDR_ROUND(s,8); } -NTSTATUS ndr_push_PAC_BUFFER(struct ndr_push *ndr, int ndr_flags, const struct PAC_BUFFER *r) +enum ndr_err_code ndr_push_PAC_BUFFER(struct ndr_push *ndr, int ndr_flags, const struct PAC_BUFFER *r) { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); @@ -71,10 +71,10 @@ NTSTATUS ndr_push_PAC_BUFFER(struct ndr_push *ndr, int ndr_flags, const struct P ndr->flags = _flags_save_PAC_INFO; } } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -NTSTATUS ndr_pull_PAC_BUFFER(struct ndr_pull *ndr, int ndr_flags, struct PAC_BUFFER *r) +enum ndr_err_code ndr_pull_PAC_BUFFER(struct ndr_pull *ndr, int ndr_flags, struct PAC_BUFFER *r) { uint32_t _ptr_info; TALLOC_CTX *_mem_save_info_0; @@ -119,7 +119,7 @@ NTSTATUS ndr_pull_PAC_BUFFER(struct ndr_pull *ndr, int ndr_flags, struct PAC_BUF ndr->flags = _flags_save_PAC_INFO; } } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } void ndr_print_PAC_BUFFER(struct ndr_print *ndr, const char *name, const struct PAC_BUFFER *r) diff --git a/source4/librpc/ndr/ndr_orpc.c b/source4/librpc/ndr/ndr_orpc.c index 108508d4ed..6a55048e43 100644 --- a/source4/librpc/ndr/ndr_orpc.c +++ b/source4/librpc/ndr/ndr_orpc.c @@ -23,14 +23,14 @@ #include "includes.h" #include "librpc/gen_ndr/ndr_orpc.h" -NTSTATUS ndr_pull_DUALSTRINGARRAY(struct ndr_pull *ndr, int ndr_flags, struct DUALSTRINGARRAY *ar) +enum ndr_err_code ndr_pull_DUALSTRINGARRAY(struct ndr_pull *ndr, int ndr_flags, struct DUALSTRINGARRAY *ar) { uint16_t num_entries, security_offset; uint16_t towerid; uint32_t towernum = 0, conformant_size; if (!(ndr_flags & NDR_SCALARS)) { - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &conformant_size)); @@ -74,12 +74,12 @@ NTSTATUS ndr_pull_DUALSTRINGARRAY(struct ndr_pull *ndr, int ndr_flags, struct DU ar->securitybindings[towernum] = NULL; - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -NTSTATUS ndr_push_DUALSTRINGARRAY(struct ndr_push *ndr, int ndr_flags, const struct DUALSTRINGARRAY *ar) +enum ndr_err_code ndr_push_DUALSTRINGARRAY(struct ndr_push *ndr, int ndr_flags, const struct DUALSTRINGARRAY *ar) { - return NT_STATUS_NOT_SUPPORTED; + return ndr_push_error(ndr, NDR_ERR_STRING, "ndr_push_DUALSTRINGARRAY not implemented"); } /* @@ -114,14 +114,14 @@ void ndr_print_DUALSTRINGARRAY(struct ndr_print *ndr, const char *name, const st ndr->depth--; } -NTSTATUS ndr_pull_STRINGARRAY(struct ndr_pull *ndr, int ndr_flags, struct STRINGARRAY *ar) +enum ndr_err_code ndr_pull_STRINGARRAY(struct ndr_pull *ndr, int ndr_flags, struct STRINGARRAY *ar) { uint16_t towerid; uint32_t towernum = 0; uint16_t num_entries; if (!(ndr_flags & NDR_SCALARS)) { - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &num_entries)); @@ -145,12 +145,12 @@ NTSTATUS ndr_pull_STRINGARRAY(struct ndr_pull *ndr, int ndr_flags, struct STRING ar->stringbindings[towernum] = NULL; towernum = 0; - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -NTSTATUS ndr_push_STRINGARRAY(struct ndr_push *ndr, int ndr_flags, const struct STRINGARRAY *ar) +enum ndr_err_code ndr_push_STRINGARRAY(struct ndr_push *ndr, int ndr_flags, const struct STRINGARRAY *ar) { - return NT_STATUS_NOT_SUPPORTED; + return ndr_push_error(ndr, NDR_ERR_STRING, "ndr_push_STRINGARRAY not implemented"); } /* diff --git a/source4/librpc/ndr/ndr_sec_helper.c b/source4/librpc/ndr/ndr_sec_helper.c index ef20349515..30eaf9c6f4 100644 --- a/source4/librpc/ndr/ndr_sec_helper.c +++ b/source4/librpc/ndr/ndr_sec_helper.c @@ -132,11 +132,11 @@ void ndr_print_dom_sid28(struct ndr_print *ndr, const char *name, const struct d /* parse a dom_sid2 - this is a dom_sid but with an extra copy of the num_auths field */ -NTSTATUS ndr_pull_dom_sid2(struct ndr_pull *ndr, int ndr_flags, struct dom_sid *sid) +enum ndr_err_code ndr_pull_dom_sid2(struct ndr_pull *ndr, int ndr_flags, struct dom_sid *sid) { uint32_t num_auths; if (!(ndr_flags & NDR_SCALARS)) { - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &num_auths)); NDR_CHECK(ndr_pull_dom_sid(ndr, ndr_flags, sid)); @@ -145,16 +145,16 @@ NTSTATUS ndr_pull_dom_sid2(struct ndr_pull *ndr, int ndr_flags, struct dom_sid * "Bad array size %u should exceed %u", num_auths, sid->num_auths); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } /* parse a dom_sid2 - this is a dom_sid but with an extra copy of the num_auths field */ -NTSTATUS ndr_push_dom_sid2(struct ndr_push *ndr, int ndr_flags, const struct dom_sid *sid) +enum ndr_err_code ndr_push_dom_sid2(struct ndr_push *ndr, int ndr_flags, const struct dom_sid *sid) { if (!(ndr_flags & NDR_SCALARS)) { - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, sid->num_auths)); return ndr_push_dom_sid(ndr, ndr_flags, sid); @@ -163,17 +163,17 @@ NTSTATUS ndr_push_dom_sid2(struct ndr_push *ndr, int ndr_flags, const struct dom /* parse a dom_sid28 - this is a dom_sid in a fixed 28 byte buffer, so we need to ensure there are only upto 5 sub_auth */ -NTSTATUS ndr_pull_dom_sid28(struct ndr_pull *ndr, int ndr_flags, struct dom_sid *sid) +enum ndr_err_code ndr_pull_dom_sid28(struct ndr_pull *ndr, int ndr_flags, struct dom_sid *sid) { - NTSTATUS status; + enum ndr_err_code status; struct ndr_pull *subndr; if (!(ndr_flags & NDR_SCALARS)) { - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } subndr = talloc_zero(ndr, struct ndr_pull); - NT_STATUS_HAVE_NO_MEMORY(subndr); + NDR_ERR_HAVE_NO_MEMORY(subndr); subndr->flags = ndr->flags; subndr->current_mem_ctx = ndr->current_mem_ctx; @@ -184,24 +184,24 @@ NTSTATUS ndr_pull_dom_sid28(struct ndr_pull *ndr, int ndr_flags, struct dom_sid NDR_CHECK(ndr_pull_advance(ndr, 28)); status = ndr_pull_dom_sid(subndr, ndr_flags, sid); - if (!NT_STATUS_IS_OK(status)) { + if (!NDR_ERR_CODE_IS_SUCCESS(status)) { /* handle a w2k bug which send random data in the buffer */ ZERO_STRUCTP(sid); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } /* push a dom_sid28 - this is a dom_sid in a 28 byte fixed buffer */ -NTSTATUS ndr_push_dom_sid28(struct ndr_push *ndr, int ndr_flags, const struct dom_sid *sid) +enum ndr_err_code ndr_push_dom_sid28(struct ndr_push *ndr, int ndr_flags, const struct dom_sid *sid) { uint32_t old_offset; uint32_t padding; if (!(ndr_flags & NDR_SCALARS)) { - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } if (sid->num_auths > 5) { @@ -219,6 +219,6 @@ NTSTATUS ndr_push_dom_sid28(struct ndr_push *ndr, int ndr_flags, const struct do NDR_CHECK(ndr_push_zero(ndr, padding)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } diff --git a/source4/librpc/ndr/ndr_spoolss_buf.c b/source4/librpc/ndr/ndr_spoolss_buf.c index 5fe99115be..9800430203 100644 --- a/source4/librpc/ndr/ndr_spoolss_buf.c +++ b/source4/librpc/ndr/ndr_spoolss_buf.c @@ -56,7 +56,7 @@ if (r->in.buffer) {\ DATA_BLOB _data_blob_info;\ _ndr_info = ndr_push_init_ctx(ndr);\ - NT_STATUS_HAVE_NO_MEMORY(_ndr_info);\ + NDR_ERR_HAVE_NO_MEMORY(_ndr_info);\ _ndr_info->flags= ndr->flags;\ if (r->out.info) {\ struct __##fn __r;\ @@ -121,7 +121,7 @@ r->out.result = _r.out.result;\ if (_r.out.info) {\ struct ndr_pull *_ndr_info = ndr_pull_init_blob(_r.out.info, ndr);\ - NT_STATUS_HAVE_NO_MEMORY(_ndr_info);\ + NDR_ERR_HAVE_NO_MEMORY(_ndr_info);\ _ndr_info->flags= ndr->flags;\ if (r->in.offered != _ndr_info->data_size) {\ return ndr_pull_error(ndr, NDR_ERR_BUFSIZE,\ @@ -153,9 +153,9 @@ } while(0) #define _NDR_CHECK_UINT32(call) do {\ - NTSTATUS _status; \ - _status = call; \ - if (!NT_STATUS_IS_OK(_status)) {\ + enum ndr_err_code _ndr_err; \ + _ndr_err = call; \ + if (!NDR_ERR_CODE_IS_SUCCESS(_ndr_err)) { \ return 0; \ }\ } while (0) @@ -178,7 +178,7 @@ /* spoolss_EnumPrinters */ -NTSTATUS ndr_push_spoolss_EnumPrinters(struct ndr_push *ndr, int flags, const struct spoolss_EnumPrinters *r) +enum ndr_err_code ndr_push_spoolss_EnumPrinters(struct ndr_push *ndr, int flags, const struct spoolss_EnumPrinters *r) { NDR_SPOOLSS_PUSH_ENUM(spoolss_EnumPrinters,{ _r.in.flags = r->in.flags; @@ -187,10 +187,10 @@ NTSTATUS ndr_push_spoolss_EnumPrinters(struct ndr_push *ndr, int flags, const st _r.in.flags = r->in.flags; _r.in.server = r->in.server; }); - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -NTSTATUS ndr_pull_spoolss_EnumPrinters(struct ndr_pull *ndr, int flags, struct spoolss_EnumPrinters *r) +enum ndr_err_code ndr_pull_spoolss_EnumPrinters(struct ndr_pull *ndr, int flags, struct spoolss_EnumPrinters *r) { NDR_SPOOLSS_PULL_ENUM(spoolss_EnumPrinters,{ r->in.flags = _r.in.flags; @@ -199,7 +199,7 @@ NTSTATUS ndr_pull_spoolss_EnumPrinters(struct ndr_pull *ndr, int flags, struct s _r.in.flags = r->in.flags; _r.in.server = r->in.server; }); - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } uint32_t ndr_size_spoolss_EnumPrinters_info(TALLOC_CTX *mem_ctx, uint32_t level, uint32_t count, union spoolss_PrinterInfo *info) @@ -210,7 +210,7 @@ uint32_t ndr_size_spoolss_EnumPrinters_info(TALLOC_CTX *mem_ctx, uint32_t level, /* spoolss_EnumJobs */ -NTSTATUS ndr_push_spoolss_EnumJobs(struct ndr_push *ndr, int flags, const struct spoolss_EnumJobs *r) +enum ndr_err_code ndr_push_spoolss_EnumJobs(struct ndr_push *ndr, int flags, const struct spoolss_EnumJobs *r) { NDR_SPOOLSS_PUSH_ENUM(spoolss_EnumJobs,{ _r.in.handle = r->in.handle; @@ -221,10 +221,10 @@ NTSTATUS ndr_push_spoolss_EnumJobs(struct ndr_push *ndr, int flags, const struct _r.in.firstjob = r->in.firstjob; _r.in.numjobs = r->in.numjobs; }); - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -NTSTATUS ndr_pull_spoolss_EnumJobs(struct ndr_pull *ndr, int flags, struct spoolss_EnumJobs *r) +enum ndr_err_code ndr_pull_spoolss_EnumJobs(struct ndr_pull *ndr, int flags, struct spoolss_EnumJobs *r) { NDR_SPOOLSS_PULL_ENUM(spoolss_EnumJobs,{ r->in.handle = _r.in.handle; @@ -235,7 +235,7 @@ NTSTATUS ndr_pull_spoolss_EnumJobs(struct ndr_pull *ndr, int flags, struct spool _r.in.firstjob = r->in.firstjob; _r.in.numjobs = r->in.numjobs; }); - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } uint32_t ndr_size_spoolss_EnumJobss_info(TALLOC_CTX *mem_ctx, uint32_t level, uint32_t count, union spoolss_JobInfo *info) @@ -246,7 +246,7 @@ uint32_t ndr_size_spoolss_EnumJobss_info(TALLOC_CTX *mem_ctx, uint32_t level, ui /* spoolss_EnumPrinterDrivers */ -NTSTATUS ndr_push_spoolss_EnumPrinterDrivers(struct ndr_push *ndr, int flags, const struct spoolss_EnumPrinterDrivers *r) +enum ndr_err_code ndr_push_spoolss_EnumPrinterDrivers(struct ndr_push *ndr, int flags, const struct spoolss_EnumPrinterDrivers *r) { NDR_SPOOLSS_PUSH_ENUM(spoolss_EnumPrinterDrivers,{ _r.in.server = r->in.server; @@ -255,10 +255,10 @@ NTSTATUS ndr_push_spoolss_EnumPrinterDrivers(struct ndr_push *ndr, int flags, co _r.in.server = r->in.server; _r.in.environment = r->in.environment; }); - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -NTSTATUS ndr_pull_spoolss_EnumPrinterDrivers(struct ndr_pull *ndr, int flags, struct spoolss_EnumPrinterDrivers *r) +enum ndr_err_code ndr_pull_spoolss_EnumPrinterDrivers(struct ndr_pull *ndr, int flags, struct spoolss_EnumPrinterDrivers *r) { NDR_SPOOLSS_PULL_ENUM(spoolss_EnumPrinterDrivers,{ r->in.server = _r.in.server; @@ -267,7 +267,7 @@ NTSTATUS ndr_pull_spoolss_EnumPrinterDrivers(struct ndr_pull *ndr, int flags, st _r.in.server = r->in.server; _r.in.environment = r->in.environment; }); - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } uint32_t ndr_size_spoolss_EnumPrinterDrivers_info(TALLOC_CTX *mem_ctx, uint32_t level, uint32_t count, union spoolss_DriverInfo *info) @@ -278,24 +278,24 @@ uint32_t ndr_size_spoolss_EnumPrinterDrivers_info(TALLOC_CTX *mem_ctx, uint32_t /* spoolss_EnumForms */ -NTSTATUS ndr_push_spoolss_EnumForms(struct ndr_push *ndr, int flags, const struct spoolss_EnumForms *r) +enum ndr_err_code ndr_push_spoolss_EnumForms(struct ndr_push *ndr, int flags, const struct spoolss_EnumForms *r) { NDR_SPOOLSS_PUSH_ENUM(spoolss_EnumForms,{ _r.in.handle = r->in.handle; },{ _r.in.handle = r->in.handle; }); - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -NTSTATUS ndr_pull_spoolss_EnumForms(struct ndr_pull *ndr, int flags, struct spoolss_EnumForms *r) +enum ndr_err_code ndr_pull_spoolss_EnumForms(struct ndr_pull *ndr, int flags, struct spoolss_EnumForms *r) { NDR_SPOOLSS_PULL_ENUM(spoolss_EnumForms,{ r->in.handle = _r.in.handle; },{ _r.in.handle = r->in.handle; }); - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } uint32_t ndr_size_spoolss_EnumForms_info(TALLOC_CTX *mem_ctx, uint32_t level, uint32_t count, union spoolss_FormInfo *info) @@ -306,24 +306,24 @@ uint32_t ndr_size_spoolss_EnumForms_info(TALLOC_CTX *mem_ctx, uint32_t level, ui /* spoolss_EnumPorts */ -NTSTATUS ndr_push_spoolss_EnumPorts(struct ndr_push *ndr, int flags, const struct spoolss_EnumPorts *r) +enum ndr_err_code ndr_push_spoolss_EnumPorts(struct ndr_push *ndr, int flags, const struct spoolss_EnumPorts *r) { NDR_SPOOLSS_PUSH_ENUM(spoolss_EnumPorts,{ _r.in.servername= r->in.servername; },{ _r.in.servername= r->in.servername; }); - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -NTSTATUS ndr_pull_spoolss_EnumPorts(struct ndr_pull *ndr, int flags, struct spoolss_EnumPorts *r) +enum ndr_err_code ndr_pull_spoolss_EnumPorts(struct ndr_pull *ndr, int flags, struct spoolss_EnumPorts *r) { NDR_SPOOLSS_PULL_ENUM(spoolss_EnumPorts,{ r->in.servername= _r.in.servername; },{ _r.in.servername= r->in.servername; }); - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } uint32_t ndr_size_spoolss_EnumPorts_info(TALLOC_CTX *mem_ctx, uint32_t level, uint32_t count, union spoolss_PortInfo *info) @@ -334,24 +334,24 @@ uint32_t ndr_size_spoolss_EnumPorts_info(TALLOC_CTX *mem_ctx, uint32_t level, ui /* spoolss_EnumMonitors */ -NTSTATUS ndr_push_spoolss_EnumMonitors(struct ndr_push *ndr, int flags, const struct spoolss_EnumMonitors *r) +enum ndr_err_code ndr_push_spoolss_EnumMonitors(struct ndr_push *ndr, int flags, const struct spoolss_EnumMonitors *r) { NDR_SPOOLSS_PUSH_ENUM(spoolss_EnumMonitors,{ _r.in.servername= r->in.servername; },{ _r.in.servername= r->in.servername; }); - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -NTSTATUS ndr_pull_spoolss_EnumMonitors(struct ndr_pull *ndr, int flags, struct spoolss_EnumMonitors *r) +enum ndr_err_code ndr_pull_spoolss_EnumMonitors(struct ndr_pull *ndr, int flags, struct spoolss_EnumMonitors *r) { NDR_SPOOLSS_PULL_ENUM(spoolss_EnumMonitors,{ r->in.servername= _r.in.servername; },{ _r.in.servername= r->in.servername; }); - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } uint32_t ndr_size_spoolss_EnumMonitors_info(TALLOC_CTX *mem_ctx, uint32_t level, uint32_t count, union spoolss_MonitorInfo *info) @@ -362,7 +362,7 @@ uint32_t ndr_size_spoolss_EnumMonitors_info(TALLOC_CTX *mem_ctx, uint32_t level, /* spoolss_EnumPrintProcessors */ -NTSTATUS ndr_push_spoolss_EnumPrintProcessors(struct ndr_push *ndr, int flags, const struct spoolss_EnumPrintProcessors *r) +enum ndr_err_code ndr_push_spoolss_EnumPrintProcessors(struct ndr_push *ndr, int flags, const struct spoolss_EnumPrintProcessors *r) { NDR_SPOOLSS_PUSH_ENUM(spoolss_EnumPrintProcessors,{ _r.in.servername = r->in.servername; @@ -371,10 +371,10 @@ NTSTATUS ndr_push_spoolss_EnumPrintProcessors(struct ndr_push *ndr, int flags, c _r.in.servername = r->in.servername; _r.in.environment = r->in.environment; }); - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -NTSTATUS ndr_pull_spoolss_EnumPrintProcessors(struct ndr_pull *ndr, int flags, struct spoolss_EnumPrintProcessors *r) +enum ndr_err_code ndr_pull_spoolss_EnumPrintProcessors(struct ndr_pull *ndr, int flags, struct spoolss_EnumPrintProcessors *r) { NDR_SPOOLSS_PULL_ENUM(spoolss_EnumPrintProcessors,{ r->in.servername = _r.in.servername; @@ -383,7 +383,7 @@ NTSTATUS ndr_pull_spoolss_EnumPrintProcessors(struct ndr_pull *ndr, int flags, s _r.in.servername = r->in.servername; _r.in.environment = r->in.environment; }); - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } uint32_t ndr_size_spoolss_EnumPrinterProcessors_info(TALLOC_CTX *mem_ctx, uint32_t level, uint32_t count, union spoolss_PrintProcessorInfo *info) @@ -394,7 +394,7 @@ uint32_t ndr_size_spoolss_EnumPrinterProcessors_info(TALLOC_CTX *mem_ctx, uint32 /* spoolss_GetPrinterData */ -NTSTATUS ndr_push_spoolss_GetPrinterData(struct ndr_push *ndr, int flags, const struct spoolss_GetPrinterData *r) +enum ndr_err_code ndr_push_spoolss_GetPrinterData(struct ndr_push *ndr, int flags, const struct spoolss_GetPrinterData *r) { struct _spoolss_GetPrinterData _r; if (flags & NDR_IN) { @@ -415,7 +415,7 @@ NTSTATUS ndr_push_spoolss_GetPrinterData(struct ndr_push *ndr, int flags, const { struct __spoolss_GetPrinterData __r; _ndr_info = ndr_push_init_ctx(ndr); - NT_STATUS_HAVE_NO_MEMORY(_ndr_info); + NDR_ERR_HAVE_NO_MEMORY(_ndr_info); _ndr_info->flags= ndr->flags; __r.in.type = r->out.type; __r.out.data = r->out.data; @@ -428,10 +428,10 @@ NTSTATUS ndr_push_spoolss_GetPrinterData(struct ndr_push *ndr, int flags, const } NDR_CHECK(ndr_push__spoolss_GetPrinterData(ndr, flags, &_r)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } -NTSTATUS ndr_pull_spoolss_GetPrinterData(struct ndr_pull *ndr, int flags, struct spoolss_GetPrinterData *r) +enum ndr_err_code ndr_pull_spoolss_GetPrinterData(struct ndr_pull *ndr, int flags, struct spoolss_GetPrinterData *r) { struct _spoolss_GetPrinterData _r; if (flags & NDR_IN) { @@ -470,7 +470,7 @@ NTSTATUS ndr_pull_spoolss_GetPrinterData(struct ndr_pull *ndr, int flags, struct if (_r.out.data.length > 0 && r->out.needed <= _r.out.data.length) { struct __spoolss_GetPrinterData __r; struct ndr_pull *_ndr_data = ndr_pull_init_blob(&_r.out.data, ndr); - NT_STATUS_HAVE_NO_MEMORY(_ndr_data); + NDR_ERR_HAVE_NO_MEMORY(_ndr_data); _ndr_data->flags= ndr->flags; __r.in.type = r->out.type; __r.out.data = r->out.data; @@ -480,13 +480,13 @@ NTSTATUS ndr_pull_spoolss_GetPrinterData(struct ndr_pull *ndr, int flags, struct r->out.type = SPOOLSS_PRINTER_DATA_TYPE_NULL; } } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } /* spoolss_SetPrinterData */ -NTSTATUS ndr_push_spoolss_SetPrinterData(struct ndr_push *ndr, int flags, const struct spoolss_SetPrinterData *r) +enum ndr_err_code ndr_push_spoolss_SetPrinterData(struct ndr_push *ndr, int flags, const struct spoolss_SetPrinterData *r) { struct _spoolss_SetPrinterData _r; if (flags & NDR_IN) { @@ -495,7 +495,7 @@ NTSTATUS ndr_push_spoolss_SetPrinterData(struct ndr_push *ndr, int flags, const DATA_BLOB _data_blob_data; _ndr_data = ndr_push_init_ctx(ndr); - NT_STATUS_HAVE_NO_MEMORY(_ndr_data); + NDR_ERR_HAVE_NO_MEMORY(_ndr_data); _ndr_data->flags= ndr->flags; __r.in.type = r->in.type; @@ -520,7 +520,7 @@ NTSTATUS ndr_push_spoolss_SetPrinterData(struct ndr_push *ndr, int flags, const _r.out.result = r->out.result; NDR_CHECK(ndr_push__spoolss_SetPrinterData(ndr, flags, &_r)); } - return NT_STATUS_OK; + return NDR_ERR_SUCCESS; } uint32_t _ndr_size_spoolss_DeviceMode(struct spoolss_DeviceMode *devmode, uint32_t flags) |