summaryrefslogtreecommitdiff
path: root/rhnop-server/qlistener.lua
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2011-03-30 13:03:03 (GMT)
committerChristian Pointner <equinox@helsinki.at>2011-03-30 13:03:03 (GMT)
commit5afb26bcce943bfaf40bbdc59251f152aa8602c1 (patch)
tree764839ea66cec348e45d12f9ec075b9d3cc9da61 /rhnop-server/qlistener.lua
parent6035ed149c9f8fa272a92a65ca20bab06c474b2a (diff)
fixed permission problems with posix message queues
Diffstat (limited to 'rhnop-server/qlistener.lua')
-rw-r--r--rhnop-server/qlistener.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/rhnop-server/qlistener.lua b/rhnop-server/qlistener.lua
index 4e96649..783db5e 100644
--- a/rhnop-server/qlistener.lua
+++ b/rhnop-server/qlistener.lua
@@ -21,6 +21,7 @@
local last_cart = nil
+require "posix"
mq = require "mq"
package.path = package.path .. ";" .. rhnoplibdir .. "/?.lua"
@@ -58,7 +59,8 @@ function handle_message(msg)
end
function main_loop()
- local q, err = mq.create(conf.queue_name, "ro")
+ posix.umask("rwxrwxr-x")
+ local q, err = mq.create(conf.queue_name, "ro", "rw-rw----")
if q == nil then
io.stderr:write("creation of message queue failed: " .. err .. "\n")
os.exit(1)