summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* add a way to synchronously run programs on session add/remove/activity_changeDavid Zeuthen2007-10-045-0/+318
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for running programs when 1. A session is added 2. A session is removed 3. The activity of a session changes Executables with the suffix .ck in the directories $sysconfdir/ConsoleKit/run-session.d (typically /etc/ConsoleKit/run-session.d) and $libdir/ConsoleKit/run-session.d (typically /usr/lib/ConsoleKit/run-session.d) will be run on each event. The former directory is meant to be used for the system administrator and the latter is meant to be used by programs. Only when all programs in these directories have run, ConsoleKit will resume event processing and e.g. broadcast the event on the system message bus. Hence, this new mechanism can be used to safely (e.g. without race conditions) perform operations on certain resources before programs in the desktop session are told they may use them. The obvious example here is managing ACL's on /dev such that certain device nodes are only available to users in local and active sessions. The environment of the program launched is the environment that the ConsoleKit daemon was launched with and also the following variables (variables tagged with [*] may not be set). CK_SESSION_ID CK_SESSION_TYPE CK_SESSION_SEAT_ID CK_SESSION_USER_UID CK_SESSION_DISPLAY_DEVICE [*] CK_SESSION_X11_DISPLAY_DEVICE [*] CK_SESSION_X11_DISPLAY [*] CK_SESSION_REMOTE_HOST_NAME [*] CK_SESSION_IS_ACTIVE CK_SESSION_IS_LOCAL corresponding to the properties of a Session object in question. Each program is passed exactly one parameter that can assume one of the following values: - session_active_changed: is_active changed - session_added: the session was added - session_removed: the session was removed As a safety hatch, there is a timeout of 15 seconds for each program; if it hasn't exited within 15 seconds, the daemon will send it a SIGTERM signal, and move on to the next program. The daemon is still responsive when the program is running - this is to ensure that the program itself can call into the org.freedesktop.ConsoleKit service.
* don't use VT_GETSTATE when VT is unavailableBrian Cameron2007-09-191-0/+10
|
* try to make things work for systems that don't support VT_ACTIVATE etcWilliam Jon McCann2007-09-192-4/+25
|
* add wiki to readmeWilliam Jon McCann2007-09-191-2/+4
|
* post release version bumpWilliam Jon McCann2007-09-181-1/+1
|
* update for brown bag release0.2.3William Jon McCann2007-09-181-0/+6
|
* use unix-user instead of userWilliam Jon McCann2007-09-181-1/+1
|
* post release version bumpWilliam Jon McCann2007-09-171-1/+1
|
* update NEWS for release0.2.2William Jon McCann2007-09-171-0/+13
|
* remove policy for gdm userWilliam Jon McCann2007-08-291-15/+0
|
* fix FreeBSD issues translating VT numbers to devicesJoe Marcus Clarke2007-08-291-8/+14
| | | | | | | In FreeBSD the device number is always one less than the VT number (e.g. VT 1 is /dev/ttyv0). Account for this. Also, fix up reading console entries from /etc/ttys, and make sure the full TTY device name is returned for a given process stat.
* untabifyWilliam Jon McCann2007-08-285-22/+22
|
* fix some compiler warnings, untabifyWilliam Jon McCann2007-08-282-115/+81
| | | | Based on patch from Joe Marcus Clarke
* move some of the freebsd specific stuff into sysdepsWilliam Jon McCann2007-08-277-90/+229
|
* Don't create rc.d/init.d directory on FreeBSD.Florent Thoumie2007-08-271-2/+1
| | | | | | | Move the initdir variable inside the if-block so that it's not created on FreeBSD. Signed-off-by: Florent Thoumie <flz@FreeBSD.org>
* Disconnect init.d script on FreeBSD.Florent Thoumie2007-08-261-0/+5
| | | | | | | Don't install ConsoleKit script in init.d/rc.d/ as it is unusable on FreeBSD. Signed-off-by: Florent Thoumie <flz@FreeBSD.org>
* Add support for FreeBSDJoe Marcus Clarke2007-08-261-0/+4
| | | | | | Allow this test to properly determine the current tty device. Signed-off-by: Florent Thoumie <flz@FreeBSD.org>
* Add ck-sysdeps-freebsd.c to the list of dist sourcesJoe Marcus Clarke2007-08-261-0/+1
| | | | | | | Fix make dist by making sure ck-sysdeps-freebsd.c is available on all platforms. Signed-off-by: Florent Thoumie <flz@FreeBSD.org>
* Restore copyright.Florent Thoumie2007-08-251-0/+1
| | | | | | | | | Restore copyright in ck-sysdeps-freebsd.c since Marcus "used a lot of the existing functions". Submitted by: marcus Signed-off-by: Florent Thoumie <flz@FreeBSD.org>
* Some more fixes, Now test-vt-monitor works correctly.Florent Thoumie2007-08-252-16/+33
| | | | | | Submitted by: marcus Signed-off-by: Florent Thoumie <flz@FreeBSD.org>
* Add FreeBSD native backend (untested)Florent Thoumie2007-08-254-421/+182
| | | | | | | | | | - Add Marcus' FreeBSD backend for ConsoleKit. Compiles fine but test-vt-monitor doesn't seem to work correctly. - Remove TODO entry. Submitted by: marcus Signed-off-by: Florent Thoumie <flz@FreeBSD.org>
* Add a note about native FreeBSD backend in TODO.Florent Thoumie2007-08-251-0/+2
| | | | | | | At the moment, we rely on linprocfs being mounted, we need a native backend on FreeBSD. Signed-off-by: Florent Thoumie <flz@FreeBSD.org>
* First attempt a making ConsoleKit work on FreeBSDFlorent Thoumie2007-08-254-2/+679
| | | | | | | | - Add some ifdef's to make the code compile. - Add ck-sysdeps-freebsd.c, based on the Linux version, which means it's using linprocfs right now. Signed-off-by: Florent Thoumie <flz@FreeBSD.org>
* more build fixes for solarisBrian Cameron2007-08-222-3/+11
|
* abstract out the tty device basename stuffWilliam Jon McCann2007-08-214-13/+80
|
* more solaris supportWilliam Jon McCann2007-08-215-43/+136
| | | | based on patch from Brian Cameron.
* display the current vtWilliam Jon McCann2007-08-171-0/+12
|
* add test-vt-monitorWilliam Jon McCann2007-08-171-0/+1
|
* add a vt monitor test, move getfd to sysdeps, add a check for the root userWilliam Jon McCann2007-08-178-112/+230
|
* oops add docs for new seat interfacesWilliam Jon McCann2007-08-172-10/+64
|
* a few fixes for peer cred stuffWilliam Jon McCann2007-08-173-14/+29
|
* move peercred stuff into sysdeps. add solaris support.William Jon McCann2007-08-166-52/+107
|
* move all proc stuff into ck-sysdepsWilliam Jon McCann2007-08-169-165/+167
|
* move tools out of linux subdirectory since they apparently work on solarisWilliam Jon McCann2007-08-146-32/+39
|
* make a lt library for proc stuffWilliam Jon McCann2007-08-142-18/+28
|
* remove example device from seat configWilliam Jon McCann2007-08-141-1/+1
|
* make sure the device is a console and add some instructionsWilliam Jon McCann2007-08-141-0/+44
|
* don't bail if /proc/self/fd/0 is not a linkWilliam Jon McCann2007-08-141-2/+1
|
* add some solaris supportWilliam Jon McCann2007-08-144-3/+352
| | | | Based on a patch from Brian Cameron.
* print out tools libs after configureWilliam Jon McCann2007-08-081-0/+1
|
* don't use PERROR if not availableWilliam Jon McCann2007-08-071-1/+7
|
* don't use stderr or stdout as variable namesWilliam Jon McCann2007-08-071-11/+11
|
* change user to unix-userWilliam Jon McCann2007-08-011-1/+1
|
* use unix-user instead of userWilliam Jon McCann2007-08-011-3/+3
|
* Add preliminary support for seats with devicesWilliam Jon McCann2007-07-206-8/+319
|
* Add --display option to tool.William Jon McCann2007-07-201-4/+18
|
* Add new helper for getting tty from DISPLAYWilliam Jon McCann2007-07-182-0/+149
|
* a few fixes for getfd suggested by LennartWilliam Jon McCann2007-05-151-4/+12
| | | | | | | | | | | | | | | | | | | | | | I am currently investigating how to best integrate PulseAudio with ConsoleKit/PolicyKit. While doing that I had a look on your code, and found a few issues in getfd.c I'd like to report, before I forget them. I couldn't find any bugzilla with at consolekit project (neither fedora, nor fdo, nor gnome?) hence I am mailing you in person. In getfd.c in open_a_console() a close() is missing if is_a_console is missing. The open() in open_a_console() should probably use O_NOCTTY. Otherwise C-c on the console might end up in a SIGINT to your daemon process! Also I'd add an isatty() check to is_a_console(), to makes sure that you're actually talking to a TTY before you issue KDGKBTYPE on it. ioctl()s are unfortunately not unique, hence i'd recommend that check. That's it, Lennart
* bump versionWilliam Jon McCann2007-04-101-1/+1
|
* update for release0.2.1William Jon McCann2007-04-101-0/+15
|