Question about LDAP binary attributes
Hello. I'm trying to get some attributes from LDAP including binary like objectSid.
Documentation said that following setting can help with it: "Binary attributes: regular expression matching binary attributes (see Net::LDAP documentation)."
I set in Binary Attributes following regexp: qr/^objectSid$/ but see no changes. Log:
[Thu Jan 14 14:49:39.471802 2016] [perl:debug] [pid 6027] CGI.pm(115): Lemonldap::NG::Manager: Scan subnode ldapRaw
[Thu Jan 14 14:49:39.471822 2016] [perl:debug] [pid 6027] CGI.pm(115): Lemonldap::NG::Manager: Processing to node: generalParameters/authParams/ldapParams/ldapConnection/ldapRaw
[Thu Jan 14 14:49:39.471836 2016] [perl:debug] [pid 6027] CGI.pm(115): Lemonldap::NG::Manager: Look for key generalParameters/authParams/ldapParams/ldapConnection/ldapRaw in configuration
[Thu Jan 14 14:49:39.472166 2016] [perl:debug] [pid 6027] CGI.pm(115): Lemonldap::NG::Manager: Processing to configuration node: text:/ldapRaw
[Thu Jan 14 14:49:48.993776 2016] [perl:debug] [pid 6051] CGI.pm(115): Lemonldap::NG::Manager: Upload process for attribute ldapRaw (id: text_li_L2xkYXBSYXc1 / value: qr/^objectSid$/)
[Thu Jan 14 14:49:48.993802 2016] [perl:debug] [pid 6051] CGI.pm(115): Lemonldap::NG::Manager: id decoded into ldapRaw
[Thu Jan 14 14:49:48.993819 2016] [perl:debug] [pid 6051] CGI.pm(115): Lemonldap::NG::Manager: id transformed into ldapRaw
[Thu Jan 14 14:49:48.993833 2016] [perl:debug] [pid 6051] CGI.pm(115): Lemonldap::NG::Manager: getConfTests: get id ldapRaw
[Thu Jan 14 14:49:48.994591 2016] [perl:debug] [pid 6051] CGI.pm(115): Lemonldap::NG::Manager: getConfTests: return ldapRaw
[Thu Jan 14 14:49:48.994617 2016] [perl:debug] [pid 6051] CGI.pm(115): Lemonldap::NG::Manager: setKeyToH: key ldapRaw / k2 / value qr/^objectSid$/
[Thu Jan 14 14:49:48.994636 2016] [perl:debug] [pid 6051] CGI.pm(115): Lemonldap::NG::Manager: setKeyToH: set qr/^objectSid$/ in key ldapRaw
{code}
Also I'm try to use custom function:
{code:perl}
sub sid2string {
my $url=shift;
my $binary_sid = shift;
my $sid = shift;
my($sid_rev, $num_auths, $id1, $id2, @ids) = unpack(" H2 H2 n N V*", $binary_sid);
my $sid_string = join("-", "S", hex($sid_rev), ($id1<<32)+$id2, @ids);
# my $sid_string = join("-", "S", @ids);
return $sid_string;
}
But objectSid value from that function not the same as real objectSid from AD.