lib: Make sid_parse return the parsed length
[samba.git] / source3 / lib / smbldap.c
index 5a67ab79058dd0cec331d12c86b7b99370731532..cdd350fffa1e23051594b7efbedc197456472085 100644 (file)
@@ -278,7 +278,7 @@ void smbldap_set_bind_callback(struct smbldap_state *state,
                       struct dom_sid *sid)
 {
        DATA_BLOB blob;
-       bool ret;
+       struct sid_parse_ret ret;
 
        if (!smbldap_talloc_single_blob(talloc_tos(), ld, msg, attrib,
                                        &blob)) {
@@ -286,7 +286,7 @@ void smbldap_set_bind_callback(struct smbldap_state *state,
        }
        ret = sid_parse(blob.data, blob.length, sid);
        TALLOC_FREE(blob.data);
-       return ret;
+       return (ret.len != -1);
 }
 
  static int ldapmsg_destructor(LDAPMessage **result) {