https://github.com/lldap/lldap logo
jensen - Maybe not strictly lldap, but, isn't t...
# troubleshooting
j
Maybe not strictly lldap, but, isn't this a valid search filter?
(&(&(uid=nas_admin)(objectclass=inetOrgPerson)(unix_uid_number=*))(memberOf=uid=nas_users,ou=groups,dc=example,dc=com))
It's built by sssd, and it reports
ldap_search_ext failed: Bad search filter
, testing with ldapsearch reports the same, until I remove the
(unix_uid_number=*)
part, but shouldn't that be valid? I don't see anything in the lldap log, it's not possible that it has rejected it, without anything in the log, right?
a
message has been deleted
n
How are you sending the message? ldapsearch?
j
Yeah
n
Then the error is from before sending the message, ldapsearch refuses it
check your quoting, that the star is not expanded by the shell
j
tried quoting with both double and single quotes, and the print from ldapsearch gives me the same query back in both cases
isn't it a bit odd?
n
It is
It should become a check for whether the attribute exists
t
memberOf=uid=nas_users
is this valid syntax?
n
Good catch, that can't work
j
Pretty sure it is, and it works when I remove the` (unix_uid_number=*)` alone
n
Though it doesn't seem to be the problem
Actually no, that works
Sorry, just a fully qualified DN
Ah!
The underscores
j
Yeah, this works:
(&(&(uid=nas_admin)(objectclass=person)(memberOf=uid=nas_users,ou=groups,dc=apc,dc=dk)))
n
Not a valid part of an attribute name
j
ahhh!
n
LDAP is all camel case (or dash separated)
j
thanks!
will see if sssd will eat it when changed 😄
n
There should be some checks in LLDAP to prevent you from creating bad attributes
Can you open an issue for that?
j
Yes, gimme a sec, will just test with a different name first 🙂
it works in some scenarios, btw, with underscores
n
User names or groups are fine
Not attribute names
j
also when just fetched
part of the response
n
Yeah, I guess it depends who does the validation
AFAIU it's somewhat arbitrary, it's completely compatible with the protocol
j
yeah, that seems likely
there's quite a few regular, hardcoded attributes, with underscores?
like user_id, which I, coincidently, also have in my query... 😂
n
Yes, but they have aliases without underscores
j
uid should work instead, right?
n
Yes
j
Yes, then the query works! 🎉
next problem 🙂