summaryrefslogtreecommitdiffstats
path: root/perl-install
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
parent59b3b6e27042a68b7142f74478b8ccfeeb24d94c (diff)
downloaddrakx-backup-do-not-use-981a1e4cc59b821839666ceb291083c7716a7f05.tar
drakx-backup-do-not-use-981a1e4cc59b821839666ceb291083c7716a7f05.tar.gz
drakx-backup-do-not-use-981a1e4cc59b821839666ceb291083c7716a7f05.tar.bz2
drakx-backup-do-not-use-981a1e4cc59b821839666ceb291083c7716a7f05.tar.xz
drakx-backup-do-not-use-981a1e4cc59b821839666ceb291083c7716a7f05.zip
(raw) run_program layer: enable to drop privileges through setuid()
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/NEWS1
-rw-r--r--perl-install/run_program.pm5
2 files changed, 6 insertions, 0 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index 90c6f05ae..785362668 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,6 +1,7 @@
- distinct exceptions from segfaults, thus restoring catching SIGSEGV
and preventing looping while segfaulting again
- fix loading of tifm_sd module (#18237)
+- run_program layer: enable to drop privileges through setuid()
- drakbug:
o run the regular user browser (#33522)
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);