Bug 218648 - can't kill other user's processes
Summary: can't kill other user's processes
Status: RESOLVED FIXED
Alias: None
Product: ksysguard
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: KSysGuard Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-14 15:44 UTC by Kai
Modified: 2009-12-15 10:20 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kai 2009-12-14 15:44:19 UTC
Version:           KDE 4.3.80 release 197 (using Devel)
OS:                Linux
Installed from:    Compiled sources

When I select other user's(e.g. root's) process in ksysguard and choose "kill process" in the right-click menu, an error appears: "You do not have the permission to kill the process and there was a problem trying to run as root. Error 4". When choosing any other signal(STOP, TERM, ...) the same error appears. So i have to go to the console, run "su" and "killall <processname>", and this is quite inconveniently. But in KDE <= 4.3.4 when I tried to kill other's process, there appeared a window asking for a root password, so I was able to kill other's process right in ksysguard.

KDE 4.3.80 "release 197"
Comment 1 John Tapsell 2009-12-14 16:19:22 UTC
I think that this is just because you are compiling from sources.

I switched over to using KAuth (policykit) instead of kdesu, but this needs to be installed into certain directories.  You have probably set a prefix directory, so these files don't get installed.

When you upgrade your system next, your distro should install the needed files.  There's not much I can do to fix this in the meantime sorry.
Comment 2 Kai 2009-12-14 16:30:58 UTC
(In reply to comment #1)
 > I think that this is just because you are compiling from sources.
  
Maybe I did a mistake in bug wizard - I'm using binary rpm packets from opensuse repository( http://download.opensuse.org/repositories/KDE:/KDE4:/Factory:/Desktop/openSUSE_11.2 )

 > I switched over to using KAuth (policykit) instead of kdesu, but this needs to
 > be installed into certain directories.  You have probably set a prefix
 > directory, so these files don't get installed.

can I fix that issue by adding some permissions to my user in /etc/PolicyKit/PolicyKit.conf ?
Comment 3 John Tapsell 2009-12-14 16:48:56 UTC
Ah sorry.  I was a bit too hasty :)

I'll ping Dario to see if he has any ideas.
Comment 4 John Tapsell 2009-12-14 17:19:39 UTC
I think your distro has installed it to /opt  or something?

If so, I think you need to copy from /opt/usr/Polkit/*  to /usr/Polkit  or something
Comment 5 Kai 2009-12-14 17:40:40 UTC
(In reply to comment #4)
 > I think your distro has installed it to /opt  or something?
  
> whereis PolicyKit
PolicyKit: /etc/PolicyKit /usr/lib/PolicyKit /usr/share/PolicyKit /usr/share/man/man8/PolicyKit.8.gz
> ls /usr/share/PolicyKit/
config.dtd  policy
> ls /usr/share/PolicyKit/policy/
org.freedesktop.hal.dockstation.policy                  org.freedesktop.policykit.policy
org.freedesktop.hal.killswitch.policy                   org.kde.fontinst.policy
org.freedesktop.hal.leds.policy                         org.kde.kcontrol.kcmclock.policy
org.freedesktop.hal.policy                              org.kde.kcontrol.kcmremotewidgets.policy
org.freedesktop.hal.power-management.policy             org.kde.ksysguard.processlisthelper.policy
org.freedesktop.hal.storage.policy                      org.opensuse.yast.modules.yapi.language.policy
org.freedesktop.hal.wol.policy                          org.opensuse.yast.modules.yapi.time.policy
org.freedesktop.network-manager-settings.system.policy

in /opt/ there are only kde3 files.

 > If so, I think you need to copy from /opt/usr/Polkit/*  to /usr/Polkit  or
 > something

erm, I dont think that's good idea...
Comment 6 Dario Freddi 2009-12-14 17:49:41 UTC
Your system configuration is correct - the error you're getting means that you're not authorized to perform the action. To check if that is true, you might want to check in the policykit control module if you see the action correctly.

If you do, the causes could be that consolekit is not running on your system (in that case the authorization would be forbidden by default), or you're simply not authorized to perform the action. If not the former (which you can verify by changing the policies in the policykit control module), posting your PolicyKit.conf might help finding out the reason.
Comment 7 Kai 2009-12-14 18:14:53 UTC
(In reply to comment #6)
 > Your system configuration is correct - the error you're getting means that
 > you're not authorized to perform the action. To check if that is true, you
 > might want to check in the policykit control module if you see the action
 > correctly.

Yes, I've changed policies in policykit control module -> org.kde -> ksysguard -> KSysGuard -> "Kill or stop etc a process"(org.kde.ksysguard.processlisthelper.sendsignal) to "authenticate as root", and now everything works flawless.
I think these policies should be set up by default.

Thanks for your help!
Comment 8 Dario Freddi 2009-12-14 18:37:14 UTC
Those policies are off for security reasons - you probably might want to file a bug against opensuse to provide correct consolekit support (or if they don't want to, they can patch the policy files out before installing them)
Comment 9 John Tapsell 2009-12-15 10:20:16 UTC
Dario, so..  what exactly does opensuse need to do?  What about their consolekit support is wrong?