| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
Add Stop and Restart methods to the Manager object. We'll rename the
Manager object to System in the near future. Use libpolkit to
determine authorization.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
| |
This will make it easier to dump/restore.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Refactor some event logging code to share with ck-history. At the
moment the command only prints the events.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Based on patch from Joe Marcus Clarke
|
| |
|
|
|
|
|
|
| |
Allow this test to properly determine the current tty device.
Signed-off-by: Florent Thoumie <flz@FreeBSD.org>
|
|
|
|
|
|
|
| |
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 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>
|
|
|
|
|
|
| |
Submitted by: marcus
Signed-off-by: Florent Thoumie <flz@FreeBSD.org>
|
|
|
|
|
|
|
|
|
|
| |
- 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 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>
|
| |
|
| |
|
|
|
|
| |
based on patch from Brian Cameron.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Based on a patch from Brian Cameron.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Also add ability to toggle debugging when SIGUSR1 is
received.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Oops.
|