Properly concat DBUS_CONSOLE_AUTH_DIR with username

This removes the assumption that DBUS_CONSOLE_AUTH_DIR ends with a
trailing /.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=51521
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
This commit is contained in:
Dave Reisner 2012-06-28 15:50:46 +01:00 committed by Simon McVittie
parent 93616f0d37
commit b138aa0f94

View file

@ -540,7 +540,7 @@ _dbus_user_at_console (const char *username,
DBusError *error)
{
DBusString f;
DBusString u, f;
dbus_bool_t result;
result = FALSE;
@ -556,8 +556,9 @@ _dbus_user_at_console (const char *username,
goto out;
}
_dbus_string_init_const (&u, username);
if (!_dbus_string_append (&f, username))
if (!_dbus_concat_dir_and_file (&f, &u))
{
_DBUS_SET_OOM (error);
goto out;