summaryrefslogtreecommitdiff
path: root/mod_auth_custom
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2015-09-30 16:52:38 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2015-09-30 16:52:38 +0200
commit9148979197b76102b753635ecad615f25cb61cb1 (patch)
tree7f78490b4ddc5698118674672e58a9f5acdfce7c /mod_auth_custom
parenteb68d998a10b436194cc81f9a64620606b1bd216 (diff)
downloadprosody_auth-9148979197b76102b753635ecad615f25cb61cb1.tar
prosody_auth-9148979197b76102b753635ecad615f25cb61cb1.tar.gz
prosody_auth-9148979197b76102b753635ecad615f25cb61cb1.tar.bz2
prosody_auth-9148979197b76102b753635ecad615f25cb61cb1.tar.xz
prosody_auth-9148979197b76102b753635ecad615f25cb61cb1.zip
switch to newer posix semantic
Diffstat (limited to 'mod_auth_custom')
-rw-r--r--mod_auth_custom/mod_auth_custom.lua12
1 files changed, 8 insertions, 4 deletions
diff --git a/mod_auth_custom/mod_auth_custom.lua b/mod_auth_custom/mod_auth_custom.lua
index e917b6a..9b4872e 100644
--- a/mod_auth_custom/mod_auth_custom.lua
+++ b/mod_auth_custom/mod_auth_custom.lua
@@ -1,14 +1,18 @@
1local posix = require "posix.grp"; 1local posix = require "posix.grp";
2local pam = require "pam"; 2local pam = require "pam";
3local new_sasl = require "util.sasl".new; 3local new_sasl = require "util.sasl".new;
4 4
5function user_exists(username) 5function is_real_user(username)
6 for i,v in ipairs(posix.getgroup("xmpp")) do 6 for i,v in ipairs(posix.getgrnam("xmpp").gr_mem) do
7 if username == v then 7 if username == v then
8 return true; 8 return true;
9 end 9 end
10 end 10 end
11 return false; 11 return false;
12end
13
14function user_exists(username)
15 return is_real_user(username);
12end 16end
13 17
14function test_password(username, password) 18function test_password(username, password)