diff options
author | Andrew Bartlett <abartlet@samba.org> | 2010-12-15 15:48:00 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2010-12-16 15:54:36 +1100 |
commit | eda1972b68819b66bd11d6286753f03d083694ec (patch) | |
tree | c7acd9cc1c5445a9120a042801e20a9997775954 /source4 | |
parent | 4a4d8e4b0fae1288cbdf6c8a95a2863c84676106 (diff) | |
download | samba-eda1972b68819b66bd11d6286753f03d083694ec.tar.gz samba-eda1972b68819b66bd11d6286753f03d083694ec.tar.bz2 samba-eda1972b68819b66bd11d6286753f03d083694ec.zip |
s4-dsdb Use sid_blob_parse()
Diffstat (limited to 'source4')
-rw-r--r-- | source4/dsdb/common/util.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c index e1aa89801e..b157ba9c9c 100644 --- a/source4/dsdb/common/util.c +++ b/source4/dsdb/common/util.c @@ -348,6 +348,7 @@ uint32_t samdb_result_rid_from_sid(TALLOC_CTX *mem_ctx, const struct ldb_message struct dom_sid *samdb_result_dom_sid(TALLOC_CTX *mem_ctx, const struct ldb_message *msg, const char *attr) { + bool ok; const struct ldb_val *v; struct dom_sid *sid; enum ndr_err_code ndr_err; @@ -359,9 +360,8 @@ struct dom_sid *samdb_result_dom_sid(TALLOC_CTX *mem_ctx, const struct ldb_messa if (sid == NULL) { return NULL; } - ndr_err = ndr_pull_struct_blob(v, sid, sid, - (ndr_pull_flags_fn_t)ndr_pull_dom_sid); - if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + ok = sid_blob_parse(*v, sid); + if (!ok) { talloc_free(sid); return NULL; } |