summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2009-08-14 10:32:30 +0000
committerTed Trask <ttrask01@yahoo.com>2009-08-14 10:32:30 +0000
commit50844c9aa17d26a8da03abbef8f9ad6ebf6fdaa7 (patch)
treea9d390104445ee699b3e2176af7c9fdcd034b8bd
parent4721183f3caf01dbb9e0b55172c94f9e892170ef (diff)
downloadacf-alpine-baselayout-50844c9aa17d26a8da03abbef8f9ad6ebf6fdaa7.tar.bz2
acf-alpine-baselayout-50844c9aa17d26a8da03abbef8f9ad6ebf6fdaa7.tar.xz
Fixed bug to allow arbitrary characters in system password, bumped to 0.5.3
-rw-r--r--Makefile2
-rw-r--r--password-model.lua2
2 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 61fb3d7..ec78402 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
APP_NAME=alpine-baselayout
PACKAGE=acf-$(APP_NAME)
-VERSION=0.5.2
+VERSION=0.5.3
APP_DIST=\
alpine-baselayout.roles \
diff --git a/password-model.lua b/password-model.lua
index accab05..f66c74b 100644
--- a/password-model.lua
+++ b/password-model.lua
@@ -26,7 +26,7 @@ update_password = function (pw)
end
if success then
- local f = io.popen("/usr/bin/cryptpw " .. format.escapespecialcharacters(pw.value.password.value))
+ local f = io.popen("/usr/bin/cryptpw '" .. string.gsub(pw.value.password.value, "'", "'\\''") .. "'")
local newpass = f:read("*l")
f:close()
local new = string.gsub(filecontent, "(\n"..pw.value.user.value..":)[^:]*", "%1"..newpass)