summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2007-10-17add a basic ck-history commandWilliam Jon McCann7-600/+1262
Refactor some event logging code to share with ck-history. At the moment the command only prints the events.
2007-10-16add event logging capabilityWilliam Jon McCann5-6/+1430
This adds the ability to log events to a history file. One idea is to be able to provide wtmp like functionality. The next step is to add a seat-aware "last" command. This will be very useful for creating graphical logins that remember the most recent/frequent logins.
2007-10-10maintain a file with the dump of the local databaseDavid Zeuthen6-7/+330
This feature is useful for programs wanting to read the database without going through the D-Bus interface. This is sometimes desirable when both performance and runtime dependencies are important. For security reasons the file is only readable for the super user.
2007-10-10remove session/seat from list before signalingWilliam Jon McCann2-19/+66
We should remove the session or seat from the lists before calling out or emitting a signal. We steal from the lists and then unref the objects when the signal is complete.
2007-10-04add a way to synchronously run programs on session add/remove/activity_changeDavid Zeuthen5-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.
2007-09-19don't use VT_GETSTATE when VT is unavailableBrian Cameron1-0/+10
2007-09-19try to make things work for systems that don't support VT_ACTIVATE etcWilliam Jon McCann1-4/+23
2007-08-29fix FreeBSD issues translating VT numbers to devicesJoe Marcus Clarke1-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.
2007-08-28untabifyWilliam Jon McCann5-22/+22
2007-08-28fix some compiler warnings, untabifyWilliam Jon McCann2-115/+81
Based on patch from Joe Marcus Clarke
2007-08-27move some of the freebsd specific stuff into sysdepsWilliam Jon McCann7-90/+229
2007-08-26Add support for FreeBSDJoe Marcus Clarke1-0/+4
Allow this test to properly determine the current tty device. Signed-off-by: Florent Thoumie <flz@FreeBSD.org>
2007-08-26Add ck-sysdeps-freebsd.c to the list of dist sourcesJoe Marcus Clarke1-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>
2007-08-25Restore copyright.Florent Thoumie1-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>
2007-08-25Some more fixes, Now test-vt-monitor works correctly.Florent Thoumie2-16/+33
Submitted by: marcus Signed-off-by: Florent Thoumie <flz@FreeBSD.org>
2007-08-25Add FreeBSD native backend (untested)Florent Thoumie2-419/+174
- 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>
2007-08-25First attempt a making ConsoleKit work on FreeBSDFlorent Thoumie4-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>
2007-08-22more build fixes for solarisBrian Cameron2-3/+11
2007-08-21abstract out the tty device basename stuffWilliam Jon McCann4-13/+80
2007-08-21more solaris supportWilliam Jon McCann5-43/+136
based on patch from Brian Cameron.
2007-08-17display the current vtWilliam Jon McCann1-0/+12
2007-08-17add test-vt-monitorWilliam Jon McCann1-0/+1
2007-08-17add a vt monitor test, move getfd to sysdeps, add a check for the root userWilliam Jon McCann8-112/+230
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 McCann3-0/+92
2007-08-16move all proc stuff into ck-sysdepsWilliam Jon McCann6-135/+137
2007-08-14make a lt library for proc stuffWilliam Jon McCann1-14/+25
2007-08-14make sure the device is a console and add some instructionsWilliam Jon McCann1-0/+44
2007-08-14don't bail if /proc/self/fd/0 is not a linkWilliam Jon McCann1-2/+1
2007-08-14add some solaris supportWilliam Jon McCann3-3/+350
Based on a patch from Brian Cameron.
2007-08-07don't use PERROR if not availableWilliam Jon McCann1-1/+7
2007-08-07don't use stderr or stdout as variable namesWilliam Jon McCann1-11/+11
2007-07-20Add preliminary support for seats with devicesWilliam Jon McCann4-8/+310
2007-05-15a few fixes for getfd suggested by LennartWilliam Jon McCann1-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
2007-04-05use inotify to detect activity on tty when possibleWilliam Jon McCann9-56/+1472
2007-04-03add some input validationWilliam Jon McCann1-3/+15
2007-04-03daemonize a little earlierWilliam Jon McCann1-4/+4
2007-04-03add a glib message to syslog handlerWilliam Jon McCann11-311/+366
Also add ability to toggle debugging when SIGUSR1 is received.
2007-04-02daemonize properlyDavid Zeuthen1-2/+1
2007-04-02autoconf fixes, separate pamlibdir variable, path expansion at make timeMichael Biebl1-0/+1
The attached patch does the following: - Use a separate $pam-module-dir variable for the pam module - Instead of defining a custom $slibdir variable, just use the standard $libdir variable specified by autoconf - Use the standard autoconf $docdir variable (Add AC_PREREQ(2.59) for that). - Drop AS_AC_EXPAND macro and remove AC_DEFINE_UNQUOTED for dir variables. + Build the init script at make time using sed + Use defines in src/Makefile.am to pass the variables to gcc at make time - Consistently use AC_HELP_STRING everywhere - Remove/Replace deprecated macros: + AM_INIT_AUTOMAKE takes the package name and version number from AC_INIT + AM_CONFIG_HEADER -> AC_CONFIG_HEADERS + AC_OUTPUT -> AC_CONFIG_FILES Patch is tested and make distcheck works.
2007-04-02add unix-user to parse listWilliam Jon McCann1-1/+1
Oops.
2007-03-19add CanActivateSessions to Seat interfaceWilliam Jon McCann4-16/+39
And associated documentation and added to test-fus.
2007-03-14dont' mark the user properties to be set in the constructorWilliam Jon McCann1-2/+2
Now that we have two properties (one deprecated) that refer to the same thing we can't require that they are both set during the constructor. Furthermore, we can't require that either of them are set because we don't know which will be used.
2007-03-13deprecate the user properties and add unix-user propertiesWilliam Jon McCann6-19/+71
Also added deprecated notes to the docs. New code should be using GetUnixUser instead of GetUser etc.
2007-03-13various leak fixesWilliam Jon McCann4-21/+68
2007-03-13add the last bits of spec frameworkWilliam Jon McCann3-30/+11
The spec is the introspection format extended with docs. There are tools to build docbook and strip the docs to make dbus introspect xml.
2007-03-09fix the user prop typeWilliam Jon McCann1-9/+9
2007-03-09add a few more parameters to session idlWilliam Jon McCann1-0/+8
2007-03-09add uuid to cookieWilliam Jon McCann1-1/+9
2007-03-09add a tool to autogenerate dbus object ref docsWilliam Jon McCann3-8/+25
I hope I didn't reinvent a wheel but it seems to work much better than hand coding these refentries. Still need to add support for comments and actual descriptions ala gtk-doc.