mirror of
https://github.com/openbsd/ports.git
synced 2026-06-17 23:13:55 +02:00
telephony/siproxd: update to 0.8.4
Changes: - many string handling fixes New plugins: - plugin_regex_body
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
COMMENT= proxy/masquerading daemon for the SIP protocol
|
||||
|
||||
DISTNAME= siproxd-0.8.3
|
||||
DISTNAME= siproxd-0.8.4
|
||||
CATEGORIES= telephony net
|
||||
REVISION= 1
|
||||
|
||||
HOMEPAGE= https://siproxd.sourceforge.net/
|
||||
|
||||
@@ -27,6 +26,8 @@ LIB_DEPENDS= databases/sqlite3 \
|
||||
devel/libtool,-ltdl \
|
||||
telephony/libosip2
|
||||
|
||||
DEBUG_PACKAGES= ${BUILD_PACKAGES}
|
||||
|
||||
DOCDIR= ${PREFIX}/share/doc/siproxd
|
||||
EXDIR= ${PREFIX}/share/examples/siproxd
|
||||
SUBST_VARS= PREFIX
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
SHA256 (siproxd-0.8.3.tar.gz) = mm16a7b/8WJ3Wx4ftwGN6caWQsv4YmGF3G/87uugdzY=
|
||||
SIZE (siproxd-0.8.3.tar.gz) = 602331
|
||||
SHA256 (siproxd-0.8.4.tar.gz) = rVub8kcTrtApBlB6UD7QyF4mkhyb6mPHKtrEpe455BY=
|
||||
SIZE (siproxd-0.8.4.tar.gz) = 630814
|
||||
|
||||
@@ -51,7 +51,7 @@ Index: doc/siproxd.conf.example
|
||||
|
||||
######################################################################
|
||||
# global switch to control the RTP proxy behaviour
|
||||
@@ -326,25 +329,25 @@ outbound_domain_port = 5060
|
||||
@@ -326,26 +329,26 @@ outbound_domain_port = 5060
|
||||
# The plugins are loaded in the order they appear here. Also
|
||||
# the processing order is given by the load order.
|
||||
#
|
||||
@@ -70,6 +70,7 @@ Index: doc/siproxd.conf.example
|
||||
-#load_plugin=plugin_stun.la
|
||||
-#load_plugin=plugin_prefix.la
|
||||
-#load_plugin=plugin_regex.la
|
||||
-#load_plugin=plugin_regex_body.la
|
||||
-#load_plugin=plugin_stripheader.la
|
||||
-#load_plugin=plugin_codecfilter.la
|
||||
-#load_plugin=plugin_siptrunk.la
|
||||
@@ -86,6 +87,7 @@ Index: doc/siproxd.conf.example
|
||||
+#load_plugin=plugin_stun.so
|
||||
+#load_plugin=plugin_prefix.so
|
||||
+#load_plugin=plugin_regex.so
|
||||
+#load_plugin=plugin_regex_body.so
|
||||
+#load_plugin=plugin_stripheader.so
|
||||
+#load_plugin=plugin_codecfilter.so
|
||||
+#load_plugin=plugin_siptrunk.so
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Index: src/Makefile.in
|
||||
--- src/Makefile.in.orig
|
||||
+++ src/Makefile.in
|
||||
@@ -1080,7 +1080,7 @@ uninstall-am: uninstall-pkglibLTLIBRARIES uninstall-sb
|
||||
@@ -1225,7 +1225,7 @@ uninstall-am: uninstall-pkglibLTLIBRARIES uninstall-sb
|
||||
# count BUILDs - each time increment by one and define the
|
||||
# C macro BUILDNO. bind it to a file everybody includes (log.h)
|
||||
#
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
Index: src/auth.c
|
||||
--- src/auth.c.orig
|
||||
+++ src/auth.c
|
||||
@@ -26,7 +26,6 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <sys/time.h>
|
||||
-#include <sys/random.h>
|
||||
|
||||
#include <netinet/in.h>
|
||||
|
||||
@@ -130,25 +129,15 @@ static char *auth_generate_nonce() {
|
||||
struct timeval tv;
|
||||
int i;
|
||||
|
||||
- /* Use POSIX getrandom() - available since POSIX.1-2013 */
|
||||
- if (getrandom(random_bytes, sizeof(random_bytes), 0) == sizeof(random_bytes)) {
|
||||
- nonce[0] = '"';
|
||||
- /* Convert to hex string */
|
||||
- for (i = 0; i < 16; i++) {
|
||||
- nonce[1 + i*2] = hexchars[(random_bytes[i] >> 4) & 0x0f];
|
||||
- nonce[1 + i*2 + 1] = hexchars[random_bytes[i] & 0x0f];
|
||||
- }
|
||||
- nonce[33] = '"';
|
||||
- nonce[34] = '\0';
|
||||
-
|
||||
- } else {
|
||||
- // getrandom() failed or did not return the expected number
|
||||
- // of bytes - fallback to something else (not secure)
|
||||
- WARN("getrandom() failed, falling back to less secure mechanism");
|
||||
- gettimeofday (&tv, NULL);
|
||||
- sprintf(nonce, "\"%8.8lx%8.8lx%8.8x%8.8x\"",
|
||||
- (long)tv.tv_sec, (long)tv.tv_usec, rand(), rand() );
|
||||
+ arc4random_buf(random_bytes, sizeof(random_bytes));
|
||||
+ nonce[0] = '"';
|
||||
+ /* Convert to hex string */
|
||||
+ for (i = 0; i < 16; i++) {
|
||||
+ nonce[1 + i*2] = hexchars[(random_bytes[i] >> 4) & 0x0f];
|
||||
+ nonce[1 + i*2 + 1] = hexchars[random_bytes[i] & 0x0f];
|
||||
}
|
||||
+ nonce[33] = '"';
|
||||
+ nonce[34] = '\0';
|
||||
|
||||
DEBUGC(DBCLASS_AUTH, "created nonce=%s", nonce);
|
||||
return nonce;
|
||||
@@ -1,11 +0,0 @@
|
||||
Index: src/rtpproxy.c
|
||||
--- src/rtpproxy.c.orig
|
||||
+++ src/rtpproxy.c
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
+#include <sys/time.h>
|
||||
#include <netinet/in.h>
|
||||
|
||||
#include <osipparser2/osip_parser.h>
|
||||
@@ -2,7 +2,7 @@ This prevents siproxd from creating a redundant PID file outside the chroot jail
|
||||
Index: src/siproxd.c
|
||||
--- src/siproxd.c.orig
|
||||
+++ src/siproxd.c
|
||||
@@ -314,13 +314,6 @@ int main (int argc, char *argv[])
|
||||
@@ -313,13 +313,6 @@ int main (int argc, char *argv[])
|
||||
/* prepare for creating PID file */
|
||||
if (pidfilename == NULL) pidfilename = configuration.pid_file;
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ lib/siproxd/
|
||||
@so lib/siproxd/plugin_logcall.so
|
||||
@so lib/siproxd/plugin_prefix.so
|
||||
@so lib/siproxd/plugin_regex.so
|
||||
@so lib/siproxd/plugin_regex_body.so
|
||||
@so lib/siproxd/plugin_shortdial.so
|
||||
@so lib/siproxd/plugin_siptrunk.so
|
||||
@so lib/siproxd/plugin_stats.so
|
||||
|
||||
Reference in New Issue
Block a user