Mercurial > prosody-modules
changeset 871:e4a03e58f896
Log and return failure if user record not found in bind
author | Rob Hoelz <rob@hoelz.ro> |
---|---|
date | Mon, 10 Dec 2012 22:16:18 +0100 |
parents | 13e645340767 |
children | 6fed90021f3c |
files | mod_lib_ldap/ldap.lib.lua |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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);