Bug 48478 - double free due to missing return in lib _get_x11_display_for_new_systemd_session
Summary: double free due to missing return in lib _get_x11_display_for_new_systemd_ses...
Status: RESOLVED FIXED
Alias: None
Product: accountsservice
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Matthias Clasen
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-09 13:50 UTC by Alban Browaeys
Modified: 2012-04-09 13:54 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
lib: Add missing return in libaccountsservice (1.57 KB, patch)
2012-04-09 13:50 UTC, Alban Browaeys
Details | Splinter Review

Description Alban Browaeys 2012-04-09 13:50:11 UTC
Created attachment 59697 [details] [review]
lib: Add missing return in libaccountsservice

In _get_x11_display_for_new_systemd_session there is a missing return.

I found out that running gnome-shell from a remote box via ssh and
setting DISPLAY to :0 the systemd session type is tty. Also the uid
systemd is 0 for my user jhbuild gnome session run from debian gdm3
(ie not based on gnome-shell).
This triggers this error path which miss a "return" instruction.

I have been unable to find out if session type and uid are the same
for the same gdm session with gnome-shell started from gnome-session
though at least it also fixes the segfault there too.

This error code path is not triggered when starting gnome-session with
gnome-shell from a console + xinit inside a "jhbuild shell".
So this might be a weird use case but good to fix nevertheless.
Comment 1 Ray Strode [halfline] 2012-04-09 13:54:46 UTC
Thanks, pushed.


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.