summaryrefslogtreecommitdiff
path: root/rhnop-server
diff options
context:
space:
mode:
Diffstat (limited to 'rhnop-server')
-rw-r--r--rhnop-server/debian/control2
-rwxr-xr-xrhnop-server/debian/rules2
-rwxr-xr-xrhnop-server/noprml4
-rw-r--r--rhnop-server/qlistener.lua4
4 files changed, 8 insertions, 4 deletions
diff --git a/rhnop-server/debian/control b/rhnop-server/debian/control
index eafbd92..2e99c2e 100644
--- a/rhnop-server/debian/control
+++ b/rhnop-server/debian/control
@@ -8,7 +8,7 @@ Homepage: http://www.helsinki.at/
Package: rhnop-server
Architecture: any
-Depends: ${shlibs:Depends}, adduser, liblua5.1-mq, liblua5.1-socket2, liblua5.1-sql-mysql-2
+Depends: ${shlibs:Depends}, adduser, liblua5.1-mq, liblua5.1-socket2, liblua5.1-sql-mysql-2, liblua5.1-posix1
Description: Radio Helsinki now playing information system - server
The Radio Helsinki now playing information system gathers the
now playing info into an mysql database for further processing.
diff --git a/rhnop-server/debian/rules b/rhnop-server/debian/rules
index 83983e1..d24a35f 100755
--- a/rhnop-server/debian/rules
+++ b/rhnop-server/debian/rules
@@ -26,7 +26,7 @@ clean:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
- $(MAKE) clean
+ $(MAKE) distclean
dh_clean
install: build
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)
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)