KxSystems / ldap

Kdb+ integration with LDAP
https://code.kx.com/q
Apache License 2.0
5 stars 5 forks source link

Extra protection on kdbldap_init #108

Open sshanks-kx opened 4 years ago

sshanks-kx commented 4 years ago

It might be work checking that the sess idx isn't already in use by calling getSession(idx) and returning a error is it doesn't return NULL. Alternatively, rather than having the user specifying the sess idx to kdbldap_init(), you could generate a unique value, e.g. use a session counter that gets incremented every time a session is added (but is not decremented on session remove)

sshanks-kx commented 4 years ago

init currently returns an ldap error code - so an error code due to session already used may have to use an ldap error code to exist in current mechanism