From cc1007d4718984424133dc0e690ce8fda0558091 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Wed, 27 Jun 2012 13:53:46 +0000 Subject: [PATCH] luci-0.10: merge r8792 --- contrib/package/luci/Makefile | 1 + libs/sys/luasrc/sys.lua | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/package/luci/Makefile b/contrib/package/luci/Makefile index 362f2ac540..3c90d49f04 100644 --- a/contrib/package/luci/Makefile +++ b/contrib/package/luci/Makefile @@ -557,6 +557,7 @@ $(eval $(call translation,malay,Malay (by Teow Wai Chet))) $(eval $(call translation,norwegian,Norwegian (by Lars Hardy))) $(eval $(call translation,hebrew,Hebrew)) $(eval $(call translation,romanian,Romanian)) +$(eval $(call translation,romanian2,Romanian2)) ### Collections ### diff --git a/libs/sys/luasrc/sys.lua b/libs/sys/luasrc/sys.lua index 9c30f55f6c..75b6cb4a2d 100644 --- a/libs/sys/luasrc/sys.lua +++ b/libs/sys/luasrc/sys.lua @@ -612,11 +612,10 @@ end -- @return Boolean indicating wheather the passwords are equal function user.checkpasswd(username, pass) local pwh = user.getpasswd(username) - if pwh and nixio.crypt(pass, pwh) ~= pwh then - return false - else - return true + if pwh then + return (nixio.crypt(pass, pwh) == pwh) end + return false end --- Change the password of given user. -- 2.30.2