Unsets XDG_RUNTIME_DIR in processes run with kdesu

Authored by antlarr on Nov 10 2016, 2:49 PM.



If we keep a XDG_RUNTIME_DIR value from another user then all kind of
breakages might happen. For example, if user foo runs
"kdesu -u bar dolphin", then when dolphin tries to get
QStandardPaths::writableLocation(RuntimeLocation), it returns an empty string
(because XDG_RUNTIME_DIR is not correct). which makes kio try
to write a socket to access kio slaves in / . Which, for most users
results in applications not being able to use kio (so no usable dolphin)
and for root, it means sockets were created in / .

Look at https://bugzilla.opensuse.org/show_bug.cgi?id=1009510 and
https://phabricator.kde.org/D3317 for more information

Diff Detail

No Linters Available
No Unit Test Coverage
antlarr updated this revision to Diff 8075.Nov 10 2016, 2:49 PM
antlarr retitled this revision from to Unsets XDG_RUNTIME_DIR in processes run with kdesu.
antlarr updated this object.
antlarr edited the test plan for this revision. (Show Details)
antlarr added a reviewer: dfaure.
dfaure accepted this revision.Nov 10 2016, 10:31 PM
dfaure edited edge metadata.
This revision is now accepted and ready to land.Nov 10 2016, 10:31 PM
antlarr closed this revision.Nov 11 2016, 9:53 AM