summaryrefslogtreecommitdiff
path: root/daemon/gdm-display.c
Commit message (Collapse)AuthorAgeFilesLines
* display: add session-type propertyRay Strode2015-02-181-0/+23
| | | | | | | | | | | 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
* display: only add user authorization if connected to displayRay Strode2015-02-181-0/+15
| | | | | | | | | | | 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
* display: only create Xauth file for legacy code pathsRay Strode2015-02-181-12/+11
| | | | | | GdmLocalDisplay doesn't need it, so don't bother doing it then. https://bugzilla.gnome.org/show_bug.cgi?id=744764
* display: add new session-class propertyRay Strode2015-02-181-1/+32
| | | | | | | | | | | | | | 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
* session: forward is-initial from display to workerRay Strode2015-02-181-0/+6
| | | | | | | | 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
* display: don't export so much stuff over system busRay Strode2015-02-181-122/+0
| | | | | | | | | | 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
* display: don't make d-bus object path require display numberRay Strode2015-02-181-8/+2
| | | | | | | | 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
* display: drop base class implementation of manage vfuncRay Strode2015-02-181-7/+0
| | | | | | | 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
* slave: drop the slavesRay Strode2015-02-181-82/+43
| | | | | | | At this point the slaves do nothing useful, so we can get rid of them. https://bugzilla.gnome.org/show_bug.cgi?id=744764
* display: get rid of more simple slave code.Ray Strode2015-02-181-8/+1
| | | | | | | This commit moves GdmServer to GdmLocalDisplay, and XDMCP connection retries to GdmXdmcpDisplay. https://bugzilla.gnome.org/show_bug.cgi?id=744764
* display: add back manage vfuncRay Strode2015-02-181-1/+10
| | | | | | | This function will be overridden by GdmLocalDisplay to start the X server. https://bugzilla.gnome.org/show_bug.cgi?id=744764
* display: move x11 connection from slave to displayRay Strode2015-02-181-0/+183
| | | | | | | It's more logical here, and we're trying to get rid of the slave object eventually, anyway. https://bugzilla.gnome.org/show_bug.cgi?id=744764
* display: start greeter/chooser session from display objectRay Strode2015-02-181-10/+306
| | | | | | | | | | | We're trying to get rid of the slave code, so we need to move responibility for launching the greeter to the display objects. This commit changes the display classes to set up a launch environment that the base class runs. https://bugzilla.gnome.org/show_bug.cgi?id=744764
* display: add launch-environment propertyRay Strode2015-02-181-0/+29
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=744764
* display: connect to accountsservice from display objectRay Strode2015-02-181-3/+68
| | | | | | | | | The idea is to eventually gut GdmSimpleSlave, so start by copying some of its functionality over to the display. This commit copies accountsservice user listing. https://bugzilla.gnome.org/show_bug.cgi?id=744764
* display: rename "display" to "self"Ray Strode2015-02-181-268/+269
| | | | | | self is the defacto standard these days. https://bugzilla.gnome.org/show_bug.cgi?id=744764
* display: use bitfield for booleans in priv structureRay Strode2015-02-181-3/+3
| | | | | | | We're going to be adding more than a couple, so switch to a bitfield. https://bugzilla.gnome.org/show_bug.cgi?id=744764
* display: get rid of get_timed_login_details vfuncRay Strode2015-02-181-34/+32
| | | | | | | Instead introduce an "allow-timed-login" property that subclasses can set to FALSE to disable timed login. https://bugzilla.gnome.org/show_bug.cgi?id=744764
* display: drop error arg from gdm_display_get_timed_login_detailsRay Strode2015-02-181-8/+3
| | | | | | | | It turns out it never fails, and all callers always pass NULL for it's error argument, so drop that argument and the gboolean return type. https://bugzilla.gnome.org/show_bug.cgi?id=744764
* display: drop unsubclassed vfuncsRay Strode2015-02-181-114/+17
| | | | | | | gdm-display has a whole host of vfuncs that are now completely unused. This commit drops thems. https://bugzilla.gnome.org/show_bug.cgi?id=744764
* display: Clean up old signal handlersJasper St. Pierre2014-03-171-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The signal handlers here are intended to be used if the slave itself tries to stop, for instance if the server or greeter die, and will try to finish the display on its own. Letting the signal handler run again will finish the display *again* after an idle, meaning we have this path: gdm_display_finish gdm_display_unmanage on_server_stopped queue_finish ... idle ... gdm_display_finish gdm_display_unmanage on_server_stopped queue_finish ... This might have been an infinite loop, except for the fact that GDM smartly has code to detect the failure state where the X server starts up and stops sufficiently quickly, and in that case transitions the display to the FAILED state, which causes GdmDisplayStore to unref the last ref on the GdmDisplay. Since the finish is still queued, finish_idle runs, and very quickly discovers that our object is no longer a GdmDisplay, so this very quickly manifests into a: gdm_display_finish: assertion 'GDM_IS_DISPLAY (display)' failed error. Not before poking a hole and corrupting some memory trying to clear the finish_idle_id, however.
* display: Remove some unnecessary parts from disposeJasper St. Pierre2014-03-171-18/+3
| | | | | | These can't possibly be active and armed if we're disposing. https://bugzilla.gnome.org/show_bug.cgi?id=726380
* display: Enforce a few invariantsJasper St. Pierre2014-03-171-0/+3
| | | | | | | The GdmDisplay should only be cleaned up if it's finished or failed. https://bugzilla.gnome.org/show_bug.cgi?id=726380
* Integrate the slaves into the main daemon processJasper St. Pierre2014-03-171-293/+92
| | | | | | | | | | For no particular reason, the slave has been kept as a separate process. Integrate this into the main display process by simply making the display keep a handle to a GdmSlave object. To keep the cleanup simple, we won't remove the GdmSlave subtypes yet. A future cleanup should merge the slave functionality into GdmDisplay and its subtypes. https://bugzilla.gnome.org/show_bug.cgi?id=726380
* display: Don't strdup unnecessarilyJasper St. Pierre2014-02-141-2/+2
| | | | We can simply return a const char * here.
* display: Clean up get_timed_login_detailsJasper St. Pierre2014-02-131-8/+26
| | | | | Make it properly log itself as a GdmDisplay method, and use local variables to ensure that callers can pass NULL.
* daemon: rename slave_bus_proxy to slave_proxyRay Strode2014-02-071-9/+8
| | | | | The _bus_ middle part of the name was only there to prevent ambiguity with the, then named "gdm-slave-proxy", but now named, gdm-slave-job class.
* daemon: rename gdm-slave-proxy to gdm-slave-jobRay Strode2014-02-071-24/+24
| | | | It doesn't actually proxy calls to the slave, so it's misnamed.
* display: Remove gdm_display_get_bus_connectionJasper St. Pierre2014-02-071-6/+0
| | | | It's unused.
* display: fix memory leak if AddUserAuthentication called more than onceRay Strode2014-02-061-1/+8
| | | | | | Noted on downstream bug: https://bugzilla.redhat.com/show_bug.cgi?id=1020885
* display: ReindentJasper St. Pierre2014-02-011-8/+8
|
* display: use a async ctor for slave dbus clientMarc-Antoine Perennou2014-01-061-10/+22
| | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=701758 Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
* display: actually set slave_name_id and unwatch bus name in unmanageJean-Benoit MARTIN2013-07-301-7/+12
| | | | | | | | | slave_name_id is supposed to track the bus name watch of the slave, but it was never getting set. This commit sets it, and makes sure the watch is removed in unmanage. https://bugzilla.gnome.org/show_bug.cgi?id=698370
* daemon: use LOGIND_RUNNING instead sd_booted()Ray Strode2013-05-201-5/+2
| | | | | | It's more correct. See: https://mail.gnome.org/archives/desktop-devel-list/2013-March/msg00092.html
* display: fix get_timed_login_details when systemd is enabled but not runningFabio Erculiani2013-04-211-2/+8
| | | | | | | | It's possible to build with systemd support, but not boot with systemd. In that case get_timed_login_details erroneously assumes the seat format will be systemd compatible (it checks if the seat is seat0). This commit guards the seat0 check with a sd_booted() > 0 check.
* daemon: allow NULs in X11 cookieRay Strode2012-11-051-1/+6
| | | | | | | | | | | | | | | | We currently allow the slave access to its X server via two mechanisms: 1) we set XAUTHORITY to point to the X servers Xauthority file 2) we call XSetAuthorization with the cookie from the Xauthority file 1) may fail if the user's hostname changes at the wrong moment, and a bug in the code meant that 2 would fail if NULs are encoded in the auth cookie. This commit fixes 2) to work with embedded NUL bytes. https://bugzilla.gnome.org/show_bug.cgi?id=687691
* Trivial: Update FSF Address.Dominique Leuenberger2012-09-061-1/+1
| | | | Fix bug 683383.
* Fix uses of uninitialized memoryStef Walter2012-08-161-3/+3
| | | | | | | | | | | * Most setters of a **error (such as g_set_error() and g_propagate_error() require and check that the GError pointer is NULL before setting). * Fix cases where a GError pointer was not initialized to NULL, and instead relied on the stack value that happened to be present. https://bugzilla.gnome.org/show_bug.cgi?id=681972
* gdm: always run gdm on VT1Lennart Poettering2012-08-061-0/+53
| | | | | | | | | | | | | | | This drops automatic VT allocation schemes for the initial display in favour of a compile time hardcoded VT assignment. The automatic allocation schemes are inherently racy since a simpler output to the console might already influence it and result in gdm running on another than the intended VT. This patch adds a --with-initial-vt= switch to configure which may be used to set the VT gdm will run the initial server on. It defaults to 1. https://fedoraproject.org/wiki/Features/DisplayManagerRework https://bugzilla.gnome.org/show_bug.cgi?id=511168
* worker: add reauthentication supportRay Strode2012-07-171-0/+39
| | | | | | | | | | | | | This commit adds reauthentication support for screensavers and user switching to use. 1) It adds a "verification mode" argument to the GdmSession constructor that tweaks the behavior of how the session worker acts to fit login or unlock scenarios better. 2) It adds a way for programs to open a communication channel for user verification to already runnings sessions (so reauthentication happens in the context of the session).
* daemon: Add an interface for communicating with GDM via D-BusRay Strode2012-07-171-19/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One goal for GNOME 3.6, is to replace the screen locking functionality provided by gnome-screensaver with redesigned functionality provided by gnome-shell. At the same time, it makes sense to consolidate the yucky PAM authentication code to one place (GDM). Right now only greeters can talk to GDM. At the time the greeter is started, the slave sets up a private communication channel which the greeter then connects to for initiating communication. This commit adds a new method to the org.gnome.DisplayManager.Manager interface that allows opening a private connection to the slave that is associated with the currently running session. That slave exports the session object over the bus that greeters can interact with the session as appropriate. This interface replaces the GDM_GREETER_DBUS_ADDRESS environment variable that used to to be used for connecting the greeter to the slave. This commit also drops gdm-greeter-server and gdm-chooser-server which don't fit the new model, and are really just thin middle men that don't do anything important. Furthermore, this commit splits GdmSession interfaces 3 orthogonal parts up into 3 separate interfaces on the session object. A future commit will make this interface work for screensavers/reauthentication. Based on work by Giovanni Campagna <gcampagna@src.gnome.org> https://bugzilla.gnome.org/show_bug.cgi?id=676381
* daemon: Finish display if its slave diesGiovanni Campagna2012-07-171-0/+27
| | | | | | | | If a slave goes away for whatever reason, we need to make sure we clean up the display associated with it. This commit changes the display code to watch its associated slave on the bus and automatically finish if the slave goes away.
* daemon: Port GdmManager to GDBusGiovanni Campagna2012-07-171-2/+2
| | | | | | | | | | | | | | | The GdmManager object controls the GdmLocalDisplayFactory and GdmXdmcpDisplayFactory singleton objects, which manage displays on local VTs and displays on remote machines respectively. Another role of the GdmManager object is to aggregate and export the displays currently being managed by those display factories over the system bus. This commit moves GdmManager over to using GDBus and the GDBusObjectManager interface for display enumeration. https://bugzilla.gnome.org/show_bug.cgi?id=622888
* daemon: Port display handling to GDBusGiovanni Campagna2012-07-171-9/+280
| | | | | | | | This is one big commit because it uses generated code both in the daemon and in the slaves, so we need to port both at the same time. https://bugzilla.gnome.org/show_bug.cgi?id=622888
* daemon: NUL terminate X11 cookieGiovanni Campagna2012-07-171-1/+1
| | | | | | | | | | | | | | | The X11 cookie is used as a shared secret between X clients and the X server. This cookie is written into an Xauthority file pointed to by the XAUTHORITY environment variable. In the event standard peer-credential based access isn't available, clients read this file and gain authorization to use the X server by presenting the cookie to the X server. This cookie is passed from the gdm daemon to the slave over the bus as an array of bytes. GDBus expects bytes strings to be NUL terminated. This commit NUL terminates the cookie, so that it will be compatible with GDBus's generated code.
* daemon: driveby XDMCP crash fixRay Strode2012-07-131-0/+2
| | | | | | | | | | | | | | | If the XDMCP chooser exits enough times, the whole daemon eventually tanks when the child watch function tries to access freed memory. This commit takes the hammer approach of adding a reference to the slave from the child watch func. It also makes sure that there isn't ever two slaves running for one display at the same time.
* display: fix autologinRay Strode2012-03-261-1/+1
| | | | | | | | commit b436764275e513ebd5b0546ab047f0fce2f34b35 tried to prevent autologin on auxilliary seats, but the conditional was inverted, so it ended up preventing autologin on the primary seat. https://bugzilla.gnome.org/show_bug.cgi?id=672773
* display: don't auto login from anything but seat0Ray Strode2012-02-211-0/+10
| | | | | Supporting other seats makes sense for kiosk type set ups eventually, but not without more thought.
* Revert some commitsRay Strode2011-06-171-48/+0
| | | | | | | | | | | | I had some inprogress changes in my local tree when when git bz applying the patches on bug 618047. Those unfinished changes got interleaved into the commits, creating a bit of a mess. Also, bug 618047 has been reopened. This commit reverts those changes for now until.
* daemon: drop some fluff codeRay Strode2011-06-151-5/+5
| | | | | | | There's a bit of needless boilerplate and dead code just sort of sitting around in various places. This commit cleans things up a bit.