Commit 2aaa6509 authored by Simon McVittie's avatar Simon McVittie

Deprecate the pam_console/pam_foreground flag-file directory

This feature is now compile-time conditional, and off by default.

pam_console appears to have been in Fedora and Gentoo until 2007.
pam_foreground seems to be specific to Debian and Ubuntu, where it was
unmaintained since 2008 and removed in 2010. The replacement for both
was ConsoleKit, which has itself been superseded by systemd-logind and
Signed-off-by: Simon McVittie's avatarSimon McVittie <>
Bug: Philip Withnall's avatarPhilip Withnall <>
parent 10c02633
D-Bus 1.11.18 (UNRELEASED)
Build-time configuration changes:
By default, dbus-daemon on Unix no longer checks for flag files
/var/run/console/${username} created by the obsolete pam_console and
pam_foreground PAM modules when deciding whether ${username} is
currently at the console. The old default behaviour can be restored
by specifying --with-console-auth-dir=/var/run/console in the
recommended Autotools build system, or
-DDBUS_CONSOLE_AUTH_DIR=/var/run/console in CMake. This feature is
now deprecated, and will be removed in dbus 1.13 unless feedback via
fd.o #101629 indicates that this would be problematic.
(fd.o #101629, Simon McVittie)
<allow> and <deny> rules in dbus-daemon configuration can now
......@@ -435,11 +435,7 @@ endif()
# Not used on Windows, where there is no system bus
if (WIN32)
else (WIN32)
set (DBUS_CONSOLE_AUTH_DIR "/var/run/console/")
endif (WIN32)
set (DBUS_CONSOLE_AUTH_DIR "" CACHE STRING "Directory to check for pam_console/pam_foreground flag files, or empty to ignore")
# This won't work on Windows. It's not meant to - the system bus is
# meaningless on Windows anyway.
......@@ -611,7 +607,13 @@ message(" System bus socket: ${DBUS_SYSTEM_SOCKET} "
message(" System bus PID file: ${DBUS_SYSTEM_PID_FILE} ")
message(" System bus user: ${DBUS_USER} ")
message(" Session bus socket dir: ${DBUS_SESSION_SOCKET_DIR} ")
message(" Console auth dir: ${DBUS_CONSOLE_AUTH_DIR} ")
message(" pam_console auth dir: ${DBUS_CONSOLE_AUTH_DIR} ")
message(" pam_console auth dir: (none) ")
message(" 'make check' socket dir: ${TEST_SOCKET_DIR} ")
message(" Test listen address: ${TEST_LISTEN} ")
......@@ -1606,16 +1606,10 @@ fi
#### Directory to check for console ownership
if ! test -z "$with_console_auth_dir"; then
# We don't use runstatedir for this, because /var/run is the
# path that was traditionally used by pam_console and pam_foreground.
AC_DEFINE_UNQUOTED(DBUS_CONSOLE_AUTH_DIR, "$DBUS_CONSOLE_AUTH_DIR", [Directory to check for console ownerhip])
AS_IF([test -n "$with_console_auth_dir" && test "x$with_console_auth_dir" != xno],
[AC_DEFINE_UNQUOTED([DBUS_CONSOLE_AUTH_DIR], ["$with_console_auth_dir"],
[Directory to check for pam_console/pam_foreground flag files, or undefined])],
#### File to check for console ownership
if test x$have_console_owner_file = xyes; then
......@@ -1982,7 +1976,7 @@ echo "
System bus PID file: ${DBUS_SYSTEM_PID_FILE}
Session bus listens on: ${DBUS_SESSION_BUS_LISTEN_ADDRESS}
Session clients connect to: ${DBUS_SESSION_BUS_CONNECT_ADDRESS}
Console auth dir: ${DBUS_CONSOLE_AUTH_DIR}
pam_console auth dir: ${with_console_auth_dir:-(none)}
Console owner file: ${have_console_owner_file}
Console owner file path: ${DBUS_CONSOLE_OWNER_FILE}
System bus user: ${DBUS_USER}
......@@ -548,7 +548,7 @@ dbus_bool_t
_dbus_user_at_console (const char *username,
DBusError *error)
DBusString u, f;
dbus_bool_t result;
......@@ -579,6 +579,9 @@ _dbus_user_at_console (const char *username,
_dbus_string_free (&f);
return result;
return FALSE;
......@@ -175,6 +175,9 @@ case "$ci_buildsys" in
set "$@" --disable-launchd --disable-systemd
# No X11 autolaunching
set "$@" --disable-x11-autolaunch
# Re-enable the deprecated pam_console support to make
# sure it still builds
set "$@" --with-console-auth-dir=/var/run/console
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment