24 lines
732 B
Plaintext
24 lines
732 B
Plaintext
$OpenBSD: patch-src_xavante_server_lua,v 1.1 2005/09/06 16:51:44 pedro Exp $
|
|
--- src/xavante/server.lua.orig Wed Jun 22 15:24:49 2005
|
|
+++ src/xavante/server.lua Thu Aug 18 13:50:52 2005
|
|
@@ -14,6 +14,7 @@
|
|
module ("xavante")
|
|
|
|
require "copas"
|
|
+require "posix"
|
|
require "xavante.httpd"
|
|
|
|
-- Meta information is public even begining with an "_"
|
|
@@ -49,6 +50,11 @@ function HTTP(config)
|
|
config.server = config.server or {host = "*", port = 80}
|
|
|
|
xavante.httpd.register(config.server.host, config.server.port, _VERSION)
|
|
+
|
|
+ -- Drop privileges.
|
|
+ assert(posix.setgid(552))
|
|
+ assert(posix.setuid(552))
|
|
+
|
|
if config.defaultHost then
|
|
_addRules(config.defaultHost.rules, "_")
|
|
end
|