2021-01-30 23:10:12 +01:00
|
|
|
.\"@ pam_xdg - manage XDG Base Directories (runtime dir life time, environ).
|
|
|
|
.\"
|
|
|
|
.\" Copyright (c) 2021 Steffen Nurpmeso <steffen@sdaoden.eu>.
|
|
|
|
.\" SPDX-License-Identifier: ISC
|
|
|
|
.\"
|
|
|
|
.\" Permission to use, copy, modify, and/or distribute this software for any
|
|
|
|
.\" purpose with or without fee is hereby granted, provided that the above
|
|
|
|
.\" copyright notice and this permission notice appear in all copies.
|
|
|
|
.\"
|
|
|
|
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
|
|
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
|
|
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
|
|
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
|
|
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
|
|
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
|
|
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
|
|
.
|
2021-01-31 01:39:17 +01:00
|
|
|
.Dd January 31, 2021
|
2021-01-30 23:10:12 +01:00
|
|
|
.Dt PAM_XDG 8
|
|
|
|
.Os
|
|
|
|
.
|
|
|
|
.
|
|
|
|
.Sh NAME
|
|
|
|
.Nm pam_xdg.so
|
|
|
|
.Nd PAM module that manages XDG Base Directories
|
|
|
|
.
|
|
|
|
.
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.
|
|
|
|
.Nm
|
|
|
|
.Op Ar rundir
|
|
|
|
.Op Ar notroot
|
|
|
|
.
|
|
|
|
.
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
.
|
|
|
|
.Nm
|
2021-01-31 01:39:17 +01:00
|
|
|
is a PAM module that manages creation of the
|
2021-01-30 23:10:12 +01:00
|
|
|
.Ev XDG_RUNTIME_DIR
|
|
|
|
directory, as well as injection of environment variables denoting all
|
|
|
|
directories specified by the
|
|
|
|
.Lk https://specifications.\:freedesktop.\:org/basedir-\:\
|
|
|
|
spec/\:basedir-\:spec-\:latest.html "XDG Base Directory Specification"
|
|
|
|
into user sessions.
|
|
|
|
.
|
|
|
|
.Pp
|
2021-01-31 01:39:17 +01:00
|
|
|
When linked into the PAM session system the runtime directory will be
|
|
|
|
created once a user creates his or her first login session.
|
2021-01-30 23:10:12 +01:00
|
|
|
Unless
|
|
|
|
.Ar rundir
|
2021-01-31 01:39:17 +01:00
|
|
|
was given all XDG related environment variables will be created in all
|
|
|
|
user sessions with their default or computed values, otherwise only
|
2021-01-30 23:10:12 +01:00
|
|
|
.Ev XDG_RUNTIME_DIR .
|
|
|
|
If
|
|
|
|
.Ar notroot
|
2021-01-31 01:39:17 +01:00
|
|
|
was given the module will bypass itself for root account logins and
|
|
|
|
perform no actions for root.
|
2021-01-30 23:10:12 +01:00
|
|
|
.
|
|
|
|
.Pp
|
|
|
|
In order to make use of this script, place the following in the control
|
|
|
|
file of desire under
|
|
|
|
.Pa /etc/pam.d ,
|
|
|
|
best maybe
|
|
|
|
.Pa /etc/pam.d/common-session
|
|
|
|
if that exists (possibly adjusting paths):
|
|
|
|
.
|
|
|
|
.Bd -literal -offset indent
|
|
|
|
session optional pam_xdg.so notroot
|
|
|
|
.Ed
|
|
|
|
.
|
|
|
|
.
|
|
|
|
.Sh "SEE ALSO"
|
|
|
|
.
|
|
|
|
.Xr pam.conf 5 ,
|
|
|
|
.Xr pam.d 8 ,
|
|
|
|
.Xr pam 8
|
|
|
|
.
|
|
|
|
.
|
|
|
|
.Sh AUTHORS
|
|
|
|
.
|
|
|
|
.An "Steffen Nurpmeso" Aq steffen@sdaoden.eu .
|
|
|
|
.
|
|
|
|
.\" s-ts-mode
|