You are not logged in.

#1 2009-04-05 07:52:40

colbert
Member
Registered: 2007-12-16
Posts: 809

[SOLVED] Perl problem (in myth)

I am trying to run a simple script that fetches info from themoviedb.org, here's the MythTV wiki for it: http://www.mythtv.org/wiki/Tmdb.pl

All permissions are correct, files are in the right places, the problem seems to be with my perl setup. On running the script in the Mythfrontend, I get this: click for error png

I have been corresponding on the Mythtv mailing list, and they asked if I'm using SELinux which I am not, of course. I don't know hardly anything about perl, so any help is appreciated. Any more info needed I will surely provide.

Thanks smile

Last edited by colbert (2009-04-06 04:44:14)

Offline

#2 2009-04-05 20:08:40

juster
Forum Fellow
Registered: 2008-10-07
Posts: 195

Re: [SOLVED] Perl problem (in myth)

The error you are receiving (Insecure dependency in require while running setgid) has to do with perl's taint mode.  The perl interpreter runs scripts in taint mode if you request it with the -T flag or automatically if the script file has the setuid or setgid flag set.

Taint mode is meant to be more secure by not trusting any outside input.  Untrusted input like maliciously crafted user input for example.  The setuid or setgid bits for files can be turned on with chmod to allow an executable to run with the permissions of its owner user or group.

So, according to the error message, you have setgid turned on for the script file (or its directory?).  Is this necessary for MythTV to work?  I've never used it.  You could also try replacing the top of the perl script with something like:

#!/usr/bin/perl -Uw

to disable taint mode.

Offline

#3 2009-04-05 22:18:14

colbert
Member
Registered: 2007-12-16
Posts: 809

Re: [SOLVED] Perl problem (in myth)

Thanks juster, however I already had modified the line from just "-w" to "-Uw" as per advised on the mailing list sad (I should have mentioned this, I apologize.) It still gives the error sad

Last edited by colbert (2009-04-05 22:18:42)

Offline

#4 2009-04-05 23:56:31

juster
Forum Fellow
Registered: 2008-10-07
Posts: 195

Re: [SOLVED] Perl problem (in myth)

What about the setgid permission?  That really seems the cause of the problem, the -Uw was just a hackish workaround.  List the files with 'ls -l' to see if the script (or the .pm module file) are setgid.  If they are an s will show up in the group field, like this:

-rwxr-sr-x 1 justin users 11327 2009-04-05 12:41 tmdb.pl*

This is also highlighted in yellow for me, I'm not sure if you have ls colors working.  Also check the directory they are in using 'ls -ld <dirpath>'.

If you find it, try unsetting the setgid bit using chmod like: 'chmod g-s <target>'.  Google setuid or see the chmod manpage to learn more about it.

Edit:
As soon as I posted this I remember you can find files with certain permissions.  If you type this on the shell it should print any files/dirs with setgid on:

find /MythTV's/Base/Directory/ -perm /2000

Last edited by juster (2009-04-06 00:02:47)

Offline

#5 2009-04-06 04:44:01

colbert
Member
Registered: 2007-12-16
Posts: 809

Re: [SOLVED] Perl problem (in myth)

Thanks juster, I realized the mythfrontend was setgid. I did a chmod on it and it is working now just great smile big_smile

Offline

Board footer

Powered by FluxBB