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/dsdb/repl | |
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/dsdb/repl')
-rw-r--r-- | source4/dsdb/repl/drepl_partitions.c | 18 | ||||
-rw-r--r-- | source4/dsdb/repl/replicated_objects.c | 6 |
2 files changed, 14 insertions, 10 deletions
diff --git a/source4/dsdb/repl/drepl_partitions.c b/source4/dsdb/repl/drepl_partitions.c index 8b57320bb1..8c0d8e5897 100644 --- a/source4/dsdb/repl/drepl_partitions.c +++ b/source4/dsdb/repl/drepl_partitions.c @@ -149,15 +149,16 @@ static WERROR dreplsrv_partition_add_source_dsa(struct dreplsrv_service *s, const struct ldb_val *val) { WERROR status; - NTSTATUS nt_status; + enum ndr_err_code ndr_err; struct dreplsrv_partition_source_dsa *source; source = talloc_zero(p, struct dreplsrv_partition_source_dsa); W_ERROR_HAVE_NO_MEMORY(source); - nt_status = ndr_pull_struct_blob(val, source, &source->_repsFromBlob, - (ndr_pull_flags_fn_t)ndr_pull_repsFromToBlob); - if (!NT_STATUS_IS_OK(nt_status)) { + ndr_err = ndr_pull_struct_blob(val, source, &source->_repsFromBlob, + (ndr_pull_flags_fn_t)ndr_pull_repsFromToBlob); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + NTSTATUS nt_status = ndr_map_error2ntstatus(ndr_err); return ntstatus_to_werror(nt_status); } /* NDR_PRINT_DEBUG(repsFromToBlob, &source->_repsFromBlob); */ @@ -180,7 +181,6 @@ static WERROR dreplsrv_refresh_partition(struct dreplsrv_service *s, TALLOC_CTX *mem_ctx) { WERROR status; - NTSTATUS nt_status; const struct ldb_val *ouv_value; struct replUpToDateVectorBlob ouv; struct dom_sid *nc_sid; @@ -220,9 +220,11 @@ static WERROR dreplsrv_refresh_partition(struct dreplsrv_service *s, ouv_value = ldb_msg_find_ldb_val(r->msgs[0], "replUpToDateVector"); if (ouv_value) { - nt_status = ndr_pull_struct_blob(ouv_value, mem_ctx, &ouv, - (ndr_pull_flags_fn_t)ndr_pull_replUpToDateVectorBlob); - if (!NT_STATUS_IS_OK(nt_status)) { + enum ndr_err_code ndr_err; + ndr_err = ndr_pull_struct_blob(ouv_value, mem_ctx, &ouv, + (ndr_pull_flags_fn_t)ndr_pull_replUpToDateVectorBlob); + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + NTSTATUS nt_status = ndr_map_error2ntstatus(ndr_err); return ntstatus_to_werror(nt_status); } /* NDR_PRINT_DEBUG(replUpToDateVectorBlob, &ouv); */ diff --git a/source4/dsdb/repl/replicated_objects.c b/source4/dsdb/repl/replicated_objects.c index 6f34ac8556..c47108559d 100644 --- a/source4/dsdb/repl/replicated_objects.c +++ b/source4/dsdb/repl/replicated_objects.c @@ -195,6 +195,7 @@ static WERROR dsdb_convert_object(struct ldb_context *ldb, struct dsdb_extended_replicated_object *out) { NTSTATUS nt_status; + enum ndr_err_code ndr_err; WERROR status; uint32_t i; struct ldb_message *msg; @@ -321,9 +322,10 @@ static WERROR dsdb_convert_object(struct ldb_context *ldb, whenChanged_s = ldb_timestring(msg, whenChanged_t); W_ERROR_HAVE_NO_MEMORY(whenChanged_s); - nt_status = ndr_push_struct_blob(&guid_value, msg, &in->object.identifier->guid, + ndr_err = ndr_push_struct_blob(&guid_value, msg, &in->object.identifier->guid, (ndr_push_flags_fn_t)ndr_push_GUID); - if (!NT_STATUS_IS_OK(nt_status)) { + if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + nt_status = ndr_map_error2ntstatus(ndr_err); return ntstatus_to_werror(nt_status); } |