summaryrefslogtreecommitdiff
path: root/rhnop-server/noprml
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/noprml
parent6035ed149c9f8fa272a92a65ca20bab06c474b2a (diff)
fixed permission problems with posix message queues
Diffstat (limited to 'rhnop-server/noprml')
-rwxr-xr-xrhnop-server/noprml4
1 files changed, 3 insertions, 1 deletions
diff --git a/rhnop-server/noprml b/rhnop-server/noprml
index 31e8ab7..9c572b2 100755
--- a/rhnop-server/noprml
+++ b/rhnop-server/noprml
@@ -27,6 +27,7 @@
local queue_name = "/rhnop"
+require "posix"
mq = require "mq"
-- reading timestamp (milliseconds since epoch)
@@ -43,7 +44,8 @@ if #arg < 4 then
end
-- open message queue
-local q, err = mq.create(queue_name, "wo")
+posix.umask("rwxrwxr-x")
+local q, err = mq.create(queue_name, "wo", "rw-rw----")
if q == nil then
io.stderr:write("creation of message queue failed: " .. err .. "\n")
os.exit(1)