From de421d8826e9b0595350e15afa7c8bb1fd18d301 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 24 Aug 2015 16:50:44 +0200 Subject: lib: Remove unused sid_blob_parse Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- libcli/security/dom_sid.h | 1 - libcli/security/util_sid.c | 20 ++++++-------------- 2 files changed, 6 insertions(+), 15 deletions(-) (limited to 'libcli') diff --git a/libcli/security/dom_sid.h b/libcli/security/dom_sid.h index 86bbbdf0398..990a4c491d3 100644 --- a/libcli/security/dom_sid.h +++ b/libcli/security/dom_sid.h @@ -93,7 +93,6 @@ bool sid_split_rid(struct dom_sid *sid, uint32_t *rid); bool sid_peek_rid(const struct dom_sid *sid, uint32_t *rid); bool sid_peek_check_rid(const struct dom_sid *exp_dom_sid, const struct dom_sid *sid, uint32_t *rid); void sid_copy(struct dom_sid *dst, const struct dom_sid *src); -bool sid_blob_parse(DATA_BLOB in, struct dom_sid *sid); bool sid_parse(const uint8_t *inbuf, size_t len, struct dom_sid *sid); int sid_compare_domain(const struct dom_sid *sid1, const struct dom_sid *sid2); NTSTATUS add_sid_to_array(TALLOC_CTX *mem_ctx, const struct dom_sid *sid, diff --git a/libcli/security/util_sid.c b/libcli/security/util_sid.c index 7f628562123..33998018732 100644 --- a/libcli/security/util_sid.c +++ b/libcli/security/util_sid.c @@ -254,30 +254,22 @@ void sid_copy(struct dom_sid *dst, const struct dom_sid *src) } /***************************************************************** - Parse a on-the-wire SID (in a DATA_BLOB) to a struct dom_sid. + Parse a on-the-wire SID to a struct dom_sid. *****************************************************************/ -bool sid_blob_parse(DATA_BLOB in, struct dom_sid *sid) +bool sid_parse(const uint8_t *inbuf, size_t len, struct dom_sid *sid) { + DATA_BLOB in = data_blob_const(inbuf, len); enum ndr_err_code ndr_err; - ndr_err = ndr_pull_struct_blob_all(&in, NULL, sid, - (ndr_pull_flags_fn_t)ndr_pull_dom_sid); + + ndr_err = ndr_pull_struct_blob_all( + &in, NULL, sid, (ndr_pull_flags_fn_t)ndr_pull_dom_sid); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { return false; } return true; } -/***************************************************************** - Parse a on-the-wire SID to a struct dom_sid. -*****************************************************************/ - -bool sid_parse(const uint8_t *inbuf, size_t len, struct dom_sid *sid) -{ - DATA_BLOB in = data_blob_const(inbuf, len); - return sid_blob_parse(in, sid); -} - /***************************************************************** See if 2 SIDs are in the same domain this just compares the leading sub-auths -- cgit v1.2.1