Merge pull request #304 from nmav/ocserv-crypt

luci-app-ocserv: uclibc's crypt() doesn't support sha2crypt
This commit is contained in:
Jo-Philipp Wich 2015-03-10 18:55:46 +01:00
commit dd2b05289b

View File

@ -30,7 +30,7 @@ function pwd.write(self, section, value)
pass = value
else
local t = tonumber(nixio.getpid()*os.time())
local salt = "$5$" .. t .. "$"
local salt = "$1$" .. t .. "$"
pass = nixio.crypt(value, salt)
end
Value.write(self, section, pass)