summaryrefslogtreecommitdiff
path: root/daemon
Commit message (Collapse)AuthorAgeFilesLines
* Add display-type property when open a new session from GdmSessionWorker.Halton Huo2009-09-1112-3/+174
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Corresponding ConsoleKit multi-seat commit is 6a432264767b3e8383270c349899926ca2d326be This allow the user session can inherit display-type property from login window session. It is very useful for dynamic usage like Sunray to get right sessions list which it only care about. Without this change, the user session won't have the right display-type property, hence can not get the right results for specific display-type. For example: 1) Sunray will create a login window session $/usr/sbin/ck-seat-tool -a --display-type=Sunray display=:11 2) If we run $/usr/bin/ck-list-sessions -f session-id,x11-display,display-type 'Session11' ':11' 'Sunray' 'SessionSeat1Local' ':0' 'Local' 3) If user get login, the login session Session11 will be removed, a new user session Session12 will be created. Without this commit, Session12 do not display-type $/usr/bin/ck-list-sessions -f session-id,x11-display,display-type 'Session12' ':11' '' 'SessionSeat1Local' ':0' 'Local' With this commit, Session12 inherit display-type from Session11, that is what we want. $/usr/bin/ck-list-sessions -f session-id,x11-display,display-type 'Session12' ':11' 'Sunray' 'SessionSeat1Local' ':0' 'Local' The display-type property is typically passed as following sequence: 1) console-kit-daemon init and create a static seat "Seat1" and create a un-open session "SessionSeat1Local", stay unmanaged status 2) gdm-binary init and send "Manage" for "Seat1" 3) console-kit-daemon go through all un-open sessions for "Seat1", and send out "OpenSessionRequest" for that session with property display-type. 4) gdm-binary receive "OpenSessionRequest" for given session, 4.1) Create a GdmDisplay with property display-type. 4.2) Spwan a gdm-simple-slave process. 4.3) Create GdmSimpleSlave with property display-type by quering GdmDisplay. 4.4) Create a GdmSessionDirect with property display-type. 4.5) Sqawn gdm-session-worker process, the properties includs display-type are get from "Setup" or "SetupForUser". 5) When user sucessfully logged in, GdmSessionWorker will create a user session by call "OpenSessionWithParameters" with property display-type 6) console-kit-daemon remove "OpenSessionWithParameters", then create a new session "Session1" with property display-type.
* Fix gdm-stop fail to stop gdm process entirely. Refer to bug ↵Halton Huo2009-09-091-1/+1
| | | | http://defect.opensolaris.org/bz/show_bug.cgi?id=11224
* Set remove-on-close as TRUE to the session associated with ↵Halton Huo2009-09-043-1/+111
| | | | | | gdm-session-worker process. This allow user session quit completely.
* Correct usage of ConsoleKit Manager methods "RemoveSeat" "SeatAdded" and ↵Halton Huo2009-08-101-3/+7
| | | | Seat method "Unmanage"
* Only manage default seats.Ray Strode2009-08-041-1/+4
| | | | We leave other seat types for other programs.
* Connect to CloseSessionRequest instead of SessionToRemoveRay Strode2009-08-041-7/+7
| | | | It was renamed.
* Connect to OpenSessionRequest instead of SessionToAddRay Strode2009-08-041-10/+10
| | | | It was renamed.
* update SessionToHandler to drop is-dynamic booleanRay Strode2009-08-041-4/+2
|
* Call Manage/Unmanage not ManageSeat/UnmanageSeatRay Strode2009-08-041-2/+2
| | | | The name got changed
* Use object path type not string type for ck signalsRay Strode2009-08-041-3/+3
| | | | It was incorrectly using the string type before.
* Strip out $vt from X server command line argsRay Strode2009-08-031-0/+5
| | | | | | | If the VT wasn't substituted by the time it got to us, then that means we need to figure one out. The easiest way to do that is to just not pass a VT argument and let the X server figure it out.
* Implement SeatRemoveRequest signalRay Strode2009-08-031-0/+66
| | | | | ConsoleKit will ask for an entire Seat to get removed in some circumstances. This patch handles that request.
* Store seat proxies in hashtable, not listRay Strode2009-08-031-5/+9
| | | | | This way we'll easily be able to access to the proxies from their path.
* Rework SessionToAdd/Remove in factoryRay Strode2009-08-031-75/+197
| | | | | | | | | | | | | Now we: - keep a map of sessions to displays, so we can easily access which display a session is associated with. - If a display is blocked we now queue add requests dealing with it until it is unblocked. - Only create dynamic displays. Creating static displays dynamically based on events from ConsoleKit doesn't really make much sense.
* Chain up finish method in dynamic display classRay Strode2009-08-031-8/+2
| | | | | | | Static displays don't chain up because they want to handle respawn transparently. Dynamic displays should chain up, so that the factory gets notified when they go away.
* Drop create_display in local display factoryRay Strode2009-08-031-42/+0
| | | | | It's really only there to handle respawn for static displays, but static displays handle respawn in a different way so it's dead code.
* Make slave ask factory to ignore requests at loginRay Strode2009-08-031-0/+5
| | | | | | The slave sets the hint on its display during login that it's going to be opening a session on it soon, so ConsoleKit requests should be ignored.
* Add block-console-session-requests display propertyRay Strode2009-08-035-0/+109
| | | | | | | | | | | | | This property is just a hint for the display factory to queue SessionToAdd requests from consolekit instead of processing them immediately. This will be useful for the slave to lock a display during the critical moment after the login window session is closed before the user's session is opened. Note, the display factory doesn't look at the hint yet, and the slave doesn't set it, yet, either.
* Update session-id on display after loginRay Strode2009-08-038-1/+122
| | | | | | | When the user logs in the greeter session is closed and a new one is opened. We want to make sure the display the user logged in at knows about the new session running on it.
* Add new getter to ck-connector to get session idRay Strode2009-08-032-0/+84
| | | | | We'll need it for properly tracking which session is active on a display.
* Pass session id from SessionToAdd to OpenSessionRay Strode2009-08-0311-3/+135
| | | | | | | When ConsoleKit requests the display manager open a session with the "SessionToAdd" signal, it needs to get told during the OpenSession call which session is getting opened.
* Adapt local display factory to work with new ck interfaceRay Strode2009-08-031-40/+22
| | | | | | The SessionToAdd signal has a more generic signature now. This commit just does the bare minimum to work with the new signature.
* Second pass at display configurationHalton Huo2009-08-037-506/+458
| | | | See http://bugzilla.gnome.org/show_bug.cgi?id=536355
* Add start of display configurationHalton Huo2009-08-0321-197/+1269
| | | | See http://bugzilla.gnome.org/show_bug.cgi?id=536355
* Fix typo in worker logging codeVincent Untz2009-07-171-1/+1
| | | | s/queing/queueing/
* Forward accreditation failed messages to greeterVincent Untz2009-07-171-1/+7
| | | | | | Before the details were getting dropped. See http://bugzilla.gnome.org/show_bug.cgi?id=569741
* Check current worker state before changing itVincent Untz2009-07-171-10/+42
| | | | | | | There are FIXME for that in the code, so I just went ahead and filled the hole. http://bugzilla.gnome.org/show_bug.cgi?id=569760
* Fix "Nested extern declaration" warningDaniel Macks2009-07-171-3/+5
| | | | | | | Move an extern declaration out of a function definition to silence gcc warnings. See http://bugzilla.gnome.org/show_bug.cgi?id=568516
* Don't ever bubble up messages about "workers" to the userRay Strode2009-07-171-10/+2
| | | | | That's a made up concept used solely by the implementation, and is not something the user should ever be confronted with.
* Only access ut_exit if availableDaniel Macks2009-07-161-0/+2
| | | | | | This fixes a build failure on OSX. See http://bugzilla.gnome.org/show_bug.cgi?id=568487
* Don't wait 1/2sec before connecting to displayRay Strode2009-07-161-1/+1
| | | | | | It told us it's ready so let's not waste time. See bug http://bugzilla.gnome.org/show_bug.cgi?id=570615
* Only set GDM_KEYBOARD_LAYOUT if layout is not-defaultRay Strode2009-07-161-3/+6
| | | | | | | If it's default then the right thing should automatically anyway. See http://bugzilla.gnome.org/show_bug.cgi?id=572765
* 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)
* Propagate PAM error messages up to userDavid Liang2009-07-152-8/+8
| | | | | | Previously, some messages were getting dropped. http://bugzilla.gnome.org/show_bug.cgi?id=574338
* Remove duplicate codeDavid Liang2009-07-151-12/+0
| | | | | Some conditional checks were repeated in a large else if block in session_worker_message leading to dead code.
* Set is_authenticated to TRUE when authenticatedRay Strode2009-05-071-0/+2
| | | | | | Before the flag was never getting set causing btmp records to get written when the session and slave are killed around the same time (by switching runlevels)
* Fix an obvious use-after-free in the XDMCP codeMatthias Clasen2009-04-281-2/+2
| | | | The patch was provided by Michael Young in rhbz#496882.
* Correct reversed if-test. Fix setting of PAM_TTY on Solaris. Also makeBrian Cameron2009-04-082-6/+16
| | | | | | | | | | | | 2009-04-08 Brian Cameron <brian.cameron@sun.com> * daemon/gdm-session-solaris-auditor.c: Correct reversed if-test. * daemon/gdm-session-worker.c: Fix setting of PAM_TTY on Solaris. Also make sure that the auditor is provided the username on failed login by getting PAM_USER. Without this patch, if you select the "Other" button and have a failed login, username will not be set. svn path=/trunk/; revision=6803
* Bug 568590 - Environment doesn't get passed on to jobs, leading toHans Petter Jansson2009-04-011-0/+27
| | | | | | | | | | | | | | | | 2009-04-01 Hans Petter Jansson <hpj@novell.com> Bug 568590 - Environment doesn't get passed on to jobs, leading to unlocalized PAM messages. * daemon/gdm-session-worker-job.c (listify_hash): Make sure values are not NULL. (copy_environment_to_hash): New function. (get_job_environment): Actually copy the environment into the hash to get passed on to job. svn path=/trunk/; revision=6800
* Fix assorted compiler warnings.Ray Strode2009-03-272-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2009-03-27 Ray Strode <rstrode@redhat.com> Fix assorted compiler warnings. * gui/simple-greeter/gdm-user-chooser-widget.c (add_user), (get_stock_person_pixbuf), (get_logged_in_pixbuf): Add some widget casts. * gui/simple-greeter/gdm-languages.c (make_codeset_canonical_for_locale): remove unused variable * gui/simple-greeter/gdm-layouts.c: Make the layout member of LayoutData const char *. * gui/simple-greeter/gdm-remote-login-window.c (xserver_died), (stop_xserver): drop unused functions * gui/simple-greeter/gdm-language-option-widget.c (gdm_language_option_widget_set_current_language): drop misplaced & * gui/simple-greeter/gdm-user.c (curved_rectangle): don't assume width == 0, height == 0 conditions will work reliably, instead check for < EPSILON * common/gdm-common.[hc] (gdm_make_temp_dir): Make the constness of the return value and inout argument reflect the way it's being called. * daemon/gdm-display-access-file.c (_create_xauth_file_for_user): Make dir_name const * daemon/gdm-display.c (gdm_display_real_manage): drop unused variables svn path=/trunk/; revision=6796
* Bug 573461 - Load user's settings through "other entry"Ray Strode2009-03-231-10/+10
| | | | | | | | | | | | | | | 2009-03-23 Ray Strode <rstrode@redhat.com> Bug 573461 - Load user's settings through "other entry" * daemon/gdm-session-worker.c (gdm_session_worker_update_username): Don't try to load new user settings until after updating username state. This allows saved settings to load when choosing "Other" instead of the associated name from the chooser. Based on Patch by Mingxi Wu svn path=/trunk/; revision=6794
* Use gethostname() instead of g_get_host_name(), in xauth database sinceRay Strode2009-03-201-1/+6
| | | | | | | | | | | | 2009-03-19 Ray Strode <rstrode@redhat.com> * daemon/gdm-display-access-file.c (_get_auth_info_for_display): Use gethostname() instead of g_get_host_name(), in xauth database since the latter doesn't give up to date information when the hostname changes. svn path=/trunk/; revision=6791
* Remove empty auth subdirs which can creep in from system crashes.Ray Strode2009-03-191-0/+29
| | | | | | | | | | | | 2009-03-19 Ray Strode <rstrode@redhat.com> * daemon/gdm-display-access-file.c (_create_xauth_file_for_user), (_clean_up_stale_auth_subdirs): Remove empty auth subdirs which can creep in from system crashes. svn path=/trunk/; revision=6790
* Give greeter and slave access to display independent of hostname.Ray Strode2009-03-161-0/+55
| | | | | | | | | | | | | | | | | | 2009-03-16 Ray Strode <rstrode@redhat.com> Give greeter and slave access to display independent of hostname. * daemon/gdm-slave.c (gdm_slave_connect_to_x11_display): XSetAuthorization before XOpenDisplay so that the slave can connect even if hostname changes. Call XAddHosts after XOpenDisplay so that clients run by the slave and the greeter can connect even if the hostname changes. svn path=/trunk/; revision=6782
* Fix the GetX11Cookie dbus method Send the cookie as a byte array insteadRay Strode2009-03-164-18/+14
| | | | | | | | | | | | | | | | | | | | 2009-03-16 Ray Strode <rstrode@redhat.com> Fix the GetX11Cookie dbus method * daemon/gdm-display.xml: Send the cookie as a byte array instead of utf-8 string * daemon/gdm-display.[ch] (gdm_display_get_x11_cookie): pass in a GArray instead of the more natural char array and size pointers to make dbus-glib happy. * daemon/gdm-xdmcp-display-factory.c (gdm_xdmcp_handle_request): Update to use new get_x11_cookie signature. svn path=/trunk/; revision=6781
* Use O_APPEND when opening log files.Ray Strode2009-03-163-3/+3
| | | | | | | | | | | 2009-03-16 Ray Strode <rstrode@redhat.com> * daemon/gdm-slave-proxy.c (spawn_child_setup): * daemon/gdm-server.c (server_child_setup): * daemon/gdm-welcome-session.c (spawn_child_setup): Use O_APPEND when opening log files. svn path=/trunk/; revision=6779
* Call gdm_settings_direct_init. Otherwise when these programs try to readBrian Cameron2009-03-142-2/+30
| | | | | | | | | | | 2009-03-13 Brian Cameron <brian.cameron@sun.com> * daemon/xdmcp-chooser-slave-main.c, daemon/simple-slave-main.c: Call gdm_settings_direct_init. Otherwise when these programs try to read the xdmcp/PingIntervalSeconds configuration value, they fail to load it. svn path=/trunk/; revision=6769
* Don't limit autologin to one time. This was a lame attempt to try to avoidWilliam Jon McCann2009-03-041-3/+0
| | | | | | | | | | | | 2009-03-03 William Jon McCann <jmccann@redhat.com> * daemon/gdm-static-display.c (gdm_static_display_unmanage): Don't limit autologin to one time. This was a lame attempt to try to avoid loops on failed logins. Should probably handle this better. svn path=/trunk/; revision=6745
* Enable XDMCP configuration so it works. Previously only xdmcp/Enable wasBrian Cameron2009-02-173-5/+73
| | | | | | | | | | | | | | | | | 2009-02-17 Brian Cameron <brian.cameron@sun.com> * common/gdm-settings-direct.[ch], common/gdm-settings-keys.h, daemon/gdm-simple-slave.c, daemon/gdm-xdmcp-chooser-slave.c, daemon/gdm-xdmcp-display-factory.c, data/gdm.schemas.in.in, docs/C/gdm.xml: Enable XDMCP configuration so it works. Previously only xdmcp/Enable was being used in the code. Also add support for chooser/Multicast and chooser/MulticastAddr configuration options. Now set the default values of MAX_DISPLAY_PER_HOST to 1 and MAX_WAIT to 30 as specified in the docs. Add a gdm_settings_direct_get_uint function to get unsigned integer configuration values more cleanly without the need to cast. Fixes bug #569876. svn path=/trunk/; revision=6715
* Remove double free. Fixes bug #565018. Patch by William Jan PalenstijnBrian Cameron2009-02-171-1/+0
| | | | | | | | | 2009-02-17 Brian Cameron <brian.cameron@sun.com> * daemon/gdm-xdmcp-display-factory.c: Remove double free. Fixes bug #565018. Patch by William Jan Palenstijn <wjp@usecode.org>. svn path=/trunk/; revision=6714