Author Topic: <Explained> KDE not obeying permissions  (Read 697 times)

Offline kjpetrie

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 4037
<Explained> KDE not obeying permissions
« on: May 21, 2010, 04:02:23 PM »
I have a problem with KDE not obeying, or even circumventing, permissions.

If I open a terminal, su to root, and type "chmod 700 /usr/bin/kwrite" and then confirm with an "ls -l" that the permission has been changed, I can still launch kwrite from the menu. The same applies to kmix and konqueror, but not to gimp, so it looks as if it's KDE native applications which are affected.

Have I got a problem on my system (well, yes I have) or is this happening to others as well?

The applications so launched aren't run as root - ie I can't open files such as menu.lst with kwrite, so it's not necessarily exploitable, but it does prevent administrators controlling who can run what.
« Last Edit: May 22, 2010, 09:39:26 AM by kjpetrie »
-----------
KJP
-----------------------------------------------------------
PClos64 RC1 on Intel D945GCLF2 motherboard (Atom 330), 2GB DDR2 RAM, Maxtor STM325031, HL-DT-ST DVDRAM GSA-H42N, Amilo LSL 3220T monitor. Also Acer 5810TG (with custom kernel) and Asus eeePC 2G surf

Offline Bald Brick

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6470
  • I'm going South
Re: KDE not obeying permissions
« Reply #1 on: May 21, 2010, 07:33:35 PM »
is this happening to others as well?

It is.
Feed the trolls!
They need it!

AMD Athlon 7450 Dual-Core Processor, 7.80 GiB RAM, Nvidia GeForce GT 120/PCIe/SSE2, OpenGL/ES-version: 3.3 0 NVIDIA 295.40, SBx00 Azalia (Intel HDA) soundcard, ‎Logitech B500 webcam, SAA7146 DVB card, HDDs: Seagate 250824AS, Western Digital WD10EAVS-00D

Offline muungwana

  • Hero Member
  • *****
  • Posts: 6266
Re: KDE not obeying permissions
« Reply #2 on: May 21, 2010, 07:50:20 PM »

kwrite doesnt start from the terminal but it does from the menu ..strange ..

i compile kde4 from source so this behavior isnt specific to pclinuxos
.. 3 things are certain in life : death, taxes and software bloat ..
.. tell me something i don't know, something i can use as i struggle to reason with the world around me ..

Offline Rudge

  • Hero Member
  • *****
  • Posts: 9768
  • I'm Just A Dog.
Re: KDE not obeying permissions
« Reply #3 on: May 21, 2010, 09:52:46 PM »
I have a problem with KDE not obeying, or even circumventing, permissions.

If I open a terminal, su to root, and type "chmod 700 /usr/bin/kwrite" and then confirm with an "ls -l" that the permission has been changed, I can still launch kwrite from the menu. The same applies to kmix and konqueror, but not to gimp, so it looks as if it's KDE native applications which are affected.

Have I got a problem on my system (well, yes I have) or is this happening to others as well?

The applications so launched aren't run as root - ie I can't open files such as menu.lst with kwrite, so it's not necessarily exploitable, but it does prevent administrators controlling who can run what.

You are changing the permissions on the wrong file. Linux obeys permissions and KDE will have to behave as well. If KDE is still able to launch the app you will have to reconsider which file KDE is launching. If a script logs on as root, it will run as root.
I am just babbling so ignore me. lol


-If you wish to make an apple pie from scratch, you must first invent the universe-  Carl Sagan

Offline aherkey

  • Full Member
  • ***
  • Posts: 109
Re: KDE not obeying permissions
« Reply #4 on: May 21, 2010, 10:57:49 PM »
You have to understand how KDE starts programs. Basically for KDE programs KDE uses kdeinit4 to launch them. It doesn't use the files in /usr/bin instead it uses the files in /usr/lib. You will see them listed as libkdeinit4_XXXXX.so where XXXXX is the program name.

The KDE binaries in /usr/bin are launchers that open libkdeinit4_XXXXX.so, so other DM's can run them. You can even remove /usr/bin/kwrite and KDE will still start it.

If you change permissions on /usr/lib/libkdeinit4_kwrite.so to 700 KDE won't be able to start kwrite as a normal user.

Please note that this is a simplistic description of how this works.

- Andy

Offline kjpetrie

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 4037
Re: <Explained> KDE not obeying permissions
« Reply #5 on: May 22, 2010, 09:40:13 AM »
Thanks. It's good to know there's nothing to panic about here!
-----------
KJP
-----------------------------------------------------------
PClos64 RC1 on Intel D945GCLF2 motherboard (Atom 330), 2GB DDR2 RAM, Maxtor STM325031, HL-DT-ST DVDRAM GSA-H42N, Amilo LSL 3220T monitor. Also Acer 5810TG (with custom kernel) and Asus eeePC 2G surf