# HG changeset patch # User Rob Hoelz # Date 1355174178 -3600 # Node ID e4a03e58f896fffa95dfd29eb83ec5107c5c0661 # Parent 13e645340767cbd303bf0fb6caaad149692ab3dd Log and return failure if user record not found in bind diff -r 13e645340767 -r e4a03e58f896 mod_lib_ldap/ldap.lib.lua --- a/mod_lib_ldap/ldap.lib.lua Mon Dec 10 22:15:27 2012 +0100 +++ b/mod_lib_ldap/ldap.lib.lua Mon Dec 10 22:16:18 2012 +0100 @@ -188,6 +188,9 @@ if who then who = who.dn; module:log('debug', '_M.bind - who: %s', who); + else + module:log('debug', '_M.bind - no DN found for username = %s', username); + return nil, format('no DN found for username = %s', username); end local conn, err = ldap.open_simple(params.hostname, who, password, params.use_tls);