Age | Commit message (Collapse) | Author | Files | Lines |
|
Patch written by Robert Millan.
Signed-off-by: Eric Koegel <eric.koegel@gmail.com>
|
|
Currently consolekit fails to build on GNU/Hurd mainly because there's no
sysdeps backend for the GNU OS implemented.
The attached patch proposes a sysdeps-gnu backend, which implements the process
management using Hurd's libps, the *ttyent API for the part of the console
implementation and the rest using similar (valid) approaches of other backends.
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=552393
https://bugs.freedesktop.org/show_bug.cgi?id=24738
|
|
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.
|
|
This reverts commit 24dc214f55e7c7c17d888d0ccf94cd3625767462.
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.
|
|
dbus-glib >= 0.82 requires dbus >= 1.1 so we can safely remove
DBUS_API_SUBJECT_TO_CHANGE.
|
|
Since 2782cc8d4950effbc4407455e72bd4750cef6e11 ConsoleKit fails, if it
has been compiled on a linux kernel >= 2.6.32 but is run with an older
kernel. Check for VT_WAITEVENT ioctl during runtime and fallback to the
old behaviour of creating a thread for every possible vt.
|
|
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
|
|
|
|
https://bugs.freedesktop.org/show_bug.cgi?id=26227
|
|
https://bugs.freedesktop.org/show_bug.cgi?id=28377
|
|
VT switching is always enabled on Linux, but for OpenSolaris VT switching
can be truned of by 'svcadm disable vtdaemon'. So we should also check
whether the service vtdaemon is online on OpenSolaris.
https://bugs.freedesktop.org/show_bug.cgi?id=26055
|
|
This reverts commit b2e65a0ab7f4c417c85433e3e9bf97befbe6da3b.
|
|
VT switching is always enabled on Linux, but for OpenSolaris VT switching
can be truned of by 'svcadm disable vtdaemon'. So we should also check
whether the service vtdaemon is online on OpenSolaris.
https://bugs.freedesktop.org/show_bug.cgi?id=26055
|
|
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=24152
|
|
https://bugs.freedesktop.org/show_bug.cgi?id=25703
|
|
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=561106
|
|
Previously, we would take a bus name right away, but
not register the manager object until later. This
causes a race when being activated by a method call
on the manager object, where ConsoleKit gets started
but the method call fails.
https://bugs.freedesktop.org/show_bug.cgi?id=25744
|
|
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=24992
|
|
Fixes bug http://defect.opensolaris.org/bz/show_bug.cgi?id=12322
This is solaris only bug, won't affect other platform.
|
|
Refer to bug http://defect.opensolaris.org/bz/show_bug.cgi?id=11612
|
|
|
|
|
|
|
|
|
|
This bug is copied from http://defect.opensolaris.org/bz/show_bug.cgi?id=10291.
The patch is attached, Please review it.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=22986
|
|
Someone needs to add support for non-Linux platforms.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=23948
|
|
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=23939
|
|
callout invocation
This adds a callout directory called seat.d/ that follows the basic
session.d/ semantics but works on seats instead of sessions.
As replacement for the old session.d/ 'session_active_changed'
semantics seat.d/ knows 'seat_active_session_changed'. Which combines
the two callouts necessary for session_active_changed into one. This has
various advantages: it's not as racy, allows the suppressing of ACL
permission changes when switching between sessions of the same user,
reduces the amount of disk IO and finally is less ugly.
This patch also moves all callout invocations into the CkManager. This
has the advantage that we can guarantee to have fully dumped the CK
database before the callout.
In summary, the session.d/ directory will now get two types of callout
invocations:
session_added
session_removed
In contrast, seat.d/ gets three types:
seat_added
seat_removed
seat_active_session_changed
The 'seat_active_session_changed' callout type gets two sets of
environment variables describing the old resp. the new session that is
active. Either set can be left out if no session was active before, or
no session will be active after the switch. This is similar to the logic
behind D-Bus' NameOwnerChanged.
This patch duplicates CkSeat's 'session-removed' signal into
'session-removed-full' (and friends). Reason for that is that the signal
forwarded via D-Bus needs the session id as string while the callout
code needs the session itself as object. Since at the time of invocation
the CkSeat is no longer in the seats hashtable it is hence necessary to
pass the object in as argument to the signal handlers, which makes this
duplification necessary to not confuse dbus-glib. For a similar reason
'active-session-changed' is duplicated as well.
|
|
The 'session_active_changed' callout is an invitaton to racy misuses
since it splits up the session switches into two events. This patch gets
rid of it.
At this point there are two known users of the session.d/ callouts:
- Suse/Ubuntu ship a script for emulating pam_atconsole style
/var/run/console management for supporting D-Bus' at_console feature
properly. Both Martin Pitt and Kay Sievers however are happy with
having this feature go away. In addition I prepared a patch for
D-Bus which makes the need for these scripts go away entirely. That
patch is currently awaiting review.
- udev's udev-acl tool currently uses this. However this doesn't work
correctly anyway since it relies on that the CK database is correctly
dumped before the tool is invoked, which CK does not handle properly
at this time. In fact fixing this problem is the main reason why I
came up with this patch series. Kay is also very interested in
seeing the 'session_active_changed' logic go away.
A later commit introduces a replacement functionality that is less racy.
Please note that this patch does not drop session.d/ in its entirety.
Only the 'session_active_changed' type callout is removed. Scripts that
only rely on 'session_added'/'session_removed' will continue to work
fine, and will continue to be supported.
|
|
We simply change the order how the signal handlers for D-Bus and the
database dumping are registered. According to the gobject docs it is
guaranteed that the signal handlers are run in the same order as they
are registered, so this should be safe and have the desired effect.
|
|
Hit an assert if folks add env vars but don't increase the env var array
size.
|
|
|
|
The CK database shall be readable by the D-Bus daemon which runs under
its own user id hence make sure it is readable for non-root processes.
To make sure this leaks no information this drops the session cookie
from the database.
|
|
|
|
It's a method of CkSession hence it belongs in ck-session.h
|
|
|
|
https://bugs.freedesktop.org/show_bug.cgi?id=21310
|
|
https://bugs.freedesktop.org/show_bug.cgi?id=20232
|
|
|
|
|
|
https://bugs.freedesktop.org/show_bug.cgi?id=18149
|
|
I changed the code to also loop through watch->notifies when
removing the watch due to inotify, and NULL each notify->watch
reference, the code then checks this before trying to delete
the watch itself if asked to remove the notify.
In order to prevent other race conditions in this area I also
made the inotify code not pass a watch to emit_events_in_idle,
as the watch may get freed in the meantime. It instead passes
the wd and the emit loop looks up the watch, discarding the
event if the watch has been removed.
I did however leave in the code that checks for a removed watch
before doing anything with inotify, as I hoped that this would
just optimise this case.
|
|
Chris Jones observed that console-kit-daemon had open a large number of
redundant file descriptors, pointing to /etc/ConsoleKit/run-session.d and
/usr/lib/ConsoleKit/run-session.d. It turns out that ck_run_programs() doesn't
close the directory handles after iterating, resulting in a fd leak and a small
memory leak.
The attached patch corrects this.
|
|
|
|
Fixes #17866
|
|
|
|
|
|
At one point we had to strip out the docs because dbus-glib didn't support
unknown tags. Apparently this is now fixed. Also install the xml to
/usr/share/dbus-1/interfaces.
|
|
|