Bug 210373

Summary: ignores work path of desktop shortcut if "Remember password" is set
Product: [Applications] kdesu Reporter: Flavio Stanchina <flavio>
Component: kdesudAssignee: kdesu bugs tracker <kdesu-bugs-null>
Status: CONFIRMED ---    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Flavio Stanchina 2009-10-12 21:30:13 UTC
Version:            (using KDE 4.3.2)
OS:                Linux
Installed from:    Debian testing/unstable Packages

I created a desktop shortcut that launches xterm as root, and I set the work path to "/". If I select "Remember password", the xterm opens in $HOME/Documents. If I leave "Remember password" unset, it opens in / as expected.
Comment 1 Flavio Stanchina 2009-10-12 21:42:15 UTC
I looked at the processes involved with these simple commands:

for p in /proc/*; do \
  if (readlink $p/exe | grep -q kdesu); then \
    ls -l $p/cwd $p/exe; fi; done

The result is:

lrwxrwxrwx 1 root   ... /proc/3566/cwd -> /home/flavio/Documents
lrwxrwxrwx 1 root   ... /proc/3566/exe -> /usr/lib/kde4/libexec/kdesud
lrwxrwxrwx 1 flavio ... /proc/5676/cwd -> /
lrwxrwxrwx 1 flavio ... /proc/5676/exe -> /usr/lib/kde4/libexec/kdesu
lrwxrwxrwx 1 root   ... /proc/5696/cwd -> /home/flavio/Documents
lrwxrwxrwx 1 root   ... /proc/5696/exe -> /usr/lib/kde4/libexec/kdesud
lrwxrwxrwx 1 root   ... /proc/5707/cwd -> /home/flavio/Documents
lrwxrwxrwx 1 root   ... /proc/5707/exe -> /usr/lib/kde4/libexec/kdesu_stub

(group and dates omitted for brevity)

Apparently, kdesud doesn't "get" the working directory from kdesu.
Comment 2 Flavio Stanchina 2010-10-17 23:25:29 UTC
Bug still present in KDE 4.4.5 from Debian testing/unstable.
Comment 3 Oswald Buddenhagen 2010-11-07 19:01:02 UTC
indeed, the kdesud protocol has no provisions for passing a working directory to the command.
Comment 4 Justin Zobel 2021-03-09 23:42:34 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.