diff options
author | Stefan Metzmacher <metze@samba.org> | 2007-11-09 19:24:51 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-21 05:45:02 +0100 |
commit | 529763a9aa192a6785ba878aceeb1683c2510913 (patch) | |
tree | 5fc843ffa644969ecd967d8b4133fc19333c33b5 /source4/lib/ldb-samba | |
parent | b2ddeeb79d2622b3fd216465716dfa6b8c3e0b86 (diff) | |
download | samba-529763a9aa192a6785ba878aceeb1683c2510913.tar.gz samba-529763a9aa192a6785ba878aceeb1683c2510913.tar.bz2 samba-529763a9aa192a6785ba878aceeb1683c2510913.zip |
r25920: ndr: change NTSTAUS into enum ndr_err_code (samba4 callers)
lib/messaging/
lib/registry/
lib/ldb-samba/
librpc/rpc/
auth/auth_winbind.c
auth/gensec/
auth/kerberos/
dsdb/repl/
dsdb/samdb/
dsdb/schema/
torture/
cluster/ctdb/
kdc/
ntvfs/ipc/
torture/rap/
ntvfs/
utils/getntacl.c
ntptr/
smb_server/
libcli/wrepl/
wrepl_server/
libcli/cldap/
libcli/dgram/
libcli/ldap/
libcli/raw/
libcli/nbt/
libnet/
winbind/
rpc_server/
metze
(This used to be commit 6223c7fddc972687eb577e04fc1c8e0604c35435)
Diffstat (limited to 'source4/lib/ldb-samba')
-rw-r--r-- | source4/lib/ldb-samba/ldif_handlers.c | 48 |
1 files changed, 25 insertions, 23 deletions
diff --git a/source4/lib/ldb-samba/ldif_handlers.c b/source4/lib/ldb-samba/ldif_handlers.c index 928a06ab43..13f9c19fb4 100644 --- a/source4/lib/ldb-samba/ldif_handlers.c +++ b/source4/lib/ldb-samba/ldif_handlers.c @@ -36,16 +36,16 @@ static int ldif_read_objectSid(struct ldb_context *ldb, void *mem_ctx, const struct ldb_val *in, struct ldb_val *out) { + enum ndr_err_code ndr_err; struct dom_sid *sid; - NTSTATUS status; sid = dom_sid_parse_talloc(mem_ctx, (const char *)in->data); if (sid == NULL) { return -1; } - status = ndr_push_struct_blob(out, mem_ctx, sid, - (ndr_push_flags_fn_t)ndr_push_dom_sid); + ndr_err = ndr_push_struct_blob(out, mem_ctx, sid, + (ndr_push_flags_fn_t)ndr_push_dom_sid); talloc_free(sid); - if (!NT_STATUS_IS_OK(status)) { + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { return -1; } return 0; @@ -58,14 +58,15 @@ static int ldif_write_objectSid(struct ldb_context *ldb, void *mem_ctx, const struct ldb_val *in, struct ldb_val *out) { struct dom_sid *sid; - NTSTATUS status; + enum ndr_err_code ndr_err; + sid = talloc(mem_ctx, struct dom_sid); if (sid == NULL) { return -1; } - status = ndr_pull_struct_blob(in, sid, sid, - (ndr_pull_flags_fn_t)ndr_pull_dom_sid); - if (!NT_STATUS_IS_OK(status)) { + ndr_err = ndr_pull_struct_blob(in, sid, sid, + (ndr_pull_flags_fn_t)ndr_pull_dom_sid); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(sid); return -1; } @@ -141,15 +142,16 @@ static int ldif_read_objectGUID(struct ldb_context *ldb, void *mem_ctx, { struct GUID guid; NTSTATUS status; + enum ndr_err_code ndr_err; status = GUID_from_string((const char *)in->data, &guid); if (!NT_STATUS_IS_OK(status)) { return -1; } - status = ndr_push_struct_blob(out, mem_ctx, &guid, - (ndr_push_flags_fn_t)ndr_push_GUID); - if (!NT_STATUS_IS_OK(status)) { + ndr_err = ndr_push_struct_blob(out, mem_ctx, &guid, + (ndr_push_flags_fn_t)ndr_push_GUID); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { return -1; } return 0; @@ -162,10 +164,10 @@ static int ldif_write_objectGUID(struct ldb_context *ldb, void *mem_ctx, const struct ldb_val *in, struct ldb_val *out) { struct GUID guid; - NTSTATUS status; - status = ndr_pull_struct_blob(in, mem_ctx, &guid, - (ndr_pull_flags_fn_t)ndr_pull_GUID); - if (!NT_STATUS_IS_OK(status)) { + enum ndr_err_code ndr_err; + ndr_err = ndr_pull_struct_blob(in, mem_ctx, &guid, + (ndr_pull_flags_fn_t)ndr_pull_GUID); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { return -1; } out->data = (uint8_t *)GUID_string(mem_ctx, &guid); @@ -246,16 +248,16 @@ static int ldif_read_ntSecurityDescriptor(struct ldb_context *ldb, void *mem_ctx const struct ldb_val *in, struct ldb_val *out) { struct security_descriptor *sd; - NTSTATUS status; + enum ndr_err_code ndr_err; sd = sddl_decode(mem_ctx, (const char *)in->data, NULL); if (sd == NULL) { return -1; } - status = ndr_push_struct_blob(out, mem_ctx, sd, - (ndr_push_flags_fn_t)ndr_push_security_descriptor); + ndr_err = ndr_push_struct_blob(out, mem_ctx, sd, + (ndr_push_flags_fn_t)ndr_push_security_descriptor); talloc_free(sd); - if (!NT_STATUS_IS_OK(status)) { + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { return -1; } return 0; @@ -268,15 +270,15 @@ static int ldif_write_ntSecurityDescriptor(struct ldb_context *ldb, void *mem_ct const struct ldb_val *in, struct ldb_val *out) { struct security_descriptor *sd; - NTSTATUS status; + enum ndr_err_code ndr_err; sd = talloc(mem_ctx, struct security_descriptor); if (sd == NULL) { return -1; } - status = ndr_pull_struct_blob(in, sd, sd, - (ndr_pull_flags_fn_t)ndr_pull_security_descriptor); - if (!NT_STATUS_IS_OK(status)) { + ndr_err = ndr_pull_struct_blob(in, sd, sd, + (ndr_pull_flags_fn_t)ndr_pull_security_descriptor); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { talloc_free(sd); return -1; } |