Message ID | 200605011427.27815.vdr-ml@jwendel.de |
---|---|
State | New |
Headers |
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?= <vdr-ml@jwendel.de> To: VDR Mailing List <vdr@linuxtv.org> 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 Content-Type: Multipart/Mixed; boundary="Boundary-00=_v6fVEq1S3w7nu1V" 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 <vdr@linuxtv.org> List-Id: VDR Mailing List <vdr.linuxtv.org> List-Unsubscribe: <http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr>, <mailto:vdr-request@linuxtv.org?subject=unsubscribe> List-Archive: <http://www.linuxtv.org/pipermail/vdr> List-Post: <mailto:vdr@linuxtv.org> List-Help: <mailto:vdr-request@linuxtv.org?subject=help> List-Subscribe: <http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr>, <mailto:vdr-request@linuxtv.org?subject=subscribe> X-List-Received-Date: Mon, 01 May 2006 12:29:04 -0000 Status: O X-Status: X-Keywords: X-UID: 9217 |
Commit Message
Jörg Wendel
May 1, 2006, 12:27 p.m. UTC
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
Comments
Griasdebou! Am Montag, 1. Mai 2006 14:27 schrieb Jörg Wendel: > 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. Aha! But you know, every little baby is given with the mother's milk: Don't run a program under the rights of root, if there's no secial necessity! <lol> > Pleas apply the attached patch to the plugin. I've done this, and now it works a little better, but only a little, cause there's a further problem: If I try to play a protected recording the following happens: May 1 15:07:45 tecvdr vdr: [768] info: Kinderschutz aktiviert May 1 15:07:55 tecvdr vdr: [768] checking protection of recording '(null)' May 1 15:07:55 tecvdr vdr: [768] checking rights, protection file is '/video/Willi_wills_wissen/2006-04-04.14.50.99.99.rec/protection.fsk' May 1 15:07:55 tecvdr vdr: [768] pin: no translation found for 'Recording protected, enter pin code first' in language 1 (Deutsch) May 1 15:07:55 tecvdr vdr: [768] ERROR: Recording protected, enter pin code first So far so good! I can play this recording after "opening" the protection with "Gorge Orwells special year-code". BUT, if I try to protect a recording I've the new old problem: May 1 15:08:45 tecvdr vdr: [768] checking protection of recording 'Clips' May 1 15:08:45 tecvdr vdr: [768] checking rights, protection file is '/video/Clips/protection.fsk' May 1 15:08:51 tecvdr vdr: [768] executing command '/usr/bin/fskprotect.sh protect "/video/Clips/Metallica_-_Hero_of_the_Day/2005-02-02.20.20.99.99.rec"' May 1 15:08:51 tecvdr vdr: [866] Message (0) from (229377) received [-] May 1 15:08:51 tecvdr vdr: [866] Sending message to (229377) failed, errno (13), 'Permission denied' May 1 15:08:51 tecvdr vdr: [866] Message (1) from (262145) received [Please enable pin protection first] May 1 15:08:51 tecvdr vdr: [866] Got 'Please enable pin protection first' May 1 15:08:51 tecvdr vdr: [768] info: Please enable pin protection first The pin-plugin is active! tecvdr:~ # ipcs -q ------ Message Queues -------- key msqid owner perms used-bytes messages 0xd8000000 0 vdr 666 0 0 Further I will mak a little wish a improvement-suggestion, if the pin-plugin-menue is displayed on OSD, I'll see: 1 Kanalliste bearbeiten 2 Gesperrte Sendungen bearbeiten 3 Aktuellen Kanal in die Sperrliste aufnehmen 4 Aktuelle Sendung in die Sperrliste aufnehmen 5 Kinderschutz aktivieren If I try to select menupoint 5 "Kinderschutz aktivieren" an press button 5 nothing happens. I must scroll down and press then the ok-button. Were it possible, to (re)act like VDR in all the other menues? Have a nice day! BC
On Montag 01 Mai 2006 15:32, Michael Nausch wrote: > Aha! But you know, every little baby is given with the mother's milk: > Don't run a program under the rights of root, if there's no secial > necessity! <lol> You're right, but for my vdr i'am using linvdr with less changes as possible :( > > Pleas apply the attached patch to the plugin. > > I've done this, and now it works a little better, but only a little, cause > there's a further problem: > > If I try to play a protected recording the following happens: > May 1 15:07:45 tecvdr vdr: [768] info: Kinderschutz aktiviert > May 1 15:07:55 tecvdr vdr: [768] checking protection of recording '(null)' > May 1 15:07:55 tecvdr vdr: [768] checking rights, protection file is > '/video/Willi_wills_wissen/2006-04-04.14.50.99.99.rec/protection.fsk' > May 1 15:07:55 tecvdr vdr: [768] pin: no translation found for 'Recording > protected, enter pin code first' in language 1 (Deutsch) > May 1 15:07:55 tecvdr vdr: [768] ERROR: Recording protected, enter pin > code first Ok, i have now added the missing german translation for 'Recording protected, enter pin code first'. > So far so good! I can play this recording after "opening" the protection > with "Gorge Orwells special year-code". Ok > BUT, if I try to protect a recording I've the new old problem: > May 1 15:08:45 tecvdr vdr: [768] checking protection of recording 'Clips' > May 1 15:08:45 tecvdr vdr: [768] checking rights, protection file is > '/video/Clips/protection.fsk' > May 1 15:08:51 tecvdr vdr: [768] executing command '/usr/bin/fskprotect.sh > protect > "/video/Clips/Metallica_-_Hero_of_the_Day/2005-02-02.20.20.99.99.rec"' > May 1 15:08:51 tecvdr vdr: [866] Message (0) from (229377) received [-] > May 1 15:08:51 tecvdr vdr: [866] Sending message to (229377) failed, errno > (13), 'Permission denied' > May 1 15:08:51 tecvdr vdr: [866] Message (1) from (262145) received > [Please enable pin protection first] > May 1 15:08:51 tecvdr vdr: [866] Got 'Please enable pin protection first' > May 1 15:08:51 tecvdr vdr: [768] info: Please enable pin protection first Hm, this i can't reproduce even if i'am not root. Are the fskcheck tool recompiled after the patch was applied? Was the fskcheck.c changed by the patch? Wat says: #> fskcheck check; echo $? it shoud return 2 when the protection is active and 1 if vdr is currently not protected. > The pin-plugin is active! > > tecvdr:~ # ipcs -q > > ------ Message Queues -------- > key msqid owner perms used-bytes messages > 0xd8000000 0 vdr 666 0 0 looks good! > If I try to select menupoint 5 "Kinderschutz aktivieren" an press button 5 > nothing happens. I must scroll down and press then the ok-button. Were it > possible, to (re)act like VDR in all the other menues? Done. I release the 2 changes when we have solved the pending problem. Many thanks for beta testing ;) Greets Jörg
HI Jörg! Am Montag, 1. Mai 2006 19:42 schrieb Jörg Wendel: > > > Pleas apply the attached patch to the plugin. > > > > I've done this, ... But I did'nt it not right, so I think! I've patch the two files fskcheck.c and msgreceiver.c by hand, and what happens. IT WORKS!!! > Hm, this i can't reproduce even if i'am not root. Forget it! Something went wrong while I've patched the pin-plugin via "cat pin-0.0.15-perm-bug.diff | patch". > I release the 2 changes when we have solved the pending problem. O.K, I've no more problem! ;) So there isn't a rock on your way to solve my little wishes. ;) > Many thanks for beta testing ;) No problem, I think this is one of VDRs VIP (Very Importandt Plugins), one new feature for next development-release! <bg> So, now, I can work with the next plugins ... Have a nice day! Django
Hi, > O.K, I've no more problem! ;) So there isn't a rock on your way to solve my > little wishes. ;) Version 0.0.16 including the bugfix and the little changes from above is available at www.jwendel.de A new version with a feature to protect plugins is in work now. For example the dvd plugin can protected so the children can't look dvd's. > Django Hatte ich doch richtig geraten, aber wer sollte es bei "Griasdebou" sonst sein :)) Grüße Horchi
--- ../newpin//fskcheck.c Mon May 1 14:13:31 2006 +++ fskcheck.c Mon May 1 14:10:25 2006 @@ -17,6 +17,7 @@ #include <errno.h> #include <sys/time.h> #include <signal.h> +#include <sys/stat.h> #include <sys/msg.h> #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 <sys/stat.h> #include <sys/msg.h> #include <signal.h> @@ -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;