:: Re: [DNG] libpam-xdg-support / libp…
Top Page
Delete this message
Reply to this message
Author: tilt!
Date:  
To: dng
Subject: Re: [DNG] libpam-xdg-support / libpam-systemd
Hi Roger,

On 09/10/2015 01:46 PM, Roger Leigh wrote:
> On 10/09/2015 12:11, tilt! wrote:
>> Question open for debate:
>>
>> On a systemd-free system, should an alternative exist which
>> assumes the task of initializing XDG envvars as described by
>> [1] in the way done by [3]?
> [...]


Thank you very much for your explanation of how this
came to be, which is pretty much like i imagined.

Also thanks for pointing out the especially problematic
aspect of refcounting which i had overlooked.

> So my recommendation here would be to
> - place /run/user in a subdirectory of /tmp
> - configure XDG_RUNTIME_DIR to use this location either in a PAM module,
> or even by hardcoding the default to use this location--the
> specification might not provide this default, but an implementation
> certainly can.


Absolutely. I will implement a configfile as follows:

    # file /etc/jack-autostart/config.sh
    # (in Bourne Shell syntax)


    ## Where to place the permanent configuration:
    #configdir=${XDG_CONFIG_HOME:-$HOME/.config}/jack-autostart


    ## Where to place temporary files:
    #rundir=${XDG_RUNTIME_DIR:-/tmp/run/$USER}/jack-autostart


In the absence of that configfile, or if the directives are
commented out, the hardcoded default will be exactly as shown
above. Distributors and site-maintainers can change this to
what is more suitable for them.

The application will then perform

test -d "$rundir" || mkdir -p -m 077 "$rundir"

Apart from that, i will think a bit longer about a general
replacement for libpam_systemd. But i think we should provide
something, to avoid that users are spammed with warnings like
"XDG_RUNTIME_DIR not set", as [1] mandates applications to do:

    "If $XDG_RUNTIME_DIR is not set applications should fall
    back to a replacement directory with similar capabilities
    and print a warning message."


Best regards,
T.

Links:

[1] freedesktop.org. XDG Base Directory Specification.
URL: http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html