This function returns one of the following values:
0 for success if role_dn is present in entry_to_check and present is set to non-zero. Otherwise it is 0.
non-zero (error condition) if the presence of the role is undetermined.