jailkit-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Jailkit-users] Jail broken after jk_init perl and jk_cp logger


From: Dimitri
Subject: [Jailkit-users] Jail broken after jk_init perl and jk_cp logger
Date: Thu, 10 Dec 2020 13:08:44 +1000
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.12.1

Hi and thanks for a great user management tool.


In the process of setting up a git repository using gitolite on my server and following the instructions at https://gitolite.com/gitolite/fool_proof_setup#fool-proof-step-by-step-install-and-setup,  I managed to break the jail of the virtual host which I'm intending to use. (I am using ISPConfig to manage my virtual-hosts.)

During the gitolite install, I found I needed to add Perl to the jail and performed `jk_init -v -f <rootJailFolder> perl`.  However, this did not fix the install script and I needed to add some additional libraries.  My modified [perl] definition, which fixed the issue I was having at this point, is:

[perl]
comment = the perl interpreter and libraries
executables = /usr/bin/perl
directories = /usr/lib/perl, /usr/lib/perl5, /usr/share/perl, /usr/share/perl5, /usr/lib/x86_64-linux-gnu/perl, /usr/lib/x86_64-linux-gnu/perl5, /usr/lib/x86_64-linux-gnu/perl-base

After doing this, I came across another problem where 'logger' was not found, so I added `regularfiles = /usr/bin/logger` to the [perl] definition, but used jk_cp to actually copy it into the jail (which carried with it a lot of dependencies, though it appears that some may have been missed).

On the next run, instead of getting Perl error messages, I received a SEG FAULT.

Subsequent to the SEG FAULT, I have not been able to `chroot` into the jail.

I suspect that either:
    some required files were not copied across when I added `/usr/bin/logger`
    some environment variable definition is missing, or
    there is a folder either missing or has the wrong permissions
which are causing the SEG FAULT.

As I'm only trivially familiar with Perl, I'm not  quite sure where to look and what to do next.  I've tried using DIFF to compare a still working jail (though one without Perl) with the broken jail, but I can't see anything significant yet.  I have also compared `strace chroot <rootJailFolder>` on a working jail with the one that's broken, but again there doesn't seem anything obvious.

I'm wondering if anyone else has had a similar issue and knows how to fix it?  Or, I'm wondering if anyone has suggestions on how to isolate the problem.

(I am able to provide further information/logs/etc. if needed.)

Thanks in advance, Dimitri.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]