From patchwork Tue Dec 24 22:17:10 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Infonux X-Patchwork-Id: 21300 Received: from localhost ([127.0.0.1] helo=www.linuxtv.org) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1VvaII-0005iV-0H; Tue, 24 Dec 2013 23:17:42 +0100 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1VvaHq-0005fj-Jh for vdr@linuxtv.org; Tue, 24 Dec 2013 23:17:40 +0100 X-tubIT-Incoming-IP: 74.125.82.50 Received: from mail-wg0-f50.google.com ([74.125.82.50]) by mail.tu-berlin.de (exim-4.72/mailfrontend-8) with esmtps [TLSv1:RC4-SHA:128] for id 1VvaHo-0003cO-kl; Tue, 24 Dec 2013 23:17:13 +0100 Received: by mail-wg0-f50.google.com with SMTP id a1so6303536wgh.5 for ; Tue, 24 Dec 2013 14:17:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=NMRwK9R5iN1x2JCByGZZQphDCnJYZ58G77geK2X5A9k=; b=o5qCjZmMxJjOI6evqk+lMKSviy/5rUxCvK2fkduK9xxVIKdSdjc9BgS9iMO0M4Ik4I AtF8nxXly/YI3qV3EjBlXrvq0nePaKDAMvxnKFJ9PaJnqfeS6zySY3cf9o2WJoQClFik uVga6dAG7VtWTnhncNQZrMoI2nIaqMiu5MR76RAI+t92uAlZhZQyYDlxcTyHWZgq6jR0 xKfg/tJdxv5aOZglIfxcmBnMWkU/KKBlDLgNiL5gA1034NEJxnDn/wYGKyaN+1fQi1/c PPg3w2Y90QTo/wtjMglAVDM0TF3qhos3xwvSj7N2r/fy0vMeGZUrIdMaWv3RP0+rO1UY 7MqA== X-Received: by 10.194.92.109 with SMTP id cl13mr17473543wjb.13.1387923432157; Tue, 24 Dec 2013 14:17:12 -0800 (PST) Received: from zz.infonux.home (moa64-1-88-188-178-56.fbx.proxad.net. [88.188.178.56]) by mx.google.com with ESMTPSA id x4sm38277841wif.0.2013.12.24.14.17.11 for (version=SSLv3 cipher=RC4-SHA bits=128/128); Tue, 24 Dec 2013 14:17:11 -0800 (PST) Date: Tue, 24 Dec 2013 23:17:10 +0100 From: Infonux To: vdr@linuxtv.org Message-ID: <20131224231710.0fbd5d69@zz.infonux.home> In-Reply-To: <9lupkdoaonnha68lxc9vuq5u.1387849748558@email.android.com> References: <9lupkdoaonnha68lxc9vuq5u.1387849748558@email.android.com> X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.10; i486-pc-linux-gnu) Mime-Version: 1.0 X-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2013.12.24.220618 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' FROM_NAME_ONE_WORD 0.05, HTML_00_01 0.05, HTML_00_10 0.05, MIME_LOWER_CASE 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_2000_2999 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, CT_TEXT_PLAIN_UTF8_CAPS 0, DKIM_SIGNATURE 0, WEBMAIL_SOURCE 0, __ANY_URI 0, __BOUNCE_CHALLENGE_SUBJ 0, __BOUNCE_NDR_SUBJ_EXEMPT 0, __CP_URI_IN_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __FORWARDED_MSG 0, __FRAUD_BODY_WEBMAIL 0, __FRAUD_WEBMAIL 0, __FRAUD_WEBMAIL_FROM 0, __FROM_GMAIL 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __HIGHBITS 0, __IN_REP_TO 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __PHISH_SPEAR_STRUCTURE_1 0, __RDNS_GMAIL 0, __SANE_MSGID 0, __SUBJ_ALPHA_NEGATE 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NS , __YOUTUBE_RCVD 0' X-LSpam-Score: 0.8 (/) X-LSpam-Report: No, score=0.8 required=5.0 tests=BAYES_20=-0.001, FREEMAIL_FROM=0.001, RDNS_NONE=0.793, T_DKIM_INVALID=0.01, URIBL_BLOCKED=0.001 autolearn=no Subject: Re: [vdr] vdr-iptv "sh -c" iptvstream.sh issue (solved) X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: VDR Mailing List List-Id: VDR Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: vdr-bounces@linuxtv.org Errors-To: vdr-bounces@linuxtv.org Hi, I forgot to mention that I use "busybox" (no bash) Fixed, by patching protocolext.c Thanks. Le mardi 24 décembre 2013 Ian_and_joanna a écrit: > Hi, > > In Brief > > Have you checked file permissions? > > Detail > > The first example you quote that works is the way iptvstream.sh > should be called I think (so that parameters can be passed to the > script). > > The first thing I'd check are the file permissions on iptvstream.sh > (i.e. the output from > > ls -l /etc/vdr/iptvstream.sh > > ) and that they allow the user running vdr to execute the script. > > In general I hesitate in modifying the source until I have ruled out > other possibilities as I imagine an error of this nature in the > source would have been picked up by others sooner (unless it is a > very recent change). > > In closing > > First step check file permissions on the shell script. > > Regards, > > Ian. > > Sent from my mobile phone. > > -------- Original message -------- > From: Zouhair > Date: 2013/12/23 22:43 (GMT+00:00) > To: VDR Mailing List > Subject: [vdr] vdr-iptv "sh -c" iptvstream.sh issue > > Hi, > > the external script iptvstream.sh not execute from iptv plugins ? > I get: "ERROR: Script execution failed: /etc/vdr/iptvstream.sh 1 4321" > > after looking at the source code "protocolext.c" > ------ > // Create a new session for a process group >      ERROR_IF_RET(setsid() == -1, "setsid()", _exit(-1)); >      if (execl(EXTSHELL, "sh", "-c", *cmd, (char *)NULL) == -1) { >         error("Script execution failed: %s", *cmd); >         _exit(-1); > ... > > I tried to execute it in the same way: > > sh -c /etc/vdr/iptvstream.sh 1 4321 > not work. (the shell exit with no execution) > > I try with the cote (like): > sh -c "/etc/vdr/iptvstream.sh 1 4321" > or, > sh /etc/vdr/iptvstream.sh 1 4321 > and, work fine. > > Should add cote or remove "-c" in source code to fix this ? > Or any other solution ? > > > Using: vdr-iptv-2.0.0 and VDR 2.0.2 > > Thanks. > > > _______________________________________________ > vdr mailing list > vdr@linuxtv.org > http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr --- protocolext.c_orig 2013-04-01 03:20:00.000000000 +0200 +++ protocolext.c 2013-12-24 16:28:51.425960222 +0100 @@ -20,7 +20,7 @@ #include "protocolext.h" #ifndef EXTSHELL -#define EXTSHELL "/bin/bash" +#define EXTSHELL "/bin/busybox" #endif Happy birthday :)