diff options
author | Stefan Metzmacher <metze@samba.org> | 2007-11-09 19:24:10 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-21 05:44:56 +0100 |
commit | 910ab408afe0ed866d378fb6d58e795dffcbfa58 (patch) | |
tree | 56a084dc5f0a2f7b62767c9212013461f207d33e /source4/librpc/ndr/ndr_sec_helper.c | |
parent | 0ce646d49a70b19d7ca54e0b83422f048dd39c1a (diff) | |
download | samba-910ab408afe0ed866d378fb6d58e795dffcbfa58.tar.gz samba-910ab408afe0ed866d378fb6d58e795dffcbfa58.tar.bz2 samba-910ab408afe0ed866d378fb6d58e795dffcbfa58.zip |
r25918: ndr: change NTSTAUS into enum ndr_err_code (samba4 handwritten stuff)
ndr_sec_helper.c
ndr_spoolss_buf.c
ndr_compression.c
ndr_drsuapi.[ch]
ndr_krb5pac.c
ndr_orpc.c
metze
(This used to be commit 356e027bf883c8fc36fa4759eff56e364daf9fce)
Diffstat (limited to 'source4/librpc/ndr/ndr_sec_helper.c')
-rw-r--r-- | source4/librpc/ndr/ndr_sec_helper.c | 28 |
1 files changed, 14 insertions, 14 deletions
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; } |