From patchwork Mon May 1 12:27:27 2006 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=C3=B6rg_Wendel?= X-Patchwork-Id: 12295 Received: from moutng.kundenserver.de ([212.227.126.171]) by www.linuxtv.org with esmtp (Exim 4.50) id 1FaXWS-0003hB-Dz for vdr@linuxtv.org; Mon, 01 May 2006 14:29:04 +0200 Received: from [145.254.200.213] (helo=horchi.wendel.private) by mrelayeu.kundenserver.de (node=mrelayeu7) with ESMTP (Nemesis), id 0ML2Dk-1FaXWR1GwN-0000dk; Mon, 01 May 2006 14:29:03 +0200 From: =?iso-8859-1?q?J=F6rg_Wendel?= To: VDR Mailing List Subject: Re: [vdr] [ANNOUNCE] vdr-pin-0.0.15 Date: Mon, 1 May 2006 14:27:27 +0200 User-Agent: KMail/1.8.2 References: <4454E2A9.8020305@gmx.de> <200605010753.28047.vdr-ml@jwendel.de> <200605011335.41418.michael@nausch.org> In-Reply-To: <200605011335.41418.michael@nausch.org> MIME-Version: 1.0 Message-Id: <200605011427.27815.vdr-ml@jwendel.de> X-Provags-ID: kundenserver.de abuse@kundenserver.de login:257b73ee41a3203ea488f6420181c2b0 X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: vdr-ml@jwendel.de, VDR Mailing List List-Id: VDR Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 May 2006 12:29:04 -0000 Status: O X-Status: X-Keywords: X-UID: 9217 Hi, On Montag 01 Mai 2006 13:35, Michael Nausch wrote: > Griasdebou! > > O.K. I'm back from hospital an will play and search, what happens ... > > Am Montag, 1. Mai 2006 07:53 schrieb Jörg Wendel: > > please can you check if the file > > "/video/Clips/Tito_&_Tarantula_-_After_Dark/2005-02-04.22.50.99.99.rec/pr > >ot ection.fsk" was created by the script. > > No, there's no protection.fsk in the subdirectory. > > > Does you have changed the script "/usr/bin/fskprotect.sh" to the new one? > > Jepp, I've made some symlinks to use the right new scripts: > tecvdr:/usr/bin # ls -al fs* > lrwxrwxrwx 1 root root 43 Apr 30 22:54 fskcheck > -> /usr/local/src/VDR/PLUGINS/src/pin/fskcheck > lrwxrwxrwx 1 root root 59 Apr 30 22:53 fskcheck-demo.sh > -> /usr/local/src/VDR/PLUGINS/src/pin/scripts/fskcheck-demo.sh > lrwxrwxrwx 1 root root 56 Apr 30 22:53 fskprotect.sh > -> /usr/local/src/VDR/PLUGINS/src/pin/scripts/fskprotect.sh > > fsprotect.sh contains: > tecvdr:/usr/bin # cat fskprotect.sh the links and the script looks good, i think the script exits cause it can't check the protection state of the pin plugin. And the reason for this should be the 'permision denied' problem. > ecvdr:/usr/bin # ipcs -q > > ------ Message Queues -------- > key msqid owner perms used-bytes messages > 0xd8000000 0 vdr 0 0 0 Ok, thats it, the perms are 0. Sorry it's my bug, i'am using linvdr where vdr is always running as root. For the root user the perms don't matter. Pleas apply the attached patch to the plugin. BEFORE starting vdr again make sure no system message queue with the wrong permissions is left. Attention only message queues which key starts with 0xd80000?? are from the pin plugin. Don't delete others of your system ;) Example: - first list it: linvdr:/etc/vdr# ipcs -q | grep 0xd80000 0xd8000000 393216 root 666 0 0 - now delete it using the listed key(s) (second column) linvdr:/etc/vdr# ipcrm msg 393216 Greetings Jörg --- ../newpin//fskcheck.c Mon May 1 14:13:31 2006 +++ fskcheck.c Mon May 1 14:10:25 2006 @@ -17,6 +17,7 @@ #include #include #include +#include #include #include "def.h" @@ -132,7 +133,7 @@ // create my own message queue - if ((msgID = msgget(0xd8000001, IPC_CREAT) < 0) + if ((msgID = msgget(0xd8000001, IPC_CREAT|S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)) < 0) { if (!silent) printf("Creation of message queue failed\n"); return fail; --- ../newpin//msgreceiver.c Mon May 1 14:13:17 2006 +++ msgreceiver.c Mon May 1 14:10:51 2006 @@ -10,6 +10,7 @@ // Includes //*************************************************************************** +#include #include #include @@ -51,7 +52,7 @@ { if (!active) { - if ((msgID = msgget(0xd8000000, IPC_CREAT)) < 0) + if ((msgID = msgget(0xd8000000, IPC_CREAT|S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)) < 0) { dsyslog("creation of message queue failed"); return fail;