diff options
author | Volker Lendecke <vl@samba.org> | 2015-08-24 16:46:12 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2015-08-26 21:41:12 +0200 |
commit | aa38175e00d58e0708e06b7c1e3a1a8690569a0a (patch) | |
tree | 6a739dd4b8fc551bb3bbc4bf0156ac7eddd007ac /source4 | |
parent | 4a442e2eb7e0b2c62bcc355d461dfd1aaf8c26e8 (diff) | |
download | samba-aa38175e00d58e0708e06b7c1e3a1a8690569a0a.tar.gz |
lib: Convert callers of sid_blob_parse to sid_parse
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source4')
-rw-r--r-- | source4/dsdb/common/util.c | 2 | ||||
-rw-r--r-- | source4/torture/unix/whoami.c | 16 |
2 files changed, 14 insertions, 4 deletions
diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c index 6447d06ef6a..c1b5d5a77f0 100644 --- a/source4/dsdb/common/util.c +++ b/source4/dsdb/common/util.c @@ -360,7 +360,7 @@ struct dom_sid *samdb_result_dom_sid(TALLOC_CTX *mem_ctx, const struct ldb_messa if (sid == NULL) { return NULL; } - ok = sid_blob_parse(*v, sid); + ok = sid_parse(v->data, v->length, sid); if (!ok) { talloc_free(sid); return NULL; diff --git a/source4/torture/unix/whoami.c b/source4/torture/unix/whoami.c index 00109eb35a2..53921d49201 100644 --- a/source4/torture/unix/whoami.c +++ b/source4/torture/unix/whoami.c @@ -300,7 +300,10 @@ static bool test_against_ldap(struct torture_context *torture, struct ldb_contex struct dom_sid *sid = talloc(torture, struct dom_sid); torture_assert(torture, sid != NULL, "talloc failed"); - torture_assert(torture, sid_blob_parse(el->values[i], sid), "sid parse failed"); + torture_assert(torture, + sid_parse(el->values[i].data, + el->values[i].length, sid), + "sid parse failed"); torture_assert_str_equal(torture, dom_sid_string(sid, sid), dom_sid_string(sid, whoami->sid_list[i]), "SID from LDAP and SID from CIFS does not match!"); talloc_free(sid); } @@ -311,13 +314,20 @@ static bool test_against_ldap(struct torture_context *torture, struct ldb_contex struct dom_sid *dc_sids = talloc_array(torture, struct dom_sid, el->num_values); struct dom_sid *member_sids = talloc_array(torture, struct dom_sid, whoami->num_sids); torture_assert(torture, user_sid != NULL, "talloc failed"); - torture_assert(torture, sid_blob_parse(el->values[0], user_sid), "sid parse failed"); + torture_assert(torture, sid_parse(el->values[0].data, + el->values[0].length, + user_sid), + "sid parse failed"); torture_assert_ntstatus_equal(torture, dom_sid_split_rid(torture, user_sid, &dom_sid, NULL), NT_STATUS_OK, "failed to split domain SID from user SID"); for (i = 0; i < el->num_values; i++) { struct dom_sid *sid = talloc(dc_sids, struct dom_sid); torture_assert(torture, sid != NULL, "talloc failed"); - torture_assert(torture, sid_blob_parse(el->values[i], sid), "sid parse failed"); + torture_assert(torture, + sid_parse(el->values[i].data, + el->values[i].length, + sid), + "sid parse failed"); if (dom_sid_in_domain(dom_sid, sid)) { dc_sids[num_domain_sids_dc] = *sid; num_domain_sids_dc++; |