1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-26 21:57:41 +03:00

lib: Remove unused sid_blob_parse

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Volker Lendecke 2015-08-24 16:50:44 +02:00 committed by Jeremy Allison
parent aa38175e00
commit de421d8826
2 changed files with 8 additions and 17 deletions

View File

@ -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,

View File

@ -253,21 +253,6 @@ void sid_copy(struct dom_sid *dst, const struct dom_sid *src)
dst->sub_auths[i] = src->sub_auths[i];
}
/*****************************************************************
Parse a on-the-wire SID (in a DATA_BLOB) to a struct dom_sid.
*****************************************************************/
bool sid_blob_parse(DATA_BLOB in, struct dom_sid *sid)
{
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);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
return false;
}
return true;
}
/*****************************************************************
Parse a on-the-wire SID to a struct dom_sid.
*****************************************************************/
@ -275,7 +260,14 @@ 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);
return sid_blob_parse(in, sid);
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);
if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
return false;
}
return true;
}
/*****************************************************************