[Pkg-voip-commits] [janus] 30/37: Add patch to avoid static paths below /tmp.
Jonas Smedegaard
dr at jones.dk
Mon Mar 13 19:14:34 UTC 2017
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository janus.
commit 670f433c474e384826836678ccedafdb526a3b8e
Author: Jonas Smedegaard <dr at jones.dk>
Date: Mon Mar 13 18:18:29 2017 +0100
Add patch to avoid static paths below /tmp.
---
debian/patches/2002_avoid_tmp.patch | 98 +++++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 99 insertions(+)
diff --git a/debian/patches/2002_avoid_tmp.patch b/debian/patches/2002_avoid_tmp.patch
new file mode 100644
index 0000000..3f24ba7
--- /dev/null
+++ b/debian/patches/2002_avoid_tmp.patch
@@ -0,0 +1,98 @@
+Description: Avoid static paths below /tmp
+Author: Jonas Smedegaard <dr at jones.dk>
+Last-Update: 2017-03-13
+
+--- a/conf/janus.cfg.sample.in
++++ b/conf/janus.cfg.sample.in
+@@ -10,10 +10,10 @@
+ events_folder = @eventdir@ ; Event handlers folder
+ ;log_to_stdout = false ; Whether the Janus output should be written
+ ; to stdout or not (default=true)
+-;log_to_file = /tmp/janus.log ; Whether to use a log file or not
++;log_to_file = /var/log/janus/janus.log ; Whether to use a log file or not
+ ;daemonize = true ; Whether Janus should run as a daemon
+ ; or not (default=run in foreground)
+-;pid_file = /tmp/janus.pid ; PID file to create when Janus has been
++;pid_file = /var/run/janus/janus.pid ; PID file to create when Janus has been
+ ; started, and to destroy at shutdown
+ ;interface = 1.2.3.4 ; Interface to use (will be used in SDP)
+ debug_level = 4 ; Debug/logging level, valid values are 0-7
+--- a/conf/janus.plugin.audiobridge.cfg.sample
++++ b/conf/janus.plugin.audiobridge.cfg.sample
+@@ -20,4 +20,4 @@
+ secret = adminpwd
+ sampling_rate = 16000
+ record = false
+-;record_file = /tmp/janus-audioroom-1234.wav
++;record_file = @recordingsdir@/audioroom-1234.wav
+--- a/conf/janus.plugin.videoroom.cfg.sample
++++ b/conf/janus.plugin.videoroom.cfg.sample
+@@ -33,4 +33,4 @@
+ ;audiocodec = opus
+ ;videocodec = vp8
+ record = false
+-;rec_dir = /tmp/janus-videoroom
++;rec_dir = @recordingsdir@/janus-videoroom
+--- a/conf/janus.plugin.voicemail.cfg.sample
++++ b/conf/janus.plugin.voicemail.cfg.sample
+@@ -5,6 +5,6 @@
+ ; events = yes|no, whether events should be sent to event handlers
+
+ [general]
+-path = /tmp/voicemail/
++path = @recordingsdir@/voicemail/
+ base = /voicemail/
+ events = yes
+--- a/conf/janus.transport.pfunix.cfg.sample
++++ b/conf/janus.transport.pfunix.cfg.sample
+@@ -6,7 +6,7 @@
+ ; for Janus API clients
+ json = indented ; Whether the JSON messages should be indented (default),
+ ; plain (no indentation) or compact (no indentation and no spaces)
+-path = /tmp/ux-janusapi ; Path to bind to (Janus API)
++path = /var/run/janus/ux-janusapi ; Path to bind to (Janus API)
+ ;type = SOCK_SEQPACKET ; SOCK_SEQPACKET (default) or SOCK_DGRAM?
+
+ ; As with other transport plugins, you can use Unix Sockets to interact
+--- a/janus.1
++++ b/janus.1
+@@ -106,7 +106,7 @@
+ .SH EXAMPLES
+ \fBjanus\fR \- Launch Janus with all options from configurations files
+ .TP
+-\fBjanus \-b \-L /tmp/januslog\fR \- Launch Janus as a daemon and log to the specified file
++\fBjanus \-b \-L /var/log/janus/januslog\fR \- Launch Janus as a daemon and log to the specified file
+ .TP
+ \fBjanus \-6\fR \- Launch Janus with IPv6 support enabled
+ .TP
+--- a/plugins/janus_audiobridge.c
++++ b/plugins/janus_audiobridge.c
+@@ -3357,7 +3357,7 @@
+ if(audiobridge->record_file)
+ g_snprintf(filename, 255, "%s", audiobridge->record_file);
+ else
+- g_snprintf(filename, 255, "/tmp/janus-audioroom-%"SCNu64".wav", audiobridge->room_id);
++ g_snprintf(filename, 255, "/var/lib/janus/recordings/audioroom-%"SCNu64".wav", audiobridge->room_id);
+ audiobridge->recording = fopen(filename, "wb");
+ if(audiobridge->recording == NULL) {
+ JANUS_LOG(LOG_WARN, "Recording requested, but could NOT open file %s for writing...\n", filename);
+--- a/transports/janus_pfunix.c
++++ b/transports/janus_pfunix.c
+@@ -232,7 +232,7 @@
+ JANUS_LOG(LOG_WARN, "Unix Sockets server disabled (Janus API)\n");
+ } else {
+ item = janus_config_get_item_drilldown(config, "general", "path");
+- char *pfname = (char *)(item && item->value ? item->value : "/tmp/ux-janusapi");
++ char *pfname = (char *)(item && item->value ? item->value : "/var/run/janus/ux-janusapi");
+ item = janus_config_get_item_drilldown(config, "general", "type");
+ const char *type = item && item->value ? item->value : "SOCK_SEQPACKET";
+ dgram = FALSE;
+@@ -253,7 +253,7 @@
+ JANUS_LOG(LOG_WARN, "Unix Sockets server disabled (Admin API)\n");
+ } else {
+ item = janus_config_get_item_drilldown(config, "admin", "admin_path");
+- char *pfname = (char *)(item && item->value ? item->value : "/tmp/ux-janusadmin");
++ char *pfname = (char *)(item && item->value ? item->value : "/var/run/janus/ux-janusadmin");
+ item = janus_config_get_item_drilldown(config, "admin", "admin_type");
+ const char *type = item && item->value ? item->value : "SOCK_SEQPACKET";
+ if(!strcasecmp(type, "SOCK_SEQPACKET")) {
diff --git a/debian/patches/series b/debian/patches/series
index 248a583..74d9877 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
2001_use_snakeoil_cert.patch
+2002_avoid_tmp.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-voip/janus.git
More information about the Pkg-voip-commits
mailing list