Bug 130896 - Running sudo kedit from gnome-terminal chown's .ICEauthority root
Summary: Running sudo kedit from gnome-terminal chown's .ICEauthority root
Status: RESOLVED WORKSFORME
Alias: None
Product: kde
Classification: I don't know
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Stephan Kulow
URL:
Keywords: investigated, triaged
Depends on:
Blocks:
 
Reported: 2006-07-16 10:40 UTC by Tim
Modified: 2018-10-21 04:45 UTC (History)
3 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 Tim 2006-07-16 10:40:16 UTC
Version:            (using KDE KDE 3.5.3)
Installed from:    Compiled From Sources
Compiler:          gcc-4.1.1 
OS:                Linux

When running a KDE app (fe kedit or kwrite) sudo from a gnome-terminal in a gnome session (not in KDE) .ICEauthority of the user gets chown-ed root. This prevents later xsessions for this user because .ICEauthority cannot be read.

.ICEauthority doesn't get chowned root if any K-app is started by the user first. The behaviour reappears as soon as all K-apps are terminated and root starts a new one.
Comment 1 Philip Rodrigues 2006-07-17 22:33:02 UTC
You might be able to work around this by using kdesu, FWIW.
Comment 2 Carsten Lohrke 2007-04-10 23:50:46 UTC
Ubuntu patched it, wouldn't harm in include in the 3.5 branch i suppose:

+--- kdelibs/kdecore/kapplication.cpp	2006-08-01 16:58:45.000000000 +0000
++++ kdelibs/kdecore/kapplication.cpp	2006-08-01 16:58:58.000000000 +0000
+@@ -774,6 +774,14 @@
+ 
+ void KApplication::init(bool GUIenabled)
+ {
++  // stop KDE programs run with sudo changing permissions on ~/.kde and /.ICEauthority
++  int uid = getuid();
++  if (uid == 0) {
++    setenv("ICEAUTHORITY", "/root/.ICEauthority", 0);
++    setenv("KDEROOTHOME", "/root/.kde", 0);
++    setenv("HOME", "/root", 1);
++  }
++
+   d->guiEnabled = GUIenabled;
+   if ((getuid() != geteuid()) ||
+       (getgid() != getegid()))
Comment 3 Médéric Boquien 2008-11-09 02:09:43 UTC
Hello,

Can you still reproduce the bug with the latest KDE 4 release?

Thanks.
Comment 4 FiNeX 2009-08-04 14:17:28 UTC
Marked this bug as "waitingforinfo" until someone can give some more informations about the status of the bug on KDE 4. Thanks.
Comment 5 Andrew Crouthamel 2018-09-20 03:10:30 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days, the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please set the bug status as REPORTED so that the KDE team knows that the bug is ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 6 Andrew Crouthamel 2018-10-21 04:45:33 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!