diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2003-01-27 08:12:38 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2003-01-27 08:12:38 +0000 |
commit | 45f18adacd2637793a07bbb60283eeb2a811fc52 (patch) | |
tree | 1baceb57d652deb8f0d33c369fb820c87bbd5f32 /perl-install/interactive.pm | |
parent | 3730934e00cf265b0d2fcd40f3b1d7d3fee7fdc8 (diff) | |
download | drakx-45f18adacd2637793a07bbb60283eeb2a811fc52.tar drakx-45f18adacd2637793a07bbb60283eeb2a811fc52.tar.gz drakx-45f18adacd2637793a07bbb60283eeb2a811fc52.tar.bz2 drakx-45f18adacd2637793a07bbb60283eeb2a811fc52.tar.xz drakx-45f18adacd2637793a07bbb60283eeb2a811fc52.zip |
strip authentification out of interactive->vnew into common.pm
This enable apps that still use gtk+-1.2 via my_gtk to still work when
they only need interactive->vnew('su') just to get root capabilities.
Indeed, interactive load ugtk if it has access to the X server, which
make my_gtk and ugtk fight for the cpu forever... which is bad imho...
drakfloppy and net_monitor were converted to use it and are now usuable again
("i leave ... again" commit).
it would also enable to complete spec 64 by enabling rpmdrake
to use kdesu under kde and consolehelper under gnome.
rpmdrake is indeed the last program to not behave like
the running desktop to get root capability.
unless someone is against this, i'll convert the mcc and all other gtk+ pure
tools to do not use anymore interactive just to get root capability.
btw, i fixed the infamous SECTOR_SIZE warning...
Diffstat (limited to 'perl-install/interactive.pm')
-rw-r--r-- | perl-install/interactive.pm | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm index 5e949b166..b62390180 100644 --- a/perl-install/interactive.pm +++ b/perl-install/interactive.pm @@ -93,14 +93,8 @@ sub vnew { $ENV{PATH} = "/sbin:/usr/sbin:$ENV{PATH}"; $su = '' if $::testing || $ENV{TESTING}; } + require_root_capability() if $su; if ($ENV{DISPLAY} && system('/usr/X11R6/bin/xtest') == 0) { - if ($su && $>) { - if (fuzzy_pidofs(qr/\bkwin\b/) > 0) { - exec("kdesu", "-c", "$0 @ARGV") or die N("kdesu missing"); - } else { - exec { 'consolehelper' } $0, @ARGV or die N("consolehelper missing"); - } - } eval { require interactive::gtk }; if (!$@) { my $o = interactive::gtk->new; @@ -109,15 +103,8 @@ sub vnew { $::need_utf8_i18n = 1; return $o; } - } else { - if ($su && $>) { - exec { 'consolehelper' } $0, @ARGV or die N("consolehelper missing"); - } } - if ($su && $>) { - die "you must be root to run this program"; - } require 'log.pm'; #- "require log" causes some pb, perl thinking that "log" is the log() function undef *log::l; *log::l = sub {}; # otherwise, it will bother us :( |