summaryrefslogtreecommitdiffhomepage
path: root/src/ffluci/controller/admin
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-03-29 18:22:21 +0000
committerSteven Barth <steven@midlink.org>2008-03-29 18:22:21 +0000
commit1c6c6d62ca665f9d1126b6bad849f7fd584b6a80 (patch)
treed0f6d975a17d100a52d158a72904d3cbbf964ab4 /src/ffluci/controller/admin
parentcdb0b2f0bfaa0e0bb40b1b90581e1376f55fb0df (diff)
* Replaced luafilesystem with luaposix library
* Introduced privilege dropping capability * Automatically drop privileges for "public" to "nobody/nogroup" (as defined in ffluci.uci)
Diffstat (limited to 'src/ffluci/controller/admin')
-rw-r--r--src/ffluci/controller/admin/system.lua5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/ffluci/controller/admin/system.lua b/src/ffluci/controller/admin/system.lua
index df2d981e4c..be2d9b6eb6 100644
--- a/src/ffluci/controller/admin/system.lua
+++ b/src/ffluci/controller/admin/system.lua
@@ -1,6 +1,6 @@
module("ffluci.controller.admin.system", package.seeall)
-require("ffluci.util")
+require("ffluci.sys")
require("ffluci.http")
menu = {
@@ -18,8 +18,7 @@ function action_passwd()
local cm
if p1 or p2 then
- cm = "(echo '"..p1.."';sleep 1;echo '"..p2.."') | passwd root 2>&1"
- msg = ffluci.util.exec(cm)
+ msg = ffluci.sys.user.setpasswd("root", p1, p2)
end
ffluci.template.render("admin_system/passwd", {msg=msg})