summaryrefslogtreecommitdiffstats
path: root/squid-controller.lua
diff options
context:
space:
mode:
authorAndreas Brodmann <andreas.brodmann@gmail.com>2008-01-07 16:14:57 +0000
committerAndreas Brodmann <andreas.brodmann@gmail.com>2008-01-07 16:14:57 +0000
commit9de83d7f39611b7660c93d467c89580d09103e16 (patch)
tree3665eb31bd5a2a4c59413928b8ff61435b3d5a48 /squid-controller.lua
parentf17d7604c6ece24b395d78210b9fd68d2525f083 (diff)
downloadacf-squid-9de83d7f39611b7660c93d467c89580d09103e16.tar.bz2
acf-squid-9de83d7f39611b7660c93d467c89580d09103e16.tar.xz
updated /acf/squid digest auth / ntlm auth / special access
git-svn-id: svn://svn.alpinelinux.org/acf/squid/trunk@497 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'squid-controller.lua')
-rw-r--r--squid-controller.lua77
1 files changed, 77 insertions, 0 deletions
diff --git a/squid-controller.lua b/squid-controller.lua
index c37b05b..84e60dd 100644
--- a/squid-controller.lua
+++ b/squid-controller.lua
@@ -123,6 +123,83 @@ advanced = function( self )
return ( cfe ({ option = option, service = service }) )
end
+digest = function( self )
+
+ local option = { script = ENV["SCRIPT_NAME"],
+ prefix = self.conf.prefix,
+ controller = self.conf.controller,
+ action = self.conf.action,
+ extra = ""
+ }
+
+ local service = { message="", status="", config="" }
+
+ if self.clientdata.cmd then
+ if self.clientdata.cmd == "save" then
+ service.message = self.model.update_digest_userlist( self.clientdata.userlist )
+ end
+ end
+
+ service.config = self.model.get_digest_userlist()
+
+ return ( cfe ({ option = option, service = service }) )
+end
+
+ntlm = function( self )
+
+ local option = { script = ENV["SCRIPT_NAME"],
+ prefix = self.conf.prefix,
+ controller = self.conf.controller,
+ action = self.conf.action,
+ extra = ""
+ }
+
+ local service = { message="", status="", config="" }
+ if self.clientdata.srvcmd then
+ local srvcmd = self.clientdata.srvcmd
+ if srvcmd == "start" or srvcmd == "stop" or srvcmd == "restart" then
+ service.message = self.model.service_control_winbindd( srvcmd )
+ end
+ end
+
+ if self.clientdata.cmd then
+ if self.clientdata.cmd == "save" then
+ service.message = self.model.update_winbindd_config( self.clientdata.config )
+ end
+ end
+
+ service.status = self.model.get_status_winbindd()
+ service.config = self.model.get_winbindd_config()
+
+ return ( cfe ({ option = option, service = service }) )
+end
+
+saccess = function( self )
+
+ local option = { script = ENV["SCRIPT_NAME"],
+ prefix = self.conf.prefix,
+ controller = self.conf.controller,
+ action = self.conf.action,
+ extra = ""
+ }
+
+ local service = { message="", status="", config="" }
+
+ if self.clientdata.cmd then
+ if self.clientdata.cmd == "save" then
+ local config = {}
+ config.s_ip = self.clientdata.s_ip
+ config.s_browser = self.clientdata.s_browser
+ config.s_domain = self.clientdata.s_domain
+ service.message = self.model.update_saccess( config )
+ end
+ end
+
+ service.config = self.model.get_saccess()
+
+ return ( cfe ({ option = option, service = service }) )
+end
+
cfilter = function( self )
local option = { script = ENV["SCRIPT_NAME"],