summaryrefslogtreecommitdiff
path: root/source4/dsdb/common
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-12-10 14:33:13 +1100
committerAndrew Tridgell <tridge@samba.org>2009-12-10 17:51:29 +1100
commit261ba40e77192d0354d332a9a72eb94f327cb4e6 (patch)
treea942939d786efd821263da8bccae0befbf5a4a6e /source4/dsdb/common
parent215cc5a9edfbe9b50440266fba72e8f91c64066b (diff)
downloadsamba-261ba40e77192d0354d332a9a72eb94f327cb4e6.tar.gz
samba-261ba40e77192d0354d332a9a72eb94f327cb4e6.tar.bz2
samba-261ba40e77192d0354d332a9a72eb94f327cb4e6.zip
s4-dsdb: use GUID_to_ndr_blob()
Diffstat (limited to 'source4/dsdb/common')
-rw-r--r--source4/dsdb/common/util.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c
index 470406ea55..bfb2f0caa5 100644
--- a/source4/dsdb/common/util.c
+++ b/source4/dsdb/common/util.c
@@ -2289,16 +2289,12 @@ int dsdb_msg_add_guid(struct ldb_message *msg,
const char *attr_name)
{
int ret;
- enum ndr_err_code ndr_err;
struct ldb_val v;
-
+ NTSTATUS status;
TALLOC_CTX *tmp_ctx = talloc_init("dsdb_msg_add_guid");
- ndr_err = ndr_push_struct_blob(&v, tmp_ctx, NULL,
- guid,
- (ndr_push_flags_fn_t)ndr_push_GUID);
-
- if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+ status = GUID_to_ndr_blob(guid, tmp_ctx, &v);
+ if (!NT_STATUS_IS_OK(status)) {
ret = LDB_ERR_OPERATIONS_ERROR;
goto done;
}