summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-10-01 15:48:37 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-10-01 15:48:37 +0000
commitb0c7f3de6269888208876fe6406c0761b4ced2ab (patch)
tree006f9b807b1da34390b6beab092c57f5386273d6
parentce434ae886a34dc2bfbb2a2120cf9d2427e4b057 (diff)
downloaddrakx-b0c7f3de6269888208876fe6406c0761b4ced2ab.tar
drakx-b0c7f3de6269888208876fe6406c0761b4ced2ab.tar.gz
drakx-b0c7f3de6269888208876fe6406c0761b4ced2ab.tar.bz2
drakx-b0c7f3de6269888208876fe6406c0761b4ced2ab.tar.xz
drakx-b0c7f3de6269888208876fe6406c0761b4ced2ab.zip
- adapt ask_window_manager_to_logout() to make it work (need usermode changes)
-rw-r--r--perl-install/NEWS1
-rw-r--r--perl-install/any.pm12
2 files changed, 7 insertions, 6 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index 6daba3330..eedea84ae 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,6 +1,7 @@
- bootloader-config (and other tools): handle /dev/mapper/xxx1 instead of
/dev/mapper/xxxp1 (#44182)
- service_harddrake: enable/disable apmd if needed
+- adapt ask_window_manager_to_logout() to make it work (need usermode changes)
Version 11.62 - 1 October 2008
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 14ac12749..0304df559 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -1331,13 +1331,13 @@ sub ask_window_manager_to_logout {
'icewm' => "killall -QUIT icewm",
);
my $cmd = $h{$wm} or return;
- if ($wm eq 'gnome-session') {
- #- NB: consolehelper does not destroy $HOME whereas kdesu does
- #- for gnome, we use consolehelper, so below works
- $ENV{ICEAUTHORITY} ||= "$ENV{HOME}/.ICEauthority";
- } elsif (member($wm, 'ksmserver', 'kwin') && $> == 0) {
+ if (member($wm, 'ksmserver', 'kwin', 'gnome-session') && $> == 0) {
#- we can not use dcop when we are root
- $cmd = "su $ENV{USER} -c '$cmd'";
+ if (my $user = $ENV{USERHELPER_UID} && getpwuid($ENV{USERHELPER_UID})) {
+ $cmd = "su $user -c '$cmd'";
+ } else {
+ log::l('missing or unknown $USERHELPER_UID');
+ }
}
system($cmd);
1;