summaryrefslogtreecommitdiff
path: root/daemon/main.c
Commit message (Collapse)AuthorAgeFilesLines
* common: Add API to reload settings from diskRay Strode2022-03-011-10/+2
| | | | | | | | | | Ideally we would reread /run/gdm/custom.conf after we've decided graphics setup is complete. This is because the file may not get written out by udev until after GDM is already started and waiting. As a first step to get there, this commit adds an API for rereading the file, and changes the SIGHUP handler to use it (instead of the complete teardown and reinitialization it was doing before).
* daemon: Don't call g_option_context_set_ignore_unknown_optionsYetoo Happy2018-04-241-1/+0
| | | | | | | | | | | When using unknown command line options with the GDM daemon, the program hangs until explicitly getting killed. This commit addresses that bug by dropping an unnecessary call to g_option_context_set_ignore_unknown_options, so GOptionContext will now give an error when encountering unknown options. https://bugzilla.gnome.org/show_bug.cgi?id=795494
* Use standard exit codes.Robert Ancell2017-10-031-6/+6
| | | | | | | | | 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
* daemon: Tidy up main() failure casesRobert Ancell2017-09-281-17/+7
| | | | | | | | | Remove goto that no longer does anything. Consistently use return instead of exit() from main. Print pre-log errors to stderr to ensure they're visible regardless of GLib settings. https://bugzilla.gnome.org/show_bug.cgi?id=788302
* daemon: Move root check before settings are loadedRobert Ancell2017-09-281-7/+7
| | | | | | | The root check doesn't require settings and may be the cause of settings failing to load. https://bugzilla.gnome.org/show_bug.cgi?id=788301
* daemon: Fix double free of GErrorRobert Ancell2017-09-281-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=788300
* daemon: Remove unnecessary check for function that can't return NULLRobert Ancell2017-09-281-5/+0
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=788299
* Use Unicode in translatable stringsPiotr Drąg2017-06-221-2/+2
| | | | | | See https://developer.gnome.org/hig/stable/typography.html https://bugzilla.gnome.org/show_bug.cgi?id=772203
* manager: drop ran-once marker fileRay Strode2015-03-191-9/+0
| | | | | | | | | The file is not anymore useful than a boolean on the manager state object now, that everything is merged into one process. This commit gets rid of it, since a boolean is simpler. https://bugzilla.gnome.org/show_bug.cgi?id=746492
* correct ShowLocalGreeter (standalone XDMCP server)Maxime de Roucy2015-02-031-2/+2
| | | | | | | | Get the ShowLocalGreeter option from configuration file BEFORE launching the gdm manager. In order to let the manager know if it have to launch a local X server or not. https://bugzilla.gnome.org/show_bug.cgi?id=743440
* server: Process SIGUSR1 more carefullyJasper St. Pierre2014-02-141-0/+15
| | | | | | | | | | | | | If the slave is removed as a separate process, it means that we need to be more careful with our handling of SIGUSR1. If multiple X servers are launched at once, we need to use siginfo_t to get the PID of the thing that sent the user signal, and make sure we signal the correct GdmServer. glib doesn't have native siginfo support, so do it ourselves by using a worker thread that spins around waiting for sigwaitinfo. https://bugzilla.gnome.org/show_bug.cgi?id=724382
* main: Remove debug log toggle on SIGUSR1Jasper St. Pierre2014-02-141-11/+0
| | | | | | | | Trying to integrate the slave into the main daemon means that we need to respond to USR1 as it's the signal Xorg sends when the X server is ready. https://bugzilla.gnome.org/show_bug.cgi?id=724382
* Don't enable debugging by default if the version is "unstable"Colin Walters2013-11-221-7/+1
| | | | | | | | | | | | | | | | | I'm open to negotiation for this, but basically...gdm is at present second only to the kernel in the sheer amount of spew it emits - when the version is "unstable". But it always will be for Continuous. Nowadays of course, I think Continuous helps act as a testing system for GDM that obviates a lot of the need for lots of debugging info for gdm during "unstable" cycles. I suspect that we will over time add other informational messages at strategic points by default; this patch is not the end of the story. It's a new beginning. https://bugzilla.gnome.org/show_bug.cgi?id=715037
* Add an option to use GDM as a standalone XDMCP serverLaurent Bigonville2013-11-111-0/+5
| | | | | | | | | This patch add an option (xdmcp/ShowLocalGreeter) to disable the local X console and turn GDM into a simple XDMCP server Thanks to Patrick Monnerat and Josselin Mouette for the patch https://bugzilla.gnome.org/show_bug.cgi?id=567522
* main: drop one more occurence of AUTHDIRRay Strode2013-08-281-1/+1
|
* drop authdirRay Strode2013-08-281-6/+0
| | | | | | | | | | | | <Black_Prince> halfline: what's the point of authdir in gdm? (/var/gdm) ? <Black_Prince> it doesn't appear to be used anywere <halfline> no point <Black_Prince> there are some references in daemon/main.c, but nothing ever gets stored in there <Black_Prince> instead, xauthdir is used https://bugzilla.gnome.org/show_bug.cgi?id=706974
* daemon: use 0711 mode for directoriesRay Strode2013-02-201-3/+3
| | | | | | | | | | /var/run/gdm was ending up 0770 in some cases, which is causing problems. This commit changes everything to use 0711 across the board. https://bugzilla.gnome.org/show_bug.cgi?id=693679
* Port to g_unix_signal_add(), drop GdmSignalHandlerColin Walters2013-01-221-57/+30
| | | | | | | | | | | The level of copy/paste going on here before is rather astonishing. For example, in some cases, I dropped spurious handling of SIGHUP, when the code didn't have any settings to reread. Anyways, the code is now clearer, and we get to drop all the bits of gdm-signal-handler.[ch] for the integrated GLib handling. https://bugzilla.gnome.org/show_bug.cgi?id=676181
* Remove handling of SIGSEGV/SIGFPE/SIGILL etc.Colin Walters2013-01-221-9/+0
| | | | | | | | | | | | | | | | Modern operating systems have "crash catching" functionality; for example, systemd comes with "systemd-coredump" which collects cores automatically. Attempting to handle these kinds of fatal signals internally is now much worse, because the original source of the problem will be masked. systemd won't collect a core file that would include a backtrace, for example. Also, with these removed, we can move forward porting to g_unix_signal_add(). https://bugzilla.gnome.org/show_bug.cgi?id=676181
* Drop calls to g_type_init()/g_thread_init()Colin Walters2012-12-031-2/+0
| | | | | | Both are deprecated and no longer necessary. https://bugzilla.gnome.org/show_bug.cgi?id=689569
* Revert "main: break build"Ray Strode2012-10-261-1/+1
| | | | This reverts commit 274a430f1fb9abbb2021c1dcae68a140b70d4e77.
* main: break buildRay Strode2012-10-261-1/+1
|
* daemon: user marker file for tracking autologin instead of static variable.Ray Strode2012-10-151-0/+15
| | | | | | | | | | | | We currently decide whether or not to skip autologin by a first_login state variable in the static display object. These days we can have multiple static display objects, so storing the state variable doesn't make much sense. We could make the variable static, but instead this commit switches to using a marker file in /var/run/gdm. https://bugzilla.gnome.org/show_bug.cgi?id=682467
* Look in the correct location for gdm.schemas on HUPSjoerd Simons2012-10-151-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=686108
* server: Ensure log/auth directories exist at startupColin Walters2012-10-021-114/+38
| | | | | | | | | | | | | | | | The daemon startup had lots of swapping around of effective uid, and aborted if the log/auth directories didn't have the expected permissions. Honestly this makes no sense - we're uid 0, so let's just ensure they're directories and call chown() ourself. I have no idea what the "paranoia" here is about - if someone had managed to e.g. make a symbolic link in /var to somewhere unexpected, there are plenty of other ways they could attack the system. Rather than aborting, let's just call mkdir()/chown()/chmod() and check the return values. https://bugzilla.gnome.org/show_bug.cgi?id=684315
* Trivial: Update FSF Address.Dominique Leuenberger2012-09-061-1/+1
| | | | Fix bug 683383.
* daemon: Port GdmManager to GDBusGiovanni Campagna2012-07-171-176/+82
| | | | | | | | | | | | | | | 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: s/g_atexit/atexit/Giovanni Campagna2012-07-131-1/+1
| | | | | g_atexit is deprecated. For now replace the g_atexit call with a normal atexit call.
* daemon: reload config on SIGHUPBrian Cameron2012-06-251-2/+10
|
* common: don't tank on criticalsRay Strode2011-06-281-2/+0
| | | | | | | | | | | | | | Tiny (or not so tiny) bugs in components below GDM in the stack can lead to critical warnings. In development releases, GDM by default will crash when encountering a critical warning. Losing the login screen is a big deal. We shouldn't automatically subject our users to "can't log in" in order to highlight bugs in development releases. This commit removes fatal criticals by default.
* Put the schemas in /usrJosselin Mouette2010-09-151-1/+1
| | | | The gdm.schemas file is not configurable. It has nothing to do in /etc.
* Wrap getpw* calls to retry in EINTRWilliam Jon McCann2010-08-171-1/+1
| | | | | | if getpwnam(username) returns NULL, errno needs to be checked for EINTR. This indicates that a signal was received while waiting for the blocking call to return, and getpwnam() should be retried.
* Print the version when asked toWilliam Jon McCann2010-06-161-0/+5
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=594857
* String fixes. Patch by Philip Withnall. Fixes bug #609178.Brian Cameron2010-05-031-3/+3
|
* Fix GDM debugging so that it works. Now debugging is enabled via theBrian Cameron2009-11-091-3/+15
| | | | debug/Enable key in the custom.conf file. See bug #596831.
* Improve strings for translation. Partially fix bug #582891.Brian Cameron2009-10-301-1/+1
|
* Make /var/log/gdm if it doesn't exist. Fixes bug #589862.Brian Cameron2009-10-191-1/+5
|
* Use g_timeout_add_seconds to reduce wakeups (closes:GnomeBug #583295)Javier Jardón2009-07-151-2/+2
| | | | | | | | * daemon/main.c (bus_proxy_destroyed_cb), (main) * gui/simple-chooser/gdm-host-chooser-widget.c, (xdmcp_discover)
* Use a callback for the fatal handler instead of supplying the main_loop.William Jon McCann2008-08-151-1/+3
| | | | | | | | | | | | | | | | | | | | | 2008-08-15 William Jon McCann <jmccann@redhat.com> * common/gdm-signal-handler.c (signal_io_watch), (gdm_signal_handler_set_fatal_func): * common/gdm-signal-handler.h: * daemon/factory-slave-main.c (main): * daemon/gdm-session-direct.c (stop_worker): * daemon/gdm-session-worker-job.c (session_worker_job_child_watch): * daemon/main.c (main): * daemon/product-slave-main.c (main): * daemon/session-worker-main.c (main): * daemon/simple-slave-main.c (main): * daemon/xdmcp-chooser-slave-main.c (main): Use a callback for the fatal handler instead of supplying the main_loop. svn path=/trunk/; revision=6382
* Might be good to actually start the manager after reconnecting to the bus.GDM_2_22_0William Jon McCann2008-05-021-0/+2
| | | | | | | | | | | 2008-05-01 William Jon McCann <jmccann@redhat.com> * daemon/main.c (bus_reconnect): Might be good to actually start the manager after reconnecting to the bus. svn path=/trunk/; revision=6199
* prepare for release.William Jon McCann2008-05-011-10/+14
| | | | | | | | | | | | | | | | | | | 2008-05-01 William Jon McCann <jmccann@redhat.com> * NEWS: * configure.ac: prepare for release. * daemon/main.c (bus_reconnect), (bus_proxy_destroyed_cb), (main): Try to fix a crash at shutdown. * gui/simple-greeter/gdm-greeter-login-window.c (do_system_restart), (do_system_stop): * gui/simple-greeter/test-greeter-login-window.c: Fix some warnings. svn path=/trunk/; revision=6197
* Fix a few more mem and fd leaks.William Jon McCann2008-03-181-0/+1
| | | | | | | | | | | | | | | 2008-03-17 William Jon McCann <jmccann@redhat.com> * common/gdm-signal-handler.c: (gdm_signal_handler_finalize): * daemon/gdm-display.c: (gdm_display_real_create_authority), (gdm_display_real_add_user_authorization), (gdm_display_constructor): * daemon/gdm-slave.c: (gdm_slave_finalize): * daemon/main.c: (main): Fix a few more mem and fd leaks. svn path=/trunk/; revision=6037
* Move wait_on_child to common. Always check return value of gdm_signal_pid.William Jon McCann2008-03-171-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2008-03-17 William Jon McCann <jmccann@redhat.com> * common/gdm-common.c: (gdm_wait_on_pid), (gdm_signal_pid), (_read_bytes), (gdm_generate_random_bytes): * common/gdm-common.h: * common/gdm-settings-desktop-backend.c: (parse_key_string), (gdm_settings_desktop_backend_get_value), (gdm_settings_desktop_backend_finalize): * common/gdm-settings-utils.c: (gdm_settings_parse_schemas): * daemon/gdm-server.c: (server_died), (gdm_server_stop): * daemon/gdm-session-worker-job.c: (session_worker_job_died), (gdm_session_worker_job_stop): * daemon/gdm-slave-proxy.c: (child_watch), (kill_slave), (gdm_slave_proxy_stop), (gdm_slave_proxy_dispose), (gdm_slave_proxy_finalize): * daemon/gdm-welcome-session.c: (stop_dbus_daemon), (welcome_session_died), (gdm_welcome_session_stop): * daemon/main.c: (main): * gui/simple-greeter/gdm-remote-login-window.c: (xserver_died): * gui/simple-greeter/gdm-session-client.c: (client_died), (gdm_session_client_stop): Move wait_on_child to common. Always check return value of gdm_signal_pid. Fix a number of small leaks. Make sure to signal the slaves when exiting. svn path=/trunk/; revision=6036
* Don't glog in the signal handlers. Add a default SIGTRAP handler so we getWilliam Jon McCann2008-03-101-13/+1
| | | | | | | | | | | | | | | | 2008-03-10 William Jon McCann <jmccann@redhat.com> * common/gdm-signal-handler.c: (signal_io_watch), (crashlogger_get_backtrace), (gdm_signal_handler_backtrace), (signal_handler), (gdm_signal_handler_add_fatal): * common/gdm-signal-handler.h: * daemon/main.c: (signal_cb), (main): * gui/simple-greeter/greeter-main.c: (signal_cb), (main): Don't glog in the signal handlers. Add a default SIGTRAP handler so we get backtraces in unstable releases. svn path=/trunk/; revision=5991
* ignore unknown options, so removed options don't cause it to abortRay Strode2008-02-271-0/+1
| | | | | | | | | | 2008-02-27 Ray Strode <rstrode@redhat.com> * daemon/main.c (main): ignore unknown options, so removed options don't cause it to abort svn path=/trunk/; revision=5889
* Don't daemonize and remove some unused options.William Jon McCann2008-02-261-21/+0
| | | | | | | | | | 2008-02-26 William Jon McCann <jmccann@redhat.com> * daemon/main.c: (main): Don't daemonize and remove some unused options. svn path=/trunk/; revision=5883
* Set XDMCP enabled/disabled from configuration settings.William Jon McCann2008-02-201-2/+4
| | | | | | | | | | | | | 2008-02-20 William Jon McCann <jmccann@redhat.com> * common/gdm-settings-keys.h: * common/test-settings-client.c: (test_settings_client): * daemon/gdm-manager.c: (gdm_manager_class_init): * daemon/main.c: (main): Set XDMCP enabled/disabled from configuration settings. svn path=/trunk/; revision=5827
* Fix build on FreeBSD. Patch from: Joe Marcus Clarke <marcus@freebsd.org>William Jon McCann2007-11-191-1/+2
| | | | | | | | | | | | | | | | | | | | | | | 2007-11-19 William Jon McCann <mccann@jhu.edu> * common/gdm-common-unknown-origin.h: * configure.ac: * daemon/Makefile.am: * daemon/gdm-greeter-session.c: * daemon/gdm-server.c: (gdm_server_class_init): * daemon/gdm-session-record.c: (record_set_username), (gdm_session_record_login), (gdm_session_record_logout): * daemon/gdm-session-worker-job.c: (gdm_session_worker_job_class_init): * daemon/gdm-slave-proxy.c: (spawn_slave): * daemon/main.c: * gui/settings-daemon/plugins/xsettings/gdm-xsettings-manager.c: * gui/simple-chooser/gdm-host-chooser-widget.c: (do_ping): Fix build on FreeBSD. Patch from: Joe Marcus Clarke <marcus@freebsd.org> svn path=/trunk/; revision=5515
* Add Xau and Xext to XLIB_LIBS when x11.pc isn't found. Fixes #492022 moreWilliam Jon McCann2007-10-311-7/+1
| | | | | | | | | | | 2007-10-31 William Jon McCann <mccann@jhu.edu> * configure.ac: Add Xau and Xext to XLIB_LIBS when x11.pc isn't found. Fixes #492022 more svn path=/trunk/; revision=5480
* Use assertions for criticals everywhere for unstable builds.William Jon McCann2007-10-261-0/+3
| | | | | | | | | | | | | | | | | 2007-10-26 William Jon McCann <mccann@jhu.edu> * common/gdm-common.c: (gdm_set_fatal_warnings_if_unstable): * common/gdm-common.h: * daemon/factory-slave-main.c: (main): * daemon/main.c: (main): * daemon/product-slave-main.c: (main): * daemon/simple-slave-main.c: (main): * gui/simple-greeter/greeter-main.c: (main): Use assertions for criticals everywhere for unstable builds. svn path=/trunk/; revision=5427