mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-02-19 01:50:49 +01:00
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:
parent
93616f0d37
commit
b138aa0f94
1 changed files with 3 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue