[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Jailkit-users] [Fwd: Trouble with perl program on Gentoo Linux]
From: |
Stephen Tallowitz |
Subject: |
Re: [Jailkit-users] [Fwd: Trouble with perl program on Gentoo Linux] |
Date: |
Sun, 19 Mar 2006 14:11:21 +0100 |
Hello John,
I'm no perl specialist (I havent' done perl programs for years) but here is
something I've noticed:
It's probably not enough to have File::Basename inside the jail. From your
trace (thanks for supplying such a wealth of information) it seems that
File::Basename depends on /bin/dirname, which - on a gentoo system - is part of
the coreutils package and not of a Perl module or library. The important line
in your *bad* trace is this one here:
fork(Can't exec "dirname": No such file or directory at ./test.pl line 12.)
So try copying /bin/dirname to the jail - you'll probably also need
/bin/basename inside the jail. If you do have /bin/dirname in your jail, you
might have to set or extend the environment variable for you shell to include
the /bin directory. Hope this helps and please tell me if it works.
Cheers,
Stephen
--- original message ---
On Thu, 16 Mar 2006 21:46:45 +0100
Olivier Sessink wrote:
> I have no perl experience myself at all, so I find it really difficult
> to say anything useful about this. It might be that you need much more
> then just the perl executable in the jail, for example files from
> /usr/share ??
>
> I'll forward the mail to the jailkit-users mailinglist, perhaps we have
> some perl experts there..?
>
> Olivier
>
> -------- Original Message --------
> Subject: Trouble with perl program on Gentoo Linux
> Date: Thu, 16 Mar 2006 12:21:53 -0500
> From: John R Larsen <address@hidden>
> Reply-To: address@hidden
> To: address@hidden
>
> Hello,
>
> I am having trouble running a perl script in a jail. I'm using
> jailkit-1.3 on a Gentoo Linux 2.6.12-gentoo-r9
> kernel. Jailkit seems to be configured correctly and I can connect
> using ssh into the jail account. Other
> programs I have tried work fine such as vim, email, and even some other
> perl scripts. I used "jk_init
> /home/jail perl" to copy my 5.8.6 perl into the jail. I have done an
> strace on the program in the jail and
> compared it to an strace of the same program running outside the jail in
> a regular account. I made a
> much simpler test case that demonstrates the same problem. I have
> attached "test.pl",
> "test.pl.strace.good", and "test.pl.strace.bad". The good and bad
> straces are from outside and inside the
> jail.
>
> The issue is with the "fork" call. For some reason fork is called with
> no parameters when run inside the
> jail. I'm using the perl functions "basename" and "dirname" which are
> included with the "use
> File::Basename" line. I've compared file trees for perl inside and
> outside the jail and they appear to be
> the same. The File::Basename file is in both places. Simpler perl
> programs that don't use fork seem to
> work.
>
> Any ideas?
>
> Thanks for your time,
>
> John
>
> _______________________________________________________
> John R Larsen <address@hidden>
> http://larsen-family.us
>
>
--- original message ends here ---