summaryrefslogtreecommitdiffstats
path: root/perl-install/run_program.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2007-09-13 22:24:42 +0000
committerThierry Vignaud <tv@mandriva.org>2007-09-13 22:24:42 +0000
commit981a1e4cc59b821839666ceb291083c7716a7f05 (patch)
tree47f3ff6c41495fbc6647c59a92603768f5253986 /perl-install/run_program.pm
parent59b3b6e27042a68b7142f74478b8ccfeeb24d94c (diff)
downloaddrakx-981a1e4cc59b821839666ceb291083c7716a7f05.tar
drakx-981a1e4cc59b821839666ceb291083c7716a7f05.tar.gz
drakx-981a1e4cc59b821839666ceb291083c7716a7f05.tar.bz2
drakx-981a1e4cc59b821839666ceb291083c7716a7f05.tar.xz
drakx-981a1e4cc59b821839666ceb291083c7716a7f05.zip
(raw) run_program layer: enable to drop privileges through setuid()
Diffstat (limited to 'perl-install/run_program.pm')
-rw-r--r--perl-install/run_program.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/perl-install/run_program.pm b/perl-install/run_program.pm
index 3c7e556dd..11ebc2289 100644
--- a/perl-install/run_program.pm
+++ b/perl-install/run_program.pm
@@ -109,6 +109,11 @@ sub raw {
$ok;
}
} else {
+ if ($options->{setuid}) {
+ require POSIX;
+ POSIX::setuid($options->{set_uid});
+ }
+
sub die_exit {
log::l($_[0]);
c::_exit(128);