summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-05-06Check passed in variables for NULL before usingEric Koegel2-1/+8
2017-05-06Fix ref count warning messages in ck-inhibitEric Koegel2-14/+8
Commit 635648deede5a4 has the side effect of causing a warning message when the uninhibit signals are sent during the finalize phase as we can't take a reference there. So we'll need to check to see if the object was destroyed before sending each emit message. Additionally, in the manager, move the disconnect signal handler up since we'll be removing that inhibit anyway. This should fix: https://github.com/ConsoleKit2/ConsoleKit2/issues/92 https://github.com/ConsoleKit2/ConsoleKit2/issues/87
2017-05-04Turn a harmless warning message into a debug oneEric Koegel1-1/+4
This way users don't have to see the warnings about not being able to read a processes environment file. Fixes: https://github.com/ConsoleKit2/ConsoleKit2/issues/79
2017-05-04fix coverity cid 64730 Use of untrusted string valueEric Koegel1-1/+19
2017-05-04fix coverity cid 178980 Constant expression resultEric Koegel1-1/+1
2017-05-04fix coverity cid 178982 Resource leakEric Koegel1-0/+2
2017-05-04trivial: docs cleanupEric Koegel1-4/+0
2017-05-04Prevent a use-after-free in while emitting signal changesEric Koegel1-1/+16
We need to keep a ref while sending all the inhibit change messages. Fixes: https://github.com/ConsoleKit2/ConsoleKit2/issues/87
2017-05-04trivial: i18n updatesEric Koegel5-313/+567
2017-05-04Handle runtimedir not being created/setEric Koegel2-10/+17
For: https://github.com/ConsoleKit2/ConsoleKit2/issues/74
2017-05-04Add support for server managed FDsEric Koegel20-69/+2306
These will be needed by session compositors that don't want to run as root. It should also allow xorg to run as a user as well. This is what logind exports and session controllers like KDE expect. This adds a udev, evdev, libdevattr, and none backend for device management. More can be added in the future. This code is based on code in logind, dragonfly BSD's weston diffs, and libweston; See: https://freedesktop.org/wiki/Software/systemd/logind/ https://github.com/DragonFlyBSD/DeltaPorts/tree/master/ports/graphics/weston/newport https://cgit.freedesktop.org/wayland/weston/
2017-05-04Update udev rulesEric Koegel6-3/+84
2017-02-06Merge pull request #91 from ajacoutot/openbsd-dmEric Koegel1-3/+6
Add a few more display manager users.
2017-02-06Merge pull request #90 from ajacoutot/openbsd-vtEric Koegel1-0/+4
Fix for OpenBSD VT device naming scheme.
2017-01-25Do the same for FreeBSD as well.Antoine Jacoutot1-0/+2
2017-01-25Add a few more display manager users.Antoine Jacoutot1-3/+6
On OpenBSD, system users start with an underscore.
2017-01-25Fix for OpenBSD VT device naming scheme.Antoine Jacoutot1-0/+2
2016-11-19Merge pull request #86 from lainegholson/masterEric Koegel1-1/+2
Fix pam-ck-connector on musl
2016-10-14Fix pam-ck-connector on muslLaine Gholson1-1/+2
2016-10-03Merge pull request #83 from ajacoutot/openbsd-kvmEric Koegel1-1/+1
OpenBSD: adapt to recent kvm(3) restrictions
2016-09-28OpenBSD: adapt to recent kvm(3) restrictionsAntoine Jacoutot1-1/+1
OpenBSD no longer allows accessing /dev/mem via kvm(3) so change the kvm_openfiles(3) flag from O_RDONLY to KVM_NO_FILES; actually it should have been this way since the beginning and matches what NetBSD does.
2016-09-26Merge pull request #82 from tw4452852/memory_leakageEric Koegel3-6/+18
fix some memory leakages
2016-09-25Merge pull request #81 from tw4452852/recursive_deletionEric Koegel1-14/+47
fix memory corruption due to delete session recursively
2016-09-22fix some memory leakagesTw3-6/+18
fix issue #77 Signed-off-by: Tw <tw19881113@gmail.com>
2016-09-22fix memory corruption due to delete session recursivelyTw1-14/+47
fix issue #80 Signed-off-by: Tw <tw19881113@gmail.com>
2016-09-09Merge pull request #78 from wulframus/masterEric Koegel3-4/+7
Use UID of logged in user as cgroup owner instead UID of session leader process
2016-09-05Use UID of logged in user instead UID of session leader processNikolai A. Dubinin3-4/+7
2016-07-15Merge pull request #75 from obache/neatsrc/fix-get_tty-on-netbsdEric Koegel1-1/+1
Fix a reversed condition for invalid device on NetBSD
2016-07-15Fix a reversed condition for invalid device on NetBSDOBATA Akio1-1/+1
2016-06-30Freebsd: Fix session activationEric Koegel3-5/+11
On Freebsd (10.3), quite often X11 sessions do not become active. If they are active, switching the virtual console and then later return to X causes the X session to be inactive. I believe this has something to do with how the FreeBSD sc/vt drivers initialize the devices (and when). I have a patch to fix the issue attached. This problem is present all the way back to version 0.45. I noticed that some time ago, someone tried to fix this issue by using /dev/consolectl, but this device is never used because isatty() is false on /dev/consolectl. I have an attached patch that gets ConsoleKit to use /dev/consolectl and now session activation and VT switching work. Patch and bug report by Victor Bergman. https://github.com/ConsoleKit2/ConsoleKit2/issues/71 Signed-off-by: Eric Koegel <eric.koegel@gmail.com>
2016-06-10Merge pull request #68 from perfinion/selinuxEric Koegel10-1/+193
Selinux support
2016-06-10mount tmpfs with correct selinux labelsJason Zaman1-1/+9
Signed-off-by: Jason Zaman <jason@perfinion.com>
2016-06-10Initialize/finish sysdeps when bus is aquired/lostJason Zaman1-0/+4
Signed-off-by: Jason Zaman <jason@perfinion.com>
2016-06-10Add ck_sysdeps_init/fini functionsJason Zaman7-0/+70
Signed-off-by: Jason Zaman <jason@perfinion.com>
2016-06-10ck-sysdeps-linux: Add selinux lib functionsJason Zaman1-0/+89
Signed-off-by: Jason Zaman <jason@perfinion.com>
2016-06-10Add configure.ac checks for SELinuxJason Zaman2-0/+21
Signed-off-by: Jason Zaman <jason@perfinion.com>
2016-04-22Merge pull request #67 from whitslack/ck-remove-directoryEric Koegel1-16/+28
ck-remove-directory: remove dest dir as real user
2016-04-21ck-remove-directory: remove dest dir as real userMatt Whitlock1-6/+25
Attempting to remove "<rundir>/user/<uid>" as user <uid> fails because the user typically does not own the "<rundir>/user" directory. This failure causes remove_dest_dir() to call g_error(), which raises a SIGTRAP. This causes a trap diagnostic message to be emitted to the kernel log, which is undesirable. This commit changes remove_dest_dir() so that it removes the contents of the dest dir as user <uid> and then removes the dest dir itself as the real user invoking ck-remove-directory (probably root).
2016-04-21ck-remove-directory: remove unused dest parameter on become_userMatt Whitlock1-7/+2
The dest parameter is irrelevant to the function become_user, and it's already checked for NULL immediately before become_user() is called, so remove the redundant (and misplaced) check in become_user and remove the extraneous parameter.
2016-04-21ck-remove-directory: return exit code 0 on successMatt Whitlock1-3/+1
remove_dest_dir() returns the return value of nftw(), which is specified to return 0 on success. The main function was previously returning (ret != TRUE), which would be true in the successful case, as (0 != !0), but true becomes 1 when converted to an int, and a 1 exit code from a process conventionally indicates failure. This commit corrects main's return statement so that a successful run of remove_dest_dir() causes the process to return exit code 0.
2016-04-17Merge pull request #66 from EricKoegel/issue-65Eric Koegel3-21/+16
Fixes for Issue #65 ck-1.1.0 cgroups warning
2016-04-15Turn the first pid move warning into a debugEric Koegel1-5/+3
2016-04-10Attempt to use 'cpuaccount' if 'all' cgroup fails on pid moveEric Koegel1-2/+14
For whatever reason, sometimes moving the pid into all the cgroups with cgmanager fails, but we only require cpuaccount for our internal use so try that as a fallback.
2016-04-10Remove the root restriction for runtime dirsEric Koegel2-15/+0
2016-03-20Merge pull request #39 from kwm81/changesEric Koegel1-2/+1
Fix two install issues with 90-consolekit
2016-03-20Improve documentation for XDG_RUNTIME_DIREric Koegel3-2/+21
1) Add what it may fail with and when it was added to the docs. 2) Add a description to the man page. 3) Add it to the ck-list-sessions output
2016-03-17Updates for 1.1.0 release1.1.0Eric Koegel7-190/+274
2016-03-16Transifex translation updateConsoleKit2TransifexBot5-196/+266
Mode: default Matched 5 languages
2016-03-16Add a 'User' section to the ck databaseEric Koegel1-1/+126
This will list the sessions assigned to the user and if at least one of them is local.
2016-03-14Properly filter the sessions for the specified userEric Koegel1-4/+36