Age | Commit message (Collapse) | Author | Files | Lines |
|
This reverts commit bee63889f4a0b8f57807a61d8396346cec8cd5b1.
There are some cases where ConsoleKit2 would crash after successfully
suspending so revert this commit.
|
|
Otherwise we will break the build on some platforms. Also update
the translations.
|
|
This removes and cleans up some duplicated code. Both the ck-manager
and the ck-session had an implementation to get the calling uid/pid
so it's now moved to a common location. The inhibit changed signal
has been made more explicit in when the delay is removed. The
polkit permissions was duplicated over two functions and has been
moved to a single common one. So this patch is just minor house
keeping.
|
|
This way CK2 doesn't get confused and think multiple users are
logged in when it's just a service account.
|
|
Also improve the translation messages in the process groups and
mark that file translatable.
|
|
On Linux, this adds an optional dependency on cgmanager to use
cgroups to manage and track processes. This is more reliable and
secure than the XDG_SESSION_COOKIE however it will fall back to
that.
https://github.com/ConsoleKit2/ConsoleKit2/issues/7
|
|
|
|
Respect multilib/multiarch filesystem layouts
|
|
Found by Coverity scan.
|
|
And make sure we unref the variants that get created.
|
|
|
|
Adapted from https://bugs.freedesktop.org/show_bug.cgi?id=24608
|
|
And document the --enable-debug option better. The enable-tests
option defaults to off so that normal release builds don't have
to waste time compiling tests that won't be installed or used.
|
|
Properly watch for dbus NameOwnerChanged events so we can handle
session bus removal events. This should be the same as before
the GDBus port.
https://github.com/ConsoleKit2/ConsoleKit2/issues/27
|
|
Returns the current list of inhibitors, an array of strings
representing the what, who, why, mode, and two unsigned int32
representing the user ID and process ID.
This is the same method that logind uses. Needed to have inhibit
track the uid/pid of the caller to mirror what logind returns.
|
|
This matches how it was handled prior to the GDBus port.
|
|
|
|
If the idle hint isn't set then return NULL when requesting the
idle since hint, otherwise tools like ck-list-sessions returns
a time in 1970.
|
|
Use the ConsoleKitSession uid for everything. This got missed on
the port to GDBus. Now the correct uid is written to the CKDB.
Fixes:
https://github.com/ConsoleKit2/ConsoleKit2/issues/26
|
|
|
|
|
|
|
|
And operations when both polkit and rabc isn't used.
|
|
|
|
|
|
The ck-connector only uses libdbus and not dbus-glib and it handles
OOM. Going to GDBus wouldn't let us properly handle OOM because
glib just aborts when g_malloc hits the OOM. So we'll leave that.
This patch removes the dbus-glib dependency as everything has been
ported. For:
https://github.com/ConsoleKit2/ConsoleKit2/issues/8
|
|
There's no gain since they are randomly generated temp files.
|
|
|
|
|
|
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.
|
|
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.
|
|
This calls the correct public dbus signals for prepare to sleep
and shutdown.
|
|
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.
|
|
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.
|
|
This reverts commit eefeb4cca69150de1f9f99c48c84eff67f56a4f7.
|
|
This reverts commit 45cc0180fae3708ce17d16578041edb54e8c308d.
|
|
Otherwise we end up getting an error over a previous error message.
|
|
And update docs list error causes.
|
|
|
|
This helps out consumers who want to know when the error message
is something simple like Session already active.
|
|
(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
|
|
|
|
uid and pid could be used uninitialized, CWE-457
|
|
Coverity CID 89285, CWE-484
|
|
|
|
|
|
|
|
Otherwise GDBus doesn't think we handled the call and gets angry.
|
|
Otherwise GDBus doesn't think we handled the call and gets angry.
|
|
|