summaryrefslogtreecommitdiff
path: root/src/ck-sysdeps-unix.c
AgeCommit message (Collapse)AuthorFilesLines
2015-10-10Fix pid detection with ck_get_socket_perr_credentials on NetBSDOBATA Akio1-0/+20
NetBSD 5 and later have getpeereid(3), but it only for euid. Use getsockopt(2) with LOCAL_PEEREID if available in priority to it.
2015-09-09Add NetBSD supportOBATA Akio1-3/+10
* 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
2015-08-22Revert "Minor code refactoring"Eric Koegel1-59/+0
This reverts commit bee63889f4a0b8f57807a61d8396346cec8cd5b1. There are some cases where ConsoleKit2 would crash after successfully suspending so revert this commit.
2015-08-09Minor code refactoringEric Koegel1-0/+59
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.
2014-10-05unused label 'again'Eric Koegel1-1/+4
When building outside of linux, again isn't referenced so toss it in an ifdef to suppress the warning.
2014-10-05Fix some unused variable warningsEric Koegel1-6/+5
2014-10-04Add OpenBSD supportRobert Nagy1-2/+18
Patches taken from: https://github.com/avsm/openbsd-ports/tree/master/sysutils/consolekit/patches
2014-10-03Improve DragonFlyBSD supportEric Koegel1-2/+11
Patches taken from https://github.com/DragonFlyBSD/DPorts/tree/master/sysutils/consolekit
2014-09-30Enables the FreeBSD VT ioctls on GNU/kFreeBSD (Bug 73258)Eric Koegel1-2/+2
Patch written by Robert Millan. Signed-off-by: Eric Koegel <eric.koegel@gmail.com>
2014-09-30Fallback to getpeereid() on FreeBSD and GNU/kFreeBSD (Bug 73257)Eric Koegel1-0/+9
Patch written by Robert Millan. Signed-off-by: Eric Koegel <eric.koegel@gmail.com>
2011-05-03Retry opening console device on EIOColin Watson1-0/+17
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
2010-11-17Revert "linux: Use VT_WAITEVENT if available to avoid spawn too many threads"Lennart Poettering1-44/+0
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.
2010-09-06linux: Use VT_WAITEVENT if available to avoid spawn too many threadsKan-Ru Chen1-0/+44
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
2007-12-08use VT_GETSTATE and tty0 to identify a console_ioctl on linuxPeter Jones1-4/+9
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.
2007-09-19try to make things work for systems that don't support VT_ACTIVATE etcWilliam Jon McCann1-4/+23
2007-08-28untabifyWilliam Jon McCann1-3/+3
2007-08-27move some of the freebsd specific stuff into sysdepsWilliam Jon McCann1-0/+69
2007-08-25Some more fixes, Now test-vt-monitor works correctly.Florent Thoumie1-3/+11
Submitted by: marcus Signed-off-by: Florent Thoumie <flz@FreeBSD.org>
2007-08-21more solaris supportWilliam Jon McCann1-11/+29
based on patch from Brian Cameron.
2007-08-17add a vt monitor test, move getfd to sysdeps, add a check for the root userWilliam Jon McCann1-1/+113
2007-08-17a few fixes for peer cred stuffWilliam Jon McCann1-6/+20
2007-08-16move peercred stuff into sysdeps. add solaris support.William Jon McCann1-0/+84