inejge / ldap3

A pure-Rust LDAP library using the Tokio stack
Apache License 2.0
226 stars 39 forks source link

Question: rootDSE? #101

Closed rasta-mouse closed 1 year ago

rasta-mouse commented 1 year ago

Is there anything in this library that can help get the rootDSE of a domain? Rather than having to hardcode the search base like in all the examples?

inejge commented 1 year ago

RFC 4512, Section 5.1, explicitly defines the root DSE as having a zero-length DN, so there is no harm in hard-coding it. The same section also spells out the construction of a Search to retrieve its attributes. I see no need for a helper function for that purpose. (I'm aware that some LDAP SDKs have a dedicated getRootDSE() or a similar method. I don't wish to emulate them.)