projects
/
gruntmaster-daemon.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
55e61ae
)
Drop privileges in gruntmaster-exec if possible
author
Marius Gavrilescu
<marius@ieval.ro>
Thu, 22 Jan 2015 21:48:23 +0000
(23:48 +0200)
committer
Marius Gavrilescu
<marius@ieval.ro>
Thu, 22 Jan 2015 21:48:23 +0000
(23:48 +0200)
gruntmaster-exec
patch
|
blob
|
blame
|
history
diff --git
a/gruntmaster-exec
b/gruntmaster-exec
index 49e915a8d5cf131075170b7fcb6539ac1a3a4bd4..a4ae94d4ce0335575dd4dcfa50b7a208078a1a69 100755
(executable)
--- a/
gruntmaster-exec
+++ b/
gruntmaster-exec
@@
-64,6
+64,8
@@
if ($ret) {
%ENV = (ONLINE_JUDGE => 1, PATH => $ENV{PATH}, HOME => $ENV{HOME});
setrlimit RLIMIT_AS, $mlimit, $mlimit or die $! if $mlimit;
setrlimit RLIMIT_FSIZE, $olimit, $olimit or die $! if $olimit;
%ENV = (ONLINE_JUDGE => 1, PATH => $ENV{PATH}, HOME => $ENV{HOME});
setrlimit RLIMIT_AS, $mlimit, $mlimit or die $! if $mlimit;
setrlimit RLIMIT_FSIZE, $olimit, $olimit or die $! if $olimit;
+ POSIX::setgid 65534; # Set group id to nogroup
+ POSIX::setuid 65534; # Set user id to nobody
exec @ARGV;
}
exec @ARGV;
}
This page took
0.010835 seconds
and
4
git commands to generate.