Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
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.
|
|
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).
|
|
Implement the Suspend/Hibernate DBUS APIs for:
https://github.com/ConsoleKit2/ConsoleKit2/issues/3
Conflicts:
configure.ac
|
|
|
|
|
|
Also refactors some of the logging code to remove duplications.
Not sure if the can or auth checks should return FALSE if there's
an inhibit lock on the action... but that can be easily added in
the future.
|
|
And g_assert_nonnull requires glib 2.40 so we'll do without it.
|
|
|
|
When the inhibit lock increments to 1 it will be TRUE and when it
reaches 0 it will be FALSE. Additional locks above 1 will not emit
a signal but the manager will keep track.
|
|
And add additional tests for it as we go
|
|
Also start working on the inhibit manager.
|
|
|
|
|
|
Also add the test-inhibit.c file to the repo, oops.
|
|
|
|
|
|
|
|
Might need an inhibit manager at some point in the future to track
all these locks and prevent duplicates. We'll see how complex it
needs to be.
|
|
Patch pulled from:
http://anoncvs.estpak.ee/cgi-bin/cgit/openbsd-ports/tree/sysutils/consolekit/patches/patch-src_ck-vt-monitor_c
|
|
warning: use of assignment suppression and length modifier
together in gnu_scanf format. Additionally added comments
next to each of the sscanf variables because there's a lot
of them to keep track of.
|
|
We need a Can/Auth split for suspend/hibernate because the user
may be authorized but the system is unable to perform those
actions. Additionally start working the inhibit calls. We also
need to actually add the suspend/hibernate tools.
|
|
|
|
Sets up ConsoleKit2 for translations via GNU gettext. There might
still be a couple strings that need to be marked for translation,
but this sets up the project to use gettext. Fixes bug:
https://bugs.freedesktop.org/show_bug.cgi?id=23482
|
|
Don't try to close a fd that failed to be opened. Also use
g_close to match up with the g_open.
|
|
When open returns 0 (which is valid), there's a resource leak.
Changing the comparison to include 0 fixes this leak.
|
|
The initial work in progress to add in suspend/hibernate and the
inhibit locks.
|
|
This patch fixes a potential use-after-free crash, because the
JobData created by ck_session_leader_collect_parameters isn’t
holding a reference to its leader.
At a minimum this presentation makes the object lifetime clearer.
Reported in:
https://bugs.freedesktop.org/show_bug.cgi?id=26227#c15
|
|
Turns out this bug is introduced by commit
b4f893eb294883909759fc9fd825eade1a9f308c, which is later than
when themulti-seat branch was created.
This happens when user logout, c-k-d tries to activate the reserved
Login window session, and send out the two signals in
change_active_session().
The old_session is the session that user just log out, which should
be removed after logout. There is race condition here, if the
old_session get unrefed to 0 before the g_signal_emit call,
then a core dump happens. Reported in:
https://bugs.freedesktop.org/show_bug.cgi?id=28598
|
|
CppCheck marks this as a warning that P might be used in sizeof
instead of P->tty_text so we'll use sizeof (P->tty_text) to make
it explicit.
|
|
|
|
Pulls in fixes from:
http://anoncvs.estpak.ee/cgi-bin/cgit/openbsd-ports/tree/sysutils/consolekit/patches/patch-src_ck-sysdeps-openbsd_c
|
|
This prevents Linux from spawning 63 threads. Now there's one
monitor thread that watches for the active VT to change.
Based on the VT_WAITEVENT patch by Kan-Ru Chen.
Fixes:
https://github.com/ConsoleKit2/ConsoleKit2/issues/1
https://bugs.freedesktop.org/show_bug.cgi?id=17720
https://bugs.launchpad.net/ubuntu/+source/consolekit/+bug/148454
|
|
Avoids some GLIB-Critical runtime messages by properly resetting the
source id variables after removing the source.
Patch provided by Manfred Hampl.
|
|
Otherwise GCC nags us with warnings.
|
|
When building outside of linux, again isn't referenced so toss it
in an ifdef to suppress the warning.
|
|
atexit is part of stdlib.h.
|
|
When --enable-debug=full is passed, debugging is always enabled.
This patch also moves the debug check below the option parsing
so it properly takes effect. Additionally, a couple more debug
messages have been added and some quotation marks were removed
from the configure.ac script.
|
|
|
|
Patches taken from:
https://github.com/avsm/openbsd-ports/tree/master/sysutils/consolekit/patches
|
|
|
|
Include the patches listed in:
http://svnweb.freebsd.org/ports/head/sysutils/consolekit/files/
Credit goes to the FreeBSD team for this work.
|
|
Patches taken from
https://github.com/DragonFlyBSD/DPorts/tree/master/sysutils/consolekit
|
|
|
|
Ck does NOTHING at the origin if its built without polkit or RBAC supports, except
display a warning using g_warning() (which does not make sense).
The trick is to to call do_stop()/do_restart() in the #else directive :)
|
|
See http://launchpad.net/bugs/1130923
|
|
|
|
The freebsd specific code does not handle empty string in environment
correctly. Fix submitted by Petr Salinger.
|
|
Signed-off-by: Eric Koegel <eric.koegel@gmail.com>
|
|
Patch written by Robert Millan.
Signed-off-by: Eric Koegel <eric.koegel@gmail.com>
|