diff options
author | Steven Barth <steven@midlink.org> | 2008-03-29 18:22:21 +0000 |
---|---|---|
committer | Steven Barth <steven@midlink.org> | 2008-03-29 18:22:21 +0000 |
commit | 1c6c6d62ca665f9d1126b6bad849f7fd584b6a80 (patch) | |
tree | d0f6d975a17d100a52d158a72904d3cbbf964ab4 /src/ffluci/controller/admin/system.lua | |
parent | cdb0b2f0bfaa0e0bb40b1b90581e1376f55fb0df (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/system.lua')
-rw-r--r-- | src/ffluci/controller/admin/system.lua | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/ffluci/controller/admin/system.lua b/src/ffluci/controller/admin/system.lua index df2d981e4..be2d9b6eb 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}) |