summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
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 Koegel5-15/+226
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 Koegel3-0/+208
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 Koegel3-40/+151
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.
2015-04-13Minor fixesEric Koegel4-27/+30
We can't pass around the GVariantBuilder and parse it at the same time so we'll need to fix the is-local in another way. Fix the signal emission on the manager. We may need to use a GDBusObjectManager to get the signals for interface-added/interface-removed on our Sessions (and eventually Seats?)
2015-04-13Start removing dbus dependenciesEric Koegel10-231/+88
Port CkDevice to using GVariants rather than GValues. Have ck-session-leader return a GVariantBuilder so is-local can be added.
2015-04-13Port ck-session-leader to GDBusEric Koegel5-176/+262
Getting a better understanding of GVariant. Added a test of ck-session-leader and a mock session-info to feed it usable junk data. There's still more work to do on this big GDBus port.
2015-04-13Port CkManager to GDBusEric Koegel11-778/+575
Quite a bit of work here. ck-session-leader needs to be ported.
2015-04-13CkSeat: Port to GDBusEric Koegel4-151/+184
Port the CkSeat to GDBus using the gdbus-codegen. Same as with CkSession there's now a split between public and private signals, properties, and function calls. CkSeat and CkSession host private signals and properties ConsoleKitSeat and ConsoleKitSession are public D-BUS exported ones. https://github.com/ConsoleKit2/ConsoleKit2/issues/8
2015-04-13CKSession: Port to GDBusEric Koegel6-728/+718
Port CKSession to GDBus using gdbus-codegen. The generated ConsoleKitSession object properties are used where possible. A test-session binary is generated to test some of the CkSession properties/DBUS calls. CKSession expects to be passed a GDBusConnection in ck_session_new but this doesn't happen because CKManager hasn't been ported yet. https://github.com/ConsoleKit2/ConsoleKit2/issues/8
2015-04-06fix build without PolicyKit/PolkitIvailo Monev1-0/+2
2015-04-06include gio header required for GAsyncResultIvailo Monev1-0/+1
2015-02-25Merge pull request #21 from ajacoutot/openbsdEric Koegel1-6/+2
openbsd: unbreak get_kinfo_proc() by properly initializing len
2015-02-25openbsd: unbreak get_kinfo_proc() by properly initializing lenAntoine Jacoutot1-6/+2
No need to call sysctl(3) twice since we know exactly how many structures it wants back: just one.
2014-12-11Fixup a couple of missed hardcoded /var/run/ usagesRobby Workman1-1/+1
2014-12-10Fix for GLib-CRITICAL: Source ID was not foundEric Koegel1-2/+6
On remote ck session, there was a warning generated during log out. This patch should fix that warning as well as add a couple debug lines to help future troubleshooting. Thanks to hhoffstaette for helping to troubleshoot this issue. For details see: https://github.com/ConsoleKit2/ConsoleKit2/pull/15
2014-12-08Add --with-rundir configure flagRobby Workman4-15/+16
This allows use of /run on tmpfs instead of /var/run without downstream symlink magic or patches.
2014-12-06Revert "Fix crash on logout/login via SunRay"Eric Koegel1-3/+1
This reverts commit 417e387750920b9e092705863a863e71a77ea431. Causes a regression with polkit authorizations. See: https://github.com/ConsoleKit2/ConsoleKit2/issues/16 https://github.com/ConsoleKit2/ConsoleKit2/issues/12
2014-11-27openbsd: cleanups and sync with ConsoleKit portAntoine Jacoutot1-1/+1
We never needed to use an external helper script with the original ConsoleKit for ck-get-x11-*, so drop these. Make sure we install the other tools and simplify the scripts in the process.
2014-11-17Keep track of the idle callbackEric Koegel1-16/+52
This way we can prevent the user applications from attempting to perform multiple system events at the same time. The additional attempts will fail.
2014-11-17Add the PrepareForSleep/Shutdown signalsEric Koegel3-28/+217
This patch adds the PrepareForSleep/Shutdown signals so apps can listed for these signals and perform operations prior to the event such as logging out of online chatrooms.
2014-11-02Don't tie the inhibit locks to the who stringEric Koegel2-90/+34
This allows for multiple instances of the same app to hold a lock should they need to.
2014-10-27Refactor the system action codeEric Koegel3-237/+188
This patch reduces some of the copy/paste code in all the system actions of the manager. It also fills in the logging events for the suspend and hibernate types.
2014-10-27trivial: update documentationEric Koegel1-51/+60
2014-10-26Emulate the logind dbus API betterEric Koegel3-30/+314
This patch: - Adds the PowerOff/Reboot and respective Can APIs. - Adds the PolkicyKit interactivity flag for the power and suspend API calls. Same as logind. - Adds a note of when the API calls were introduced to the docs. The goal is just to make it easier for consumers of the APIs to support both ConsoleKit2 and logind. The Stop/Restart API calls from ConsoleKit1 are still present and function almost exactly the same (only change is they respect inhibitors now). This patch fixes: https://github.com/ConsoleKit2/ConsoleKit2/issues/10
2014-10-21Escape the who string before using itEric Koegel2-4/+48
When creating the inhibit named pipe we need to ensure we escape the special characters out so that it's safe for use. This also sets up the test-inhibit program to try one such input.
2014-10-20trivial: updates for release0.9.1Eric Koegel1-1/+1
2014-10-20Add HybridSleep support and change CanSleepEric Koegel9-53/+320
Emulate the logind API to make it more easier for porting to ConsoleKit2 for the CanSuspend/CanHibernate/CanHybridSleep methods. They now return: yes - system can and user explicitly authorized by polkit, rbac, or neither is running no - system can and user explicitly unauthorized by polkit or rbac challenge - system can and user requires elevation via polkit na - system does not support it (hardware or backend support missing). The auth methods have been removed. Currently HybridSleep only works on Linux.
2014-10-19Delete any lingering inhibit pipes on startupEric Koegel1-0/+38
If ConsoleKit crashes (post the backtrace as a bug please!) or if the computer crashes (don't report this :) then there may be stale inhibit pipe files in the directory. Clean those up on startup (and shutdown just to be extra safe).
2014-10-19Merge branch 'dbus-api-additions'Eric Koegel18-28/+2061
Implement the Suspend/Hibernate DBUS APIs for: https://github.com/ConsoleKit2/ConsoleKit2/issues/3 Conflicts: configure.ac
2014-10-19g_assert_false is too newEric Koegel1-11/+11