diff options
author | Andrew Tridgell <tridge@samba.org> | 2009-12-10 14:33:13 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2009-12-10 17:51:29 +1100 |
commit | 261ba40e77192d0354d332a9a72eb94f327cb4e6 (patch) | |
tree | a942939d786efd821263da8bccae0befbf5a4a6e /source4/dsdb/samdb/ldb_modules/simple_ldap_map.c | |
parent | 215cc5a9edfbe9b50440266fba72e8f91c64066b (diff) | |
download | samba-261ba40e77192d0354d332a9a72eb94f327cb4e6.tar.gz samba-261ba40e77192d0354d332a9a72eb94f327cb4e6.tar.bz2 samba-261ba40e77192d0354d332a9a72eb94f327cb4e6.zip |
s4-dsdb: use GUID_to_ndr_blob()
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules/simple_ldap_map.c')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/simple_ldap_map.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/simple_ldap_map.c b/source4/dsdb/samdb/ldb_modules/simple_ldap_map.c index 8d3c78d37f..43402248c0 100644 --- a/source4/dsdb/samdb/ldb_modules/simple_ldap_map.c +++ b/source4/dsdb/samdb/ldb_modules/simple_ldap_map.c @@ -44,16 +44,14 @@ static struct ldb_val encode_guid(struct ldb_module *module, TALLOC_CTX *ctx, co { struct GUID guid; NTSTATUS status = GUID_from_data_blob(val, &guid); - enum ndr_err_code ndr_err; struct ldb_val out = data_blob(NULL, 0); if (!NT_STATUS_IS_OK(status)) { return out; } - ndr_err = ndr_push_struct_blob(&out, ctx, NULL, &guid, - (ndr_push_flags_fn_t)ndr_push_GUID); - if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { - return out; + status = GUID_to_ndr_blob(&guid, ctx, &out); + if (!NT_STATUS_IS_OK(status)) { + return data_blob(NULL, 0); } return out; @@ -74,16 +72,14 @@ static struct ldb_val encode_ns_guid(struct ldb_module *module, TALLOC_CTX *ctx, { struct GUID guid; NTSTATUS status = NS_GUID_from_string((char *)val->data, &guid); - enum ndr_err_code ndr_err; struct ldb_val out = data_blob(NULL, 0); if (!NT_STATUS_IS_OK(status)) { return out; } - ndr_err = ndr_push_struct_blob(&out, ctx, NULL, &guid, - (ndr_push_flags_fn_t)ndr_push_GUID); - if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { - return out; + status = GUID_to_ndr_blob(&guid, ctx, &out); + if (!NT_STATUS_IS_OK(status)) { + return data_blob(NULL, 0); } return out; |