NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: XDG_RUNTIME_DIR



RVP wrote in
 <alpine.NEB.2.22.394.2104250922580.15127%otaku.sdf.org@localhost>:
 |On Sat, 24 Apr 2021, Steffen Nurpmeso wrote:
 |
 |> If you run Linux you could also use the pam_xdg module i have
 |> written.  For example my /etc/pam.d/common-session is
 |>
 |>  session optional pam_xdg.so notroot
 |>
 |>  session required    pam_unix.so quiet
 |>
 |> and the stuff is as attached.  It handles the other directories of
 |> the standard as well.
 |>
 |
 |This is, I presume, for Linux systems without systemd and pam_env.so?

systemd yes, pam_env no.  pam_env is pretty fat and does a lot of
things which are not needed here.  And of course it does not
create directories.

  ...
 |There should be a removal of the dirs. on the user's final session
 |logout, I think.

This is impossible to do with pam that i never liked (nor
understood, in FreeBSD ~twenty years ago), but CRUX gained it with
3.6, and i was right when looking from the code side.  'Thing is,
while doing this, i looked at code from login (of shadow) and all
that, and it is a pity if you see all the construction sites ..the
possibilities that have been buried there .. because of pam
.. because of systemd.  You rather look to some BSD with steady
iterations and improvements on login.conf or another mechanism.
I mean there is "finit", but that is a complicated mess also it
seems.  Yeah i mean, all this started because someone here was
using a server (written in R or another new/strange language that
came in as a depency) that was doing pam to do only the RUNDIR
part of the game.  But it is bitter, only the real unshare(1) with
a new PID 1 can do real book keeping, from user space.  I would
have expected actual support for this, yes.  Like it is, PAM
sessions are a gracy thing (imho).  I personally use my
/run/user/UID only for unshare(1) box roots.  I do not have
graphical programs but st(1) and firefox-bin (with audacity still
in the line to come).  But the thing does it and is used.

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)


Home | Main Index | Thread Index | Old Index