summaryrefslogtreecommitdiffhomepage
path: root/libs/sys
diff options
context:
space:
mode:
Diffstat (limited to 'libs/sys')
-rw-r--r--libs/sys/luasrc/sys.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/sys/luasrc/sys.lua b/libs/sys/luasrc/sys.lua
index 6d000ae6e..d4242a333 100644
--- a/libs/sys/luasrc/sys.lua
+++ b/libs/sys/luasrc/sys.lua
@@ -604,7 +604,7 @@ end
-- @return Boolean indicating wheather the passwords are equal
function user.checkpasswd(username, pass)
local pwh = user.getpasswd(username)
- if not pwh or nixio.crypt(pass, pwh) ~= pwh then
+ if pwh and nixio.crypt(pass, pwh) ~= pwh then
return false
else
return true