summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-09-05 12:12:49 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-09-05 12:12:49 +0000
commit8d58db1534e63417aca9322fe5917d613926a2f2 (patch)
tree55fd671ebbef0e824dab430676ad4a6df7c82bfa
parent659f466274636c45e553cadf43b0cb2a466bc77c (diff)
downloaddrakx-backup-do-not-use-8d58db1534e63417aca9322fe5917d613926a2f2.tar
drakx-backup-do-not-use-8d58db1534e63417aca9322fe5917d613926a2f2.tar.gz
drakx-backup-do-not-use-8d58db1534e63417aca9322fe5917d613926a2f2.tar.bz2
drakx-backup-do-not-use-8d58db1534e63417aca9322fe5917d613926a2f2.tar.xz
drakx-backup-do-not-use-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)
-rw-r--r--perl-install/any.pm6
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;
}