mod_posix: Set umask to 'umask' from the config, or 027

Sun, 10 Jan 2010 22:15:15 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Sun, 10 Jan 2010 22:15:15 +0000
changeset 2440
11e3d16a128f
parent 2439
511ba389147a
child 2441
d72078946a16

mod_posix: Set umask to 'umask' from the config, or 027

plugins/mod_posix.lua file | annotate | diff | comparison | revisions
--- a/plugins/mod_posix.lua	Sun Jan 10 22:14:44 2010 +0000
+++ b/plugins/mod_posix.lua	Sun Jan 10 22:15:15 2010 +0000
@@ -23,6 +23,9 @@
 
 module.host = "*"; -- we're a global module
 
+local umask = module:get_option("umask") or "027";
+pposix.umask(umask);
+
 -- Allow switching away from root, some people like strange ports.
 module:add_event_hook("server-started", function ()
 		local uid = module:get_option("setuid");

mercurial