User dir in /run is set in env var?

Lennart Poettering mzkqt at 0pointer.de
Mon Apr 15 04:46:03 PDT 2013


On Mon, 15.04.13 12:35, Stef Bon (stefbon at gmail.com) wrote:

> 
> Aha,
> 
> right! Thanks.
> 
> This is set in the environment of the user's shell.
> 
> Since my app fuse-workspace is a seperate service, and reacting on
> login/logout events by watching:
> a. the directory /run/systemd/users for systemd
> b.consolekit if available
> or a
> c. pam module special for this (pam_script)) on other systems
> 
> howdo I get this environment var from the specific session to the
> fuse-workspace process??

Well, in theory libsystemd-login.so could export a function for that for
you. However, that's dangerous business, if your services runs under a
different UID than the user. In general it's a huge security issue if
privileged code and unprivileged code write to the same directory (with
the exceoption if they do that with mkstemp(), which doesn't sound right
here...)

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the xdg mailing list