History log of /freebsd-current/lib/libpam/modules/pam_xdg/pam_xdg.c
Revision Date Author Comments
# cca0ce62 27-May-2024 Andre Albsmeier <mail@fbsd2.e4m.org>

pam_xdg: pam_get_item can return NULL

Fix pam_xdg as pam_get_item can return NULL, this happens when pressing
control + C in xdm for example.

MFC after: 1 week
PR: 279268


# 56ec98a0 01-Mar-2024 Emmanuel Vadot <manu@FreeBSD.org>

pam_xdg: Close the dir after removal

CID: 1534878
Sponsored by: Beckhoff Automation GmbH & Co. KG


# 5acbe6d1 27-Feb-2024 Emmanuel Vadot <manu@FreeBSD.org>

pam_xdg: Reset rv to 0

Otherwise on success it ontain the return value of asprintf.

Sponsored by: Beckhoff Automation GmbH & Co. KG
Fixes: 2d2950c88933 ("pam_xdg: Check asprintf return value")


# 2d2950c8 26-Feb-2024 Emmanuel Vadot <manu@FreeBSD.org>

pam_xdg: Check asprintf return value

Reported by: Shawn Webb <shawn.webb@hardenedbsd.org>
Sponsored by: Beckhoff Automation GmbH & Co. KG
Fixes: 6e69612d5df1 ("pam: Add pam_xdg module")


# 84329908 26-Feb-2024 Emmanuel Vadot <manu@FreeBSD.org>

pam_xdg: Remove leftover debug printf

Sponsored by: Beckhoff Automation GmbH & Co. KG
Fixes: 6e69612d5df1 ("pam: Add pam_xdg module")


# 6e69612d 21-Feb-2024 Emmanuel Vadot <manu@FreeBSD.org>

pam: Add pam_xdg module

This is a module to setup the XDG directories and environment variables.
For now the only usage is to have a XDG_RUNTIME_DIR environment setup at
user login.
All other environment variable have a default fallback so no need to export
them in this module.
The directory is created according to the XDG Base directory specification.

The default base directory is /var/run/xdg/<username> but can be configured
using the runtime_dir=<dir> module option.

According to the spec the directory *must* not survive a reboot so adding
var_run_enable="YES" to rc.conf is highly recommanded.

Reviewed by: des, pauamma (manpages)
Differential Revision: https://reviews.freebsd.org/D44011
Sponsored by: Beckhoff Automation GmbH & Co. KG