diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2002-09-05 12:12:49 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2002-09-05 12:12:49 +0000 |
commit | 8d58db1534e63417aca9322fe5917d613926a2f2 (patch) | |
tree | 55fd671ebbef0e824dab430676ad4a6df7c82bfa /perl-install | |
parent | 659f466274636c45e553cadf43b0cb2a466bc77c (diff) | |
download | drakx-8d58db1534e63417aca9322fe5917d613926a2f2.tar drakx-8d58db1534e63417aca9322fe5917d613926a2f2.tar.gz drakx-8d58db1534e63417aca9322fe5917d613926a2f2.tar.bz2 drakx-8d58db1534e63417aca9322fe5917d613926a2f2.tar.xz drakx-8d58db1534e63417aca9322fe5917d613926a2f2.zip |
(ask_window_manager_to_logout): do not su into user before doing dcop if
we are not root (otherwise localedrake in user ask for user's password
before login out) (thanks to H. Narfi Stefansson for reporting it)
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/any.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm index dc2c5ec8c..9aaabc615 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -1118,12 +1118,14 @@ sub ask_window_manager_to_logout { my ($wm) = @_; my %h = ( - 'kwin' => "su $ENV{USER} -c 'dcop kdesktop default logout'", + 'kwin' => "dcop kdesktop default logout", 'gnome-session' => "gnome-session-save -kill", 'icewm' => "killall -QUIT icewm", 'wmaker' => "killall -USR1 wmaker", ); - system($h{$wm} || return); + my $cmd = $h{$wm} or return; + $cmd = "su $ENV{USER} -c '$cmd'" if $wm eq 'kwin' && $> == 0; + system($cmd); 1; } |