* libs/web: Added Logout support
[project/luci.git] / libs / core / luasrc / sys.lua
index c5c471a75fee5bb9262cdda1e4059c806a54ed36..e5f19f20b82b51eca87a0b5cffaeb921c1710144 100644 (file)
@@ -289,7 +289,7 @@ function user.checkpasswd(username, password)
        local account = user.getuser(username)
        
        -- FIXME: detect testing environment
-       if luci.fs.isfile("/etc/shadow") and not luci.fs.access("/etc/shadow", "r") then
+       if luci.fs.stat("/etc/shadow") and not luci.fs.access("/etc/shadow", "r") then
                return true
        elseif account then
                if account.passwd == "!" then