projects
/
cloudstore.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f536037
)
chroot into slice dir to limit security exposure
author
Dobrica Pavlinusic
<dpavlin@rsync1>
Wed, 30 Nov 2011 20:20:18 +0000
(21:20 +0100)
committer
Dobrica Pavlinusic
<dpavlin@rsync1>
Wed, 30 Nov 2011 20:20:18 +0000
(21:20 +0100)
gearman/send_file.pl
patch
|
blob
|
history
diff --git
a/gearman/send_file.pl
b/gearman/send_file.pl
index
6ef1c87
..
944df9a
100755
(executable)
--- a/
gearman/send_file.pl
+++ b/
gearman/send_file.pl
@@
-74,5
+74,12
@@
$worker->register_function( delete => sub {
});
warn "$0 pid $$ waitng for jobs\n";
});
warn "$0 pid $$ waitng for jobs\n";
+
+if ( $ENV{SLICE} ) {
+ chroot $ENV{SLICE} || die "can't chroot $ENV{SLICE}: $!";
+} else {
+ warn "WARNING: not running under chroot SLICE=/hostname/sx\n";
+}
+
$worker->work while 1;
$worker->work while 1;