Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
* based on patches for ConsoleKit 0.3.0 from NetBSD Packages Collection
* catch up with help from sysdep implementation for OpenBSD and FreeBSD
* ck-system-suspend is based on NetBSD powerd(8) sleep_button script
|
|
Fix some libdir/scripts stuff missed in 4d87a25ea0af
|
|
|
|
This reverts commit bee63889f4a0b8f57807a61d8396346cec8cd5b1.
There are some cases where ConsoleKit2 would crash after successfully
suspending so revert this commit.
|
|
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.
|
|
Adapted from https://bugs.freedesktop.org/show_bug.cgi?id=24608
|
|
|
|
So we don't spam the console when things like the login session id
aren't available.
|
|
|
|
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
|
|
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 allows use of /run on tmpfs instead of /var/run
without downstream symlink magic or patches.
|
|
The pam-foreground-compat.ck script should be installed without
requring udev.
|
|
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.
|
|
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.
|
|
Implement the Suspend/Hibernate DBUS APIs for:
https://github.com/ConsoleKit2/ConsoleKit2/issues/3
Conflicts:
configure.ac
|
|
Also add the test-inhibit.c file to the repo, oops.
|
|
When the type = CK_LOG_EVENT_SYSTEM_START we can't cast the
event to CkLogSeatSessionAddedEvent. Also
find_first_matching_system_stop_event doesn't care about the
2nd argument so just make it NULL to make it clear we aren't
expecting to pass something of value in.
|
|
GLib's struct GTimeVal declares tv_sec as glong (will break around 2038).
Our struct timeval declares tv_sec as time_t...
warning: passing argument 1 of 'ctime' from incompatible pointer type
Taken from:
http://anoncvs.estpak.ee/cgi-bin/cgit/openbsd-ports/tree/sysutils/consolekit/patches/patch-tools_ck-history_c
|
|
|
|
|
|
64 makes really long lines using ck-history on the cli, change it
down to 24. If this becomes a problem we can add an option to
display more characters.
|
|
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
|
|
Some embedded setups (like OLPC) don't disk-back /var/log (e.g. enabled
by Fedora's readonly-root functionality), so this will be empty on
every boot.
In this setup, ck-log-system-start fails because /var/log/ConsoleKit
doesn't exist.
Fix this by copying in mkdir code from ck-event-logger.c:open_log_file
which already correctly handles this situation. Reported in:
http://lists.freedesktop.org/archives/consolekit/2011-September/000148.html
|
|
When not in compat-mode the max login name length is 64 which
should cover most sane uses. Additionally this patch makes the
command line options show up in --help. Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=36364
|
|
|
|
When DISPLAY is set to a remote display, the remote display server
is down/unreachable and you su from user to root (or some other user),
this can take ~30 seconds+ to complete.
ps reveals ck-get-x11-server-pid is waiting on network connection to
the xserver that will eventually timeout.
Since it is impossible to get the process ID of the other end of a
TCP connection (manpages say Xlib uses TCP connections when
DISPLAY has a hostname: part) this patch skips getting the PID for
remote DISPLAYs.
References:
If the DISPLAY variable has a hostname component, e.g.
"remotehost:0.0", XOpenDisplay will use a TCP connection to it,
and the fd it returns later will be a TCP socket.
(http://tronche.com/gui/x/xlib/display/opening.html)
It is only possible to get the peer socket's PID for UNIX domain
sockets. (E.g. On linux, SO_PEERCRED is only usable for UNIX domain
sockets (i.e. PF_UNIX) )( http://linux.die.net/man/7/socket)
Bug report and patch provided by Joe Mullally.
https://bugs.launchpad.net/ubuntu/+source/consolekit/+bug/517323
|
|
Otherwise GCC nags us with warnings.
|
|
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.
|
|
|
|
In the else branch, e is used uninitialized. Move the cast outside
of the if/else block to prevent this.
|
|
Signed-off-by: Eric Koegel <eric.koegel@gmail.com>
|
|
Patch written by Rafal Muzylo.
Signed-off-by: Eric Koegel <eric.koegel@gmail.com>
|
|
|
|
The udev-acl tool has been removed from udev in version 182.
Add this tool to ConsoleKit for systems which don't use systemd-logind.
|
|
GDM screenscrapes the output and so we need the full username.
https://bugzilla.gnome.org/show_bug.cgi?id=650330
|
|
dbus-glib >= 0.82 requires dbus >= 1.1 so we can safely remove
DBUS_API_SUBJECT_TO_CHANGE.
|
|
https://bugs.freedesktop.org/show_bug.cgi?id=28377
|
|
Doesn't load any history files it doesn't need to which should
help performance on systems with long histories.
https://bugs.freedesktop.org/show_bug.cgi?id=25660
|
|
Someone needs to add support for non-Linux platforms.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=23948
|
|
This is consistent with how we write the wtmp records in GDM.
https://bugs.freedesktop.org/show_bug.cgi?id=23944
|
|
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=23279
|
|
The logic is supposed to find any type of removal event. This can
be one of CK_LOG_EVENT_SEAT_SESSION_REMOVED, CK_LOG_EVENT_SYSTEM_START,
CK_LOG_EVENT_SYSTEM_STOP, or CK_LOG_EVENT_SYSTEM_RESTART.
This is used to determine if the removal was normal or RECORD_STATUS_CRASH,
or RECORD_STATUS_DOWN. And indicated in the report log as something like:
"Thu Sep 3 21:28 - down (20:20)"
|
|
In some cases a controlling tty won't be able available to
peek at to find the VT of the X display. In those cases,
we fall back to looking at the XFree86_VT property.
We can do this because we know the display is a local display
since we've already gotten peer credentials from its socket.
|
|
|