0
|
1 |
This is an object oriented perl interface to the FreeBSD jail subsystem.
|
|
2 |
|
|
3 |
Here's a replica of the 'jls' utility in just a few lines of perl:
|
|
4 |
|
|
5 |
use BSD::Jail::Object 'jids';
|
|
6 |
|
|
7 |
print " JID IP Address Hostname Path\n";
|
|
8 |
printf "%6d %-15.15s %-29.29s %.74s\n",
|
|
9 |
$_->jid, $_->ip, $_->hostname, $_->path foreach jids( instantiate => 1 );
|
|
10 |
|
|
11 |
And here's 'jexec':
|
|
12 |
|
|
13 |
my $j = BSD::Jail::Object->new( $ARGV[0] ) or die $@;
|
|
14 |
$j->attach && chdir('/') && exec $ARGV[1] or exit;
|
|
15 |
|
|
16 |
For more info please use 'perldoc' on the module.
|
|
17 |
|
|
18 |
Author: Mahlon E. Smith <mahlon@martini.nu>
|