From 1c6c6d62ca665f9d1126b6bad849f7fd584b6a80 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Sat, 29 Mar 2008 18:22:21 +0000 Subject: * Replaced luafilesystem with luaposix library * Introduced privilege dropping capability * Automatically drop privileges for "public" to "nobody/nogroup" (as defined in ffluci.uci) --- src/ffluci/controller/admin/system.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/ffluci/controller/admin') 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}) -- cgit v1.2.3