From 0d4b0b7b4d538a16e57f7106b6dc878788123333 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 30 Sep 2015 22:49:54 +0200 Subject: increased priority of aliases over real users --- mod_auth_custom/mod_auth_custom.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mod_auth_custom/mod_auth_custom.lua') diff --git a/mod_auth_custom/mod_auth_custom.lua b/mod_auth_custom/mod_auth_custom.lua index cfded11..109f387 100644 --- a/mod_auth_custom/mod_auth_custom.lua +++ b/mod_auth_custom/mod_auth_custom.lua @@ -65,14 +65,14 @@ end function get_sasl_handler() return new_sasl(module.host, { plain_test = function(sasl, username, password, ...) - if is_real_user(username) then - return pam_auth(username, password); - elseif is_alias(username) then + if is_alias(username) then if password == alias_pw(username) then return true, true; else return nil, true; end + elseif is_real_user(username) then + return pam_auth(username, password); else return nil, true; end -- cgit v1.2.3