X-Git-Url: http://git.samba.org/?p=samba.git;a=blobdiff_plain;f=source3%2Flib%2Ftldap_util.c;h=efc37e48e7c52f44840a6b88d78388aeff2f8995;hp=3938fca901f917ca79d7793cd3b61bf77331c4ea;hb=e18610a197aab80a32cae8c1e09b96496679bbad;hpb=a27c39c2c9fd3161f5bf3ae5dba687c8d49519ef diff --git a/source3/lib/tldap_util.c b/source3/lib/tldap_util.c index 3938fca901f..efc37e48e7c 100644 --- a/source3/lib/tldap_util.c +++ b/source3/lib/tldap_util.c @@ -88,11 +88,13 @@ bool tldap_pull_binsid(struct tldap_message *msg, const char *attribute, struct dom_sid *sid) { DATA_BLOB val; + struct sid_parse_ret ret; if (!tldap_get_single_valueblob(msg, attribute, &val)) { return false; } - return sid_parse(val.data, val.length, sid); + ret = sid_parse(val.data, val.length, sid); + return (ret.len != -1); } bool tldap_pull_guid(struct tldap_message *msg, const char *attribute,