| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
https://bugs.freedesktop.org/show_bug.cgi?id=21310
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Treat the parameters passed in via OpenSessionWithParameters
as overrides.
|
|
|
|
| |
We don't want scripts going into lib64...
|
| |
|
| |
|
|
|
|
|
| |
Da bus no likey nulls for object paths. Return false and set
error if there is no active session.
|
|
|
|
| |
Also enable reporting this information with ck-history.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch makes polkit an optional dependency. If present
it builds with it. If not, polkit support is disabled.
This patch also adds a --enable-rbac-shutdown=<key> option.
If set, then ConsoleKit will allow shutdown/reboot if the
user has the RBAC key authorization defined. For example,
since the GDM GUI program runs as the "gdm" user, setting
the key for the "gdm" user allows the login program to
shutdown and reboot via ConsoleKit.
Also this patch modifies the tools/solaris/ck-system-restart
and tools/solaris/ck-system-stop scripts to call "/sbin/init 6"
and "/sbin/init 5", which are the right commands for Solaris.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Also add ability to toggle debugging when SIGUSR1 is
received.
|
|
|
|
| |
Oops.
|
|
|
|
|
| |
Also added deprecated notes to the docs. New code should
be using GetUnixUser instead of GetUser etc.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Use an async helper job to collect session info for the
OpenSession() method.
|
|
|
|
|
|
|
|
|
|
| |
Restructure things a bit so that we can be completely async
about creating sessions. We want to do this so we can use
callouts to gather session info or to verify info. Also
make the OpenSession create a parameter list and then create
the session rather than creating the session and changing
attributes. This is less racy and the session will be complete
and correct before any signals are emitted.
|
|
|
|
|
| |
Make the proc.h API more coherent. Convert some warnings
to debug statements. Fix two leaks. Add more error checking.
|
|
|
|
| |
Copy the iso8601 function from glib to support versions less than 2.12.
|
| |
|
|
|
|
|
| |
The system idle hint is TRUE when there are no busy (ie non-idle) sessions.
So the system is idle when there are no sessions or all sessions are idle.
|
|
|
|
| |
Only allow the uid and pid that opened the session to close it.
|
| |
|
| |
|
| |
|