Age | Commit message (Collapse) | Author | Files | Lines |
|
NetBSD 5 and later have getpeereid(3), but it only for euid.
Use getsockopt(2) with LOCAL_PEEREID if available in priority to it.
|
|
* 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
|
|
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.
|
|
When building outside of linux, again isn't referenced so toss it
in an ifdef to suppress the warning.
|
|
|
|
Patches taken from:
https://github.com/avsm/openbsd-ports/tree/master/sysutils/consolekit/patches
|
|
Patches taken from
https://github.com/DragonFlyBSD/DPorts/tree/master/sysutils/consolekit
|
|
Patch written by Robert Millan.
Signed-off-by: Eric Koegel <eric.koegel@gmail.com>
|
|
Patch written by Robert Millan.
Signed-off-by: Eric Koegel <eric.koegel@gmail.com>
|
|
As reported in https://launchpad.net/bugs/544139, ConsoleKit sometimes fails to
track the active VT. This particular case was tracked down to a race condition
that happens if you try to open /dev/console while the current TTY is currently
being closed. This yields an -EIO error, in which case CK should just try
again.
For a more detailled summary of the problem from a kernel perspective, please
see https://bugs.launchpad.net/ubuntu/+source/linux/+bug/554172/comments/245 .
https://bugs.freedesktop.org/show_bug.cgi?id=31790
|
|
This reverts commit 2782cc8d4950effbc4407455e72bd4750cef6e11.
VT_WAITEVENT is racy unfortunately, since events that happen between the
time we woke up from a VT_WAITEVENT and we go into the next VT_WAITEVENT
are lost completely.
|
|
Starting from linux kernel 2.6.32 there is a new ioctl VT_WAITEVENT
which can monitor vt switches and return new vt number.
https://bugs.freedesktop.org/show_bug.cgi?id=17720
|
|
ConsoleKit tries to find a valid fd it can issue
VT_WAITACTIVE against by iterating across a file list and issuing
ioctl(fd, KDGKBTYPE, &arg), then checking the return value. Not all console
devices support this ioctl, so in some cases it never finds a valid file
descriptor to use, and from then on never marks any session active.
We probably ought to be using something like VT_GETSTATE instead of a keyboard
ioctl, but that's not sufficient to fix it. One fix that seems to work, though
I'm not completely sure if it's the best answer, is to add /dev/tty0 to the list
of files to try before /dev/console.
|
|
|
|
|
|
|
|
Submitted by: marcus
Signed-off-by: Florent Thoumie <flz@FreeBSD.org>
|
|
based on patch from Brian Cameron.
|
|
|
|
|
|
|