[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openldap-devel
Subject:    ldap_get_values() called on binary data - does this return an error, or garbage data?
From:       Graham Leggett <minfrin () sharp ! fm>
Date:       2024-04-03 9:55:26
Message-ID: D818E209-85C2-4D20-BFCC-4E64873BEC55 () sharp ! fm
[Download RAW message or body]

Hi all,

Looking back in time to the definitions of ldap_get_values() and \
ldap_get_values_len(), we are told that "If the attribute values are binary in \
nature, and thus not suitable to be returned as an array of char *'s, the \
ldap_get_values_len() routine can be used instead."

This has been historically vague - first off, what happens if an attempt is made to \
call ldap_get_values() on binary data, do you get an error, or garbage data? The \
source isn't giving me a clear answer.

Second question is how do you know which of ldap_get_values() or \
ldap_get_values_len() to call? Obviously you can manually know this, but I'm \
interested in automated behaviour. What is the canonical way to discover that if you \
queried a jpegPhoto (for example) that the result would be binary?

To be clear, the end goal it to patch the following documentation to make this clear:

https://www.openldap.org/software/man.cgi?query=ldap_get_values&apropos=0&sektion=3&manpath=OpenLDAP+2.4-Release&arch=default&format=html


Regards,
Graham
--


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic