[Bug 294003] libpam/modules/pam_xdg: #define BASE_RUNTIME_DIR_PREFIX "/var/run/xdg" add trailing slash ("/")?

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 23 Mar 2026 21:30:28 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294003

Benjamin Takacs <nimaje+fbz@bureaucracy.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nimaje+fbz@bureaucracy.de

--- Comment #1 from Benjamin Takacs <nimaje+fbz@bureaucracy.de> ---
hm, that seems strange. The "Can't mkdir" error message most likly comes from
line 85 in pam_xdg.c, but there it failed to create the base direcotry, so the
path ends with "xdg" and that "pamtester" string doesn't belong to the path.

That also matches pamtesters code, as pamtester prints its name, a colon and
then the pam error message when some pam function failed. So a missing newline
after the error message from pam_xdg makes that confusing, but no idea why that
doesn't get printed. (openpam_ttyconv should print it)

Neither   open("/var/run/xdg", O_DIRECTORY)   nor   mkdir("/var/run/xdg")  
should need that extra slash and I don't see how adding that could have fixed
your problem. All later calls use *at functions with the directory descriptor.

-- 
You are receiving this mail because:
You are the assignee for the bug.