bearded / ruby-ldap

Ruby/LDAP is an extension library for Ruby. It provides the interface to some LDAP libraries (e.g. OpenLDAP, Netscape SDK and Active Directory). The common API for application development is described in RFC1823 and is supported by Ruby/LDAP.
http://rubyforge.org/projects/ruby-ldap/
Other
66 stars 34 forks source link

The gem always canonicalizes the realm for GSSAPI with reverse DNS lookups #20

Closed pwillred closed 11 years ago

pwillred commented 11 years ago

Note: This patch is branched off of pull request 19.

Currently, ruby-ldap always canonicalizes the hostname for SASL binds. If reverse DNS is not properly set up or cannot be modified, this can result in SASL attempting to make requests using an incorrect realm.

This patch adds one additional argument to rb_ldap_conn_sasl_bind to include one final hash for general LDAP options. Currently, including the symbol :nocanon in the hash will result in LDAP not canonicalizing the hostname. This will cause similar behavior to adding the flag "-N" to ldapsearch. See ldap_set_option(3) for more information.

ghost commented 11 years ago

please rebase this pull request

pwillred commented 11 years ago

Sorry about the spurious close. I've rebased the no_canon branch off of your latest merge to master. How does the current version look?

ghost commented 11 years ago

Looks good, thank you! :+1: