FreeBSD Bugzilla – Attachment 164822 Details for
Bug 205569
multimedia/oscam: port updated to contain rc.d script and new feature of dvbapi
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Revised patch including fix for out of bounds access in module-dvbapi.c
oscam.diff.txt (text/plain), 4.84 KB, created by
Thomas Zander
on 2015-12-29 15:11:21 UTC
(
hide
)
Description:
Revised patch including fix for out of bounds access in module-dvbapi.c
Filename:
MIME Type:
Creator:
Thomas Zander
Created:
2015-12-29 15:11:21 UTC
Size:
4.84 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- Makefile (revision 404717) >+++ Makefile (working copy) >@@ -3,6 +3,7 @@ > > PORTNAME= oscam > PORTVERSION= 1.20 >+PORTREVISION= 1 > CATEGORIES= multimedia > MASTER_SITES= http://el8.nl/~fbettag/oscam/ > >@@ -12,6 +13,7 @@ > LICENSE= GPLv3 > > USES= gmake tar:bzip2 >+USE_RC_SUBR= oscam > MAKE_ARGS+= HOSTCC=clang CC=clang > > .if target(gen-dist) >Index: files/oscam.in >=================================================================== >--- files/oscam.in (nonexistent) >+++ files/oscam.in (working copy) >@@ -0,0 +1,46 @@ >+#!/bin/sh >+ >+# $FreeBSD$ >+# >+# PROVIDE: oscam >+# REQUIRE: DAEMON >+# KEYWORD: shutdown >+# >+# Add the following line to /etc/rc.conf[.local] to enable oscam >+# >+# oscam_enable (bool): Set to "NO" by default. >+# Set it to "YES" to enable oscam. >+# oscam_flags (str): Custom flags for oscam. >+ >+. /etc/rc.subr >+ >+name=oscam >+rcvar=oscam_enable >+load_rc_config $name >+ >+: ${oscam_enable:=NO} >+ >+pidfile="/var/run/${name}.pid" >+confdir="/usr/local/etc/oscam" >+logdir="/var/log/oscam" >+command="/usr/local/bin/oscam" >+ >+command_args="-b -B ${pidfile} -c ${confdir}" >+start_precmd="${name}_prestart" >+ >+PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin >+ >+oscam_prestart() >+{ >+ if [ ! -f "${pidfile}" ]; then >+ /usr/bin/install -m 644 /dev/null ${pidfile} >+ fi >+ if [ ! -d "${confdir}" ]; then >+ /usr/bin/install -m 755 -d ${confdir} >+ fi >+ if [ ! -d "${logdir}" ]; then >+ /usr/bin/install -m 755 -d ${logdir} >+ fi >+} >+ >+run_rc_command "$1" > >Property changes on: files/oscam.in >___________________________________________________________________ >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:keywords >## -0,0 +1 ## >+FreeBSD=%H >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-config.h >=================================================================== >--- files/patch-config.h (revision 404717) >+++ files/patch-config.h (working copy) >@@ -1,15 +1,18 @@ > --- config.h.orig 2015-09-30 21:11:35 UTC > +++ config.h >-@@ -7,7 +7,7 @@ >+@@ -5,10 +5,8 @@ >+ #define WEBIF_LIVELOG 1 >+ #define WEBIF_JQUERY 1 > #define TOUCH 1 >- //#define WITH_SSL 1 >- #if defined(__linux__) || defined(__CYGWIN__) >--#define HAVE_DVBAPI 1 >-+//#define HAVE_DVBAPI 1 >- #endif >+-//#define WITH_SSL 1 >+-#if defined(__linux__) || defined(__CYGWIN__) >++#define WITH_SSL 1 >+ #define HAVE_DVBAPI 1 >+-#endif > #define READ_SDT_CHARSETS 1 > #define CLOCKFIX 1 >-@@ -23,18 +23,18 @@ >+ #define IRDETO_GUESSING 1 >+@@ -23,18 +21,18 @@ > #define MODULE_MONITOR 1 > > //#define MODULE_CAMD33 1 >Index: files/patch-module-dvbapi.c >=================================================================== >--- files/patch-module-dvbapi.c (nonexistent) >+++ files/patch-module-dvbapi.c (working copy) >@@ -0,0 +1,48 @@ >+--- module-dvbapi.c.orig 2015-10-10 17:22:23 UTC >++++ module-dvbapi.c >+@@ -3,7 +3,6 @@ >+ #include "globals.h" >+ >+ #ifdef HAVE_DVBAPI >+- >+ #include "module-dvbapi.h" >+ #include "module-cacheex.h" >+ #include "module-dvbapi-azbox.h" >+@@ -4290,6 +4289,7 @@ static void *dvbapi_main_local(void *cli >+ { >+ int32_t i, j; >+ struct s_client *client = (struct s_client *) cli; >++ const char pmt_server_socket[]="/tmp/.listen.camd.socket"; >+ client->thread = pthread_self(); >+ SAFE_SETSPECIFIC(getclient, cli); >+ >+@@ -4298,11 +4298,9 @@ static void *dvbapi_main_local(void *cli >+ int32_t maxpfdsize = (MAX_DEMUX * maxfilter) + MAX_DEMUX + 2; >+ struct pollfd pfd2[maxpfdsize]; >+ struct timeb start, end; // start time poll, end time poll >+-#define PMT_SERVER_SOCKET "/tmp/.listen.camd.socket" >+ struct sockaddr_un saddr; >+ saddr.sun_family = AF_UNIX; >+- strncpy(saddr.sun_path, PMT_SERVER_SOCKET, 107); >+- saddr.sun_path[107] = '\0'; >++ strncpy(saddr.sun_path, pmt_server_socket, sizeof(saddr.sun_path)/sizeof(saddr.sun_path[0])); >+ >+ int32_t rc, pfdcount, g, connfd, clilen; >+ int32_t ids[maxpfdsize], fdn[maxpfdsize], type[maxpfdsize]; >+@@ -4366,13 +4364,15 @@ static void *dvbapi_main_local(void *cli >+ signal_action.sa_flags = SA_RESTART; >+ sigaction(SIGRTMIN + 1, &signal_action, NULL); >+ >++ /* >+ dir_fd = open(TMPDIR, O_RDONLY); >+ if(dir_fd >= 0) >+ { >+ fcntl(dir_fd, F_SETSIG, SIGRTMIN + 1); >+ fcntl(dir_fd, F_NOTIFY, DN_MODIFY | DN_CREATE | DN_DELETE | DN_MULTISHOT); >+ event_handler(SIGRTMIN + 1); >+- } >++ }*/ >++ cs_log("Only PMT 4-6 supported on FreeBSD, sorry..."); >+ } >+ else >+ { > >Property changes on: files/patch-module-dvbapi.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:keywords >## -0,0 +1 ## >+FreeBSD=%H >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
riggs
:
maintainer-approval+
Actions:
View
|
Diff
Attachments on
bug 205569
:
164589
| 164822