GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
PAM_XDG(8) FreeBSD System Manager's Manual PAM_XDG(8)

pam_xdg.so
PAM module that manages XDG Base Directories

pam_xdg.so [runtime] [notroot] [track_sessions [per_user_lock]]

pam_xdg.so is a PAM module that manages creation of the XDG_RUNTIME_DIR directory, as well as injection of environment variables denoting all directories specified by the XDG Base Directory Specification into user sessions.

When linked into the PAM session system the runtime directory will be created once a user creates his or her first login session. Unless runtime was given all XDG related environment variables will be created in all user sessions with their default or computed values, otherwise only XDG_RUNTIME_DIR. If notroot was given the module will bypass itself for root account logins and perform no actions for root. Lastly track_sessions will enable session tracking: once the last session ends, the user's XDG_RUNTIME_DIR will be recursively removed; on high-load servers then setting per_user_lock will reduce lock file lock contention.

In order to make use of this module, place the following in the ‘session’ part of the control file of desire under /etc/pam.d, on Linux it may be /etc/pam.d/common-session if that exists, on BSD's the files /etc/pam.d/system as well as /etc/pam.d/login, /etc/pam.d/sshd and /etc/pam.d/su may be desirable, adjusting paths as necessary:

session optional pam_xdg.so notroot track_sessions

pam(3), pam.conf(5)

Steffen Nurpmeso ⟨steffen@sdaoden.eu⟩.

On Unix systems any “daemonized” program or script is reparented to the program running with PID 1, most likely leaving the PAM user session without PAM recognizing this. Yet careless such code may hold or expect availability of resources of the session it just left, truly performing cleanup when sessions end seems thus unwise. Since so many PAM modules do support session tracking and cleanup pam_xdg.so readded optional support for this.
August 1, 2021 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 8 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.