mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-09 08:28:02 +02:00
* tools/dbus-launch-x11.c (get_session_file, init_x_atoms):
check if get_machine_uuid() returns NULL before proceeding any
further: we can't init the X atoms or create a session file
name if there is no machine ID.
This solves a crash reported by some users if
--exit-with-session was used without --autolaunch=<machine-id>
This commit is contained in:
parent
a107da8489
commit
01b91ba121
2 changed files with 17 additions and 4 deletions
|
|
@ -1,3 +1,12 @@
|
|||
2006-10-26 Thiago Macieira <thiago@kde.org>
|
||||
|
||||
* tools/dbus-launch-x11.c (get_session_file, init_x_atoms):
|
||||
check if get_machine_uuid() returns NULL before proceeding any
|
||||
further: we can't init the X atoms or create a session file
|
||||
name if there is no machine ID.
|
||||
This solves a crash reported by some users if
|
||||
--exit-with-session was used without --autolaunch=<machine-id>
|
||||
|
||||
2006-10-26 John (J5) Palmieri <johnp@redhat.com>
|
||||
|
||||
* tools/dbus-launch.c (main): run the dbus-daemon in the builddir
|
||||
|
|
|
|||
|
|
@ -98,6 +98,10 @@ get_session_file (void)
|
|||
char *result;
|
||||
char *p;
|
||||
|
||||
machine = get_machine_uuid ();
|
||||
if (machine == NULL)
|
||||
return NULL;
|
||||
|
||||
display = xstrdup (getenv ("DISPLAY"));
|
||||
if (display == NULL)
|
||||
{
|
||||
|
|
@ -143,8 +147,6 @@ get_session_file (void)
|
|||
*p = '_';
|
||||
}
|
||||
|
||||
machine = get_machine_uuid ();
|
||||
|
||||
home = get_homedir ();
|
||||
|
||||
result = malloc (strlen (home) + strlen (prefix) + strlen (machine) +
|
||||
|
|
@ -237,6 +239,10 @@ init_x_atoms (Display *display)
|
|||
if (init)
|
||||
return TRUE;
|
||||
|
||||
machine = get_machine_uuid ();
|
||||
if (machine == NULL)
|
||||
return FALSE;
|
||||
|
||||
user = getpwuid (getuid ());
|
||||
if (user == NULL)
|
||||
{
|
||||
|
|
@ -245,8 +251,6 @@ init_x_atoms (Display *display)
|
|||
}
|
||||
user_name = xstrdup(user->pw_name);
|
||||
|
||||
machine = get_machine_uuid ();
|
||||
|
||||
atom_name = malloc (strlen (machine) + strlen (user_name) + 2 +
|
||||
MAX (strlen (selection_prefix),
|
||||
MAX (strlen (address_prefix),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue