Bug 51521 - DBUS_CONSOLE_AUTH_DIR is assumed to end with "/"
Summary: DBUS_CONSOLE_AUTH_DIR is assumed to end with "/"
Status: RESOLVED FIXED
Alias: None
Product: dbus
Classification: Unclassified
Component: core (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Havoc Pennington
QA Contact: John (J5) Palmieri
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-28 07:03 UTC by Simon McVittie
Modified: 2012-06-28 09:06 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Simon McVittie 2012-06-28 07:03:11 UTC
To reproduce: configure with --enable-console-auth-dir=/var/run/console and without systemd

Expected result: at_console rules check for /var/run/console/smcv which is created by ConsoleKit

Actual result: at_console rules check for /var/run/consolesmcv which, oddly enough, doesn't exist

This is because _dbus_user_at_console() blindly assumes that DBUS_CONSOLE_AUTH_DIR ends with "/", and appends the username without a separator. The default *does* end with "/", hiding this bug.

It should append "/" before the username if there isn't already one there.

Noticed by ioni when Arch tried to move to using /run/console (as opposed to  /run/console/ which would have worked).

Patches welcome.
Comment 1 Simon McVittie 2012-06-28 09:06:36 UTC
Fixed in git for 1.6.4, 1.7.0; thanks to Dave Reisner for the patch.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.