| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
error was not freed in the second if branch. While at it use g_autoptr.
|
| |
|
|
|
|
|
|
|
|
|
| |
Just pass the error we received from the caller. While this doesn't
change much, it avoids a scan-build warning:
../daemon/gdm-display.c:213:73: warning: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') [core.NullDereference]
g_critical ("could not create display access file: %s", error->message);
^~~~~~~~~~~~~~
|
|
|
|
| |
Value stored to 'ret' is never read
|
| |
|
|
|
|
|
|
|
| |
Use g_autofree to avoid manual memory handling. While at it use g_strdup_printf
which is safer since it avoid us to calculate how much memory we need to allocate.
Fixes: 08eee2ae1175cc43015329a00230f38066130c57
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There's currently a way to disable wayland, but no way to disable Xorg.
We currently prefer wayland if it's not disabled, but have no way to
prefer Xorg without disabling wayland entirely.
There's currently no way use legacy Xorg support at all if user display
server support is enabled at a build time.
This commit adds more flexibility to display server selection. It adds
two new keys: XorgEnable and and PreferredDisplayServer.
XorgEnable=false disables Xorg support entirely on seat 0.
PreferredDisplayServer can be set to "wayland", "xorg", "legacy-xorg" or
"none" to select which display server is used by default. If it's set to
"wayland", it will fall back to "xorg". If it's set to "xorg" it will
fall back to "wayland".
|
|
|
|
|
|
|
|
|
|
|
|
| |
Normally, e.g., gdm-wayland-session would register its display
before starting the session. This display registration is how
the display moves to the "managed" state. We currently detect
session failure in gdm_display_unmanage. If gdm-wayland-session
is killed before it registers the display, gdm_display_unmanage
won't run, and failure won't be detected.
This commit make gdm_display_unmanage get called, even if the
display isn't yet fully managed.
|
|
|
|
| |
It will make things just cleaner
|
|
|
|
|
|
|
|
|
|
|
|
| |
Given not having users may make GDM to launch initial setup, that
allows to create new users (potentially with sudo capabilities), it's
better to make look_for_existing_users() to return its status and only
if it didn't fail continue the gdm execution.
GHSL-2020-202
CVE-2020-16125
Fixes #642
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Recording when sessions start, for Wayland → Xorg fallback or
transitioning to the user session, is currently done with timeouts.
This isn't ideal, because on some very slow machines the timeout can be
hit before the session has had a chance to fail: if gnome-session takes
more than 3 seconds to fail then the session will be considered to have
exited rather than failed, and so we don't do Xorg fallback.
We can do this more reliably if we allow sessions to optionally register
themselves with GDM. Then we will know when they've started, so can shut
down the greeter or fall back to Xorg as appropriate. The mechanism is
that they specify X-GDM-SessionRegisters=true in their file, and then
call RegsterSession on the DisplayManager interface on the bus (added in
the previous commit) to say that they've started up.
If X-GDM-SessionRegisters is missing or false, GDM will call the same
method for them after 10 seconds.
Closes: #483
|
|
|
|
|
| |
Window managers can use this to register with GDM when they've finished
starting up and started displaying.
|
|
|
|
| |
This prevents strings from being unnecessarily copied.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Right now we do the initial-setup related post work
when stopping the greeter, but the problem is we delay
stopping the greeter now until after the user session
is started.
That post-work needs to be done before the user session
is started.
This commit moves the code to a more logical place.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Right now we assume a display skeleton object won't
outlive its associated display object.
In theory that should be true, but if we accidentally
leak the skeleton it could erroneously happen.
If that does happen then we'll end accessing free'd
memory, so the leak will turn into a crasher.
This commit addresses this problem by ensuring
the skeleton signal handlers are disconnected when the
associated display object goes away.
CVE-2018-14424
|
| |
|
|
|
|
|
|
|
|
|
|
| |
We don't want to skip running initial setup if wayland
fell back or something.
This commit makes sure we only stop trying to start initial-setup
after it's completed.
https://bugzilla.gnome.org/show_bug.cgi?id=789434
|
|
|
|
|
|
|
|
|
| |
Use EXIT_ defines for readibility.
There were some exit codes > 1, but they don't seem to be checked by any of the
parent process code. This does mean that the logs might have changed, but
modern logging techniques have probably made this obsolete.
https://bugzilla.gnome.org/show_bug.cgi?id=788307
|
|
|
|
|
|
| |
This will either force the initial setup to run or not to run
Fixes #787286
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=788303
|
|
|
|
|
|
|
|
|
|
| |
When we're done with the display we need to kill off any clients
that are lingering and close our own connection to the display.
This is so, for instance, processes from the session don't
stick around on a -noreset Xvnc server (or something)
https://bugzilla.gnome.org/show_bug.cgi?id=776059
|
|
|
|
|
|
|
|
|
|
| |
Xlib will kill the process if it notices the display connection has
gone away. This is suboptimal for the main gdm process!
This commit ports the Xlib code to xcb, so it won't have the above
fragility.
https://bugzilla.gnome.org/show_bug.cgi?id=776059
|
|
|
|
|
|
|
| |
We're opening an X11 connection but never closing it, this
commit fixes that.
https://bugzilla.gnome.org/show_bug.cgi?id=776059
|
|
|
|
|
|
|
|
|
| |
When a display registered, the sessions 'display-name' was already updated.
The displays 'x11-display-name' however was not, so I've just added that.
Of course that also meant that the 'x11-display-name' could no longer be
constructor only.
https://bugzilla.gnome.org/show_bug.cgi?id=752341
|
|
|
|
|
|
|
|
| |
It's expected now that we may dispose a display when it's
prepared (if it was prepared but then we determined we were
going to autologin instead).
https://bugzilla.gnome.org/show_bug.cgi?id=749418
|
|
|
|
|
|
|
|
|
| |
The function is no longer virtualized among the display types,
and it doesn't actually have a full picture of whether or not the
display should do automatic/timed login so move it up to the manager,
where all the information is.
https://bugzilla.gnome.org/show_bug.cgi?id=746492
|
|
|
|
|
| |
This way we aren't printing gibberish from the already
freed username.
|
| |
|
|
|
|
|
| |
This will help make it more clear why autologin goes
one way or the other.
|
|
|
|
|
|
|
|
| |
The function is ill named and ill placed. It really
just returns the username of the client that's allowed
to connect to the display.
This commit moves the function to gdm-manager.c
|
| |
|
|
|
|
|
|
| |
I got them inverted in my head when I did
commit 678ac9657d3166dcdeadbccb7ad9427ba0677339
|
|
|
|
|
|
| |
It's clear there's a bug if they're hit, but
we shouldn't tank, since it's not a fatal
bug.
|
|
|
|
|
| |
We consult whether or not to run initial-setup before we figure it
out.
|
|
|
|
|
|
|
|
|
|
| |
We need to know if there are any user accounts before the
display is prepared, since we use that information to figure
out how to prepare the display.
Fixes gnome-shell tanking on start up with wayland.
https://bugzilla.gnome.org/show_bug.cgi?id=744764
|
|
|
|
|
|
|
|
|
|
|
| |
The session-type property is analagous to the
sd_login session type. It can be either
"x11" or "wayland".
This helps us decide whether to start a wayland
session or an X session.
https://bugzilla.gnome.org/show_bug.cgi?id=744764
|
|
|
|
|
|
|
|
|
|
|
| |
If we aren't connected to the display then we can't give
the user access to it,(and we don't need to anyway)
This commit adds a new is-connected property to GdmDisplay and
changes the code to never give a user authorization if we
aren't connected.
https://bugzilla.gnome.org/show_bug.cgi?id=744764
|
|
|
|
|
|
| |
GdmLocalDisplay doesn't need it, so don't bother doing it then.
https://bugzilla.gnome.org/show_bug.cgi?id=744764
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The session-class property is analagous to the
sd_login session class. It can be either
"greeter" or "user".
This helps us decide whether or not to add a
launch environment to the display.
We need this because some displays go straight
to a user session.
https://bugzilla.gnome.org/show_bug.cgi?id=744764
|
|
|
|
|
|
|
|
| |
The worker needs to know if a display should be forced on
vt1 or not when deciding which vt to allocate for the logind
session.
https://bugzilla.gnome.org/show_bug.cgi?id=744764
|
|
|
|
|
|
|
|
|
|
| |
When the slave was in a different process we needed to
interact with the display in the manager process remotely.
Now it's all one process and we don't, so clean up what
gets exported over the bus.
https://bugzilla.gnome.org/show_bug.cgi?id=744764
|
|
|
|
|
|
|
|
| |
Going forward we aren't always going to know the display
number ahead of time, so don't use it for encoding the
display id.
https://bugzilla.gnome.org/show_bug.cgi?id=744764
|
|
|
|
|
|
|
| |
All it does is set the managed state, which the subclasses
can do just as easily, so cut out some code.
https://bugzilla.gnome.org/show_bug.cgi?id=744764
|
|
|
|
|
|
|
| |
At this point the slaves do nothing useful, so we can
get rid of them.
https://bugzilla.gnome.org/show_bug.cgi?id=744764
|
|
|
|
|
|
|
| |
This commit moves GdmServer to GdmLocalDisplay, and
XDMCP connection retries to GdmXdmcpDisplay.
https://bugzilla.gnome.org/show_bug.cgi?id=744764
|
|
|
|
|
|
|
| |
This function will be overridden by GdmLocalDisplay to
start the X server.
https://bugzilla.gnome.org/show_bug.cgi?id=744764
|