Bug 365722 - RFE: kwallet-pam should use XDG_RUNTIME_DIR instead of /tmp for the socketPath
Summary: RFE: kwallet-pam should use XDG_RUNTIME_DIR instead of /tmp for the socketPath
Status: RESOLVED FIXED
Alias: None
Product: kwallet-pam
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.7.1
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-15 19:52 UTC by Damjan Georgievski
Modified: 2017-01-21 00:12 UTC (History)
0 users

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


Attachments
attempt to implement it (3.51 KB, patch)
2016-07-15 22:57 UTC, Damjan Georgievski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Damjan Georgievski 2016-07-15 19:52:41 UTC
Most recent Linux distributions setup a per-user XDG_RUNTIME_DIR as a tmpfs, which is also tied to their session lifecycle. Typically this is in /run/user/1000/.

My suggestion is to use $XDG_RUNTIME_DIR/kwallet5.socket if XDG_RUNTIME_DIR exists, or fallback to /tmp/kwallet5_${username}.socket if it doesn't.

Reproducible: Always
Comment 1 Damjan Georgievski 2016-07-15 22:57:33 UTC
Created attachment 100122 [details]
attempt to implement it

Here's a patch based on the master branch at https://github.com/KDE/kwallet-pam
Comment 2 Albert Astals Cid 2017-01-21 00:12:29 UTC
Git commit d396744cc15b489e7cc74c30e9995423f17871a6 by Albert Astals Cid, on behalf of Damjan Georgievski.
Committed on 21/01/2017 at 00:11.
Pushed by aacid into branch 'Plasma/5.9'.

use XDG_RUNTIME_DIR instead of /tmp for the socketPath

Most recent Linux distributions setup a per-user XDG_RUNTIME_DIR as a tmpfs, which is also tied to their session lifecycle. Typically this is in /run/user/1000/.

My suggestion is to use $XDG_RUNTIME_DIR/kwallet5.socket if XDG_RUNTIME_DIR exists, or fallback to /tmp/kwallet5_${username}.socket if it doesn't.

REVIEW: 129526

M  +21   -11   pam_kwallet.c

https://commits.kde.org/kwallet-pam/d396744cc15b489e7cc74c30e9995423f17871a6