summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-06-07Add "mode" to the inhibit callEric Koegel9-137/+538
Now we support the mode string of the inhibit dbus call. It can either be a "block" or "delay". If no delay lock is done, a system call action will delay 2 seconds to give applications time to save state. Holding a delay lock will increase the timeout to a max of 8 seconds.
2015-05-17Remove the pam-foreground-compat.ckEric Koegel8-142/+353
It was used to provide /var/run/console/<username> to mimic what PAM did for at_console. This script causes race condition issues on OpenBSD and won't be useful when the multi-seat features land.
2015-05-17Merge pull request #25 from EricKoegel/GDBus-rebasedEric Koegel31-2057/+3172
Port to GDBUS It ports CkSession, CkSessionLeader, CkSeat, CkManager, and main.c over to GDBus. It's hard to indivially port one of those at a time since they end up working together. There's a split between the private and DBUS facing function calls and signals. This was required because of how the gdbus-codegen is used. More test programs have been created to verify that things work the same as before. Additional dbus error codes are returned by CK2 now to help users of the library ignore non-fatal conditions (like the activate signal failed because the session is already active) and it's documented in the xml files. Glib also got bumped up to 2.40, some of the newer function calls were needed. This is for: https://github.com/ConsoleKit2/ConsoleKit2/issues/8
2015-05-17Add po/LINGUAS fileEric Koegel1-0/+4
2015-05-10Update pot fileEric Koegel1-36/+49
2015-05-10Add translation updates from TransifexEric Koegel3-0/+483
2015-05-10Add transifex client configurationEric Koegel1-0/+8
See http://docs.transifex.com/developer/client/ for the documentation on the client.
2015-05-10Call the dbus signals for shutdown/sleepEric Koegel1-17/+21
This calls the correct public dbus signals for prepare to sleep and shutdown.
2015-05-10CkSession: Fix error handling in dbus_activateEric Koegel1-1/+11
Since we set an initial error message in the event g_signal_emit isn't handled for the session activate signal, we need to keep track of that error message. Additionally, that signal call may return a different error message such as the session is already activate on the seat so we need to keep track of both since we'll need to free the memory associated with them.
2015-05-10Return NULL when there's no sessions or seatsEric Koegel4-13/+22
When calling get_sessions/seats return NULL + an error stating that there's nothing to return. This makes the GDBus branch work like the pre-GDBus code.
2015-05-10Revert "Fix NULL checks"Eric Koegel2-4/+4
This reverts commit eefeb4cca69150de1f9f99c48c84eff67f56a4f7.
2015-05-10Revert "Don't set an initial value"Eric Koegel1-1/+5
This reverts commit 45cc0180fae3708ce17d16578041edb54e8c308d.
2015-04-14Don't set an initial valueEric Koegel1-5/+1
Otherwise we end up getting an error over a previous error message.
2015-04-14Change vt error code to CkSeatEric Koegel3-1/+5
And update docs list error causes.
2015-04-14Fix NULL checksEric Koegel2-4/+4
2015-04-14Return error codes when seat fails to activate sessionEric Koegel6-27/+47
This helps out consumers who want to know when the error message is something simple like Session already active.
2015-04-14unix_user should be cast to a uid_tEric Koegel1-1/+1
(int)unix_user should be (uid_t) because it may be (un)signed. POSIX is vague about the datatype http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_12
2015-04-13uid/pid = 0 not NULLEric Koegel2-14/+14
2015-04-13Update potfileEric Koegel1-27/+47
2015-04-13Fix Coverity CID 89287 Uninitialized scalar variableEric Koegel2-14/+14
uid and pid could be used uninitialized, CWE-457
2015-04-13Add missing break statmentEric Koegel1-0/+1
Coverity CID 89285, CWE-484
2015-04-13Fix some cppcheck warningsEric Koegel5-8/+7
2015-04-13CkSession: document what failure codes may be returned.Eric Koegel2-1/+2
2015-04-13CkSeat: document what failure codes may be returned.Eric Koegel1-1/+2
2015-04-13CkSeat: Ensure we return TRUE from dbus callsEric Koegel1-3/+2
Otherwise GDBus doesn't think we handled the call and gets angry.
2015-04-13CkManager: Ensure we return TRUE from dbus callsEric Koegel1-4/+4
Otherwise GDBus doesn't think we handled the call and gets angry.
2015-04-13CkManager: document what failure codes may be returned.Eric Koegel2-7/+32
2015-04-13Add the new GDBus annotationsEric Koegel1-0/+12
2015-04-13Monitor sessions on the busEric Koegel2-25/+82
When a session has a name-owner change and loses its owner, we need to remove it from the manager as it's going away.
2015-04-13Wrong direction when creating keyfilesEric Koegel1-2/+6
We need to set the values in the keyfile, not try to read values in the keyfile.
2015-04-13Fix parsing of non-string valuesEric Koegel3-2/+39
We need to parse the string into a boolean or int before stuffing it into the GVariant. Also add a check for is-local in test-session-leader.
2015-04-13Ensure the session active property stays in sync with the seatEric Koegel4-9/+26
2015-04-13Prevent more warnings from GDBusEric Koegel4-30/+129
GDBus/GVariant dislikes NULL strings so we have to add workarounds for that shortcoming.
2015-04-13Add a TRACE macroEric Koegel6-27/+154
So we can easily track when dbus calls happen when compiled with --enable-debug=full Additionally fix the session Activate signal failure handling.
2015-04-13Always return TRUE from dbus callsEric Koegel3-25/+25
Otherwise we get a warning message: GLib-GObject-CRITICAL: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
2015-04-13Remove dead codeEric Koegel1-10/+0
2015-04-13Add to test-managerEric Koegel3-6/+115
Add some checks for opening and closing sessions from the Manager. Also unref the variants that get created and close the inhibit fd when done.
2015-04-13Add a test-manager programEric Koegel9-39/+301
Fix make distcheck, bump minimum glib to 2.40 since we're using that with this port to GDBus. Properly return the error messages when calling Inhbit and it fails and fix some other GDBus return values.
2015-04-13Add a test-seat programEric Koegel4-0/+209
Might as well continue to test everything and print the output to easily compare changes before and after the port to GDBus. We don't currently have a way to create seats on the fly to test out more, but that will come with the multi-seat code when we get there.
2015-04-13Manually set is-localEric Koegel1-1/+5
Workaround the issue of not easily being able to addpend new values to the GVariant.
2015-04-13Change test-session to be more usefulEric Koegel4-256/+220
Let test-session test all the public dbus methods of CkSession. Additionally, fix the active signal on CkSession and a couple other warning messages.
2015-04-13Minor fixesEric Koegel3-15/+13
Fix the complete_get_sessions_for_unix_user and simplify CkSeat's dbus_get_sessions.
2015-04-13CkSessionLeader: fix save_parametersEric Koegel4-2/+10
2015-04-13main: cleanly exit on name lossEric Koegel1-7/+13
2015-04-13GDBus more porting workEric Koegel4-6/+79
This adds some of the missing methods that were missing during the port. Additionally, some of them have been reworked to fix warning messages.
2015-04-13Use g_hash_table_get_keys_as_array to get the idEric Koegel1-57/+26
2015-04-13CkSession: add internal activte signal back inEric Koegel3-2/+42
2015-04-13More GDBus workEric Koegel2-41/+60
Now we can start the daemon, call ck-launch-session and get info about it from ck-list-sessions.
2015-04-13GDBus: add more stuff to CkSessionEric Koegel2-7/+123
Need to add in the dbus stuff, the codegen doesn't help us here.
2015-04-13More GDBus port workEric Koegel4-41/+156
Fix some method calls, add more public dbus api handling for seats. Added the dbus library deps back in so the ck-connector doesn't have to be ported right away. Would like to start working on fixing what's currently ported and testing everything.