summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorskel <skeliotis@yahoo.ca>2011-05-30 17:32:52 -0400
committerTed Trask <ttrask01@yahoo.com>2011-06-09 11:56:50 -0400
commit65671b48b2f747789e0a237c1506930cf631015e (patch)
tree5d4b6e66a16be5b21f4696fdb07dd12992c0a372
parent1536d0f7c91e11894ff3cbf431cc9a5f84dd5a12 (diff)
downloadacf-openssl-65671b48b2f747789e0a237c1506930cf631015e.tar.bz2
acf-openssl-65671b48b2f747789e0a237c1506930cf631015e.tar.xz
fix permissions on ssl cert creation
-rwxr-xr-x[-rw-r--r--]openssl-controller.lua1
-rwxr-xr-x[-rw-r--r--]openssl-model.lua5
2 files changed, 6 insertions, 0 deletions
diff --git a/openssl-controller.lua b/openssl-controller.lua
index 824e6bd..7d9ae9a 100644..100755
--- a/openssl-controller.lua
+++ b/openssl-controller.lua
@@ -9,6 +9,7 @@ local sslstatus
mvc={}
mvc.pre_exec = function(self)
+ self.model.set_umask()
sslstatus = self.model.getstatus()
if (sslstatus.value.version.errtxt and self.conf.action ~= "status")
or (sslstatus.value.conffile.errtxt and self.conf.action ~= "status" and self.conf.action ~= "editconfigfile" and self.conf.action ~= "checkenvironment")
diff --git a/openssl-model.lua b/openssl-model.lua
index 423809e..b5a84a6 100644..100755
--- a/openssl-model.lua
+++ b/openssl-model.lua
@@ -300,6 +300,11 @@ getstatus = function()
return cfe({ type="group", value={version=version, conffile=conffile, environment=environment, cacert=cacert, cacertcontents=cacertcontents, cakey=cakey}, label="openssl status" })
end
+set_umask = function()
+ return posix.umask("rw-------")
+end
+
+
getreqdefaults = function()
local defaults = getdefaults()