Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix ldapsearch command #149

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions common/util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -603,10 +603,11 @@ class Util
{
std::string cmd;
std::pair<int, std::string> ldap_search_result;

// -N: Do not use reverse DNS to canonicalize SASL host name.
// With this flag, ldapsearch uses the IP address directly for identification purposes, rather than trying to resolve it to a hostname.
cmd = std::string( "ldapsearch -o ldif_wrap=no -LLL -Y GSSAPI -H ldap://" ) + fqdn;
cmd += std::string( " -b '" ) + distinguished_name + std::string( "' " ) + search_string;

cmd += std::string( " -N" );
std::cerr << Util::getCurrentTime() << '\t' << "INFO: " << cmd << std::endl;
std::cerr << cmd << std::endl;

Expand Down