1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-06 08:26:52 +03:00
Commit Graph

149 Commits

Author SHA1 Message Date
Lennart Poettering
6524990fdc logind: support for hybrid sleep (i.e. suspend+hibernate at the same time) 2012-10-28 00:50:35 +02:00
Lennart Poettering
8481248b9f util: unify usage of on_tty() in util.c 2012-10-19 00:07:55 +02:00
Lennart Poettering
c846716a5a loginctl: show pager also for status command 2012-10-17 21:25:42 +02:00
Lennart Poettering
6d0274f115 timedatectl: introduce new command line client for timedated
Much like logind has a client in loginctl, and journald in journalctl
introduce timedatectl, to change the system time (incl. RTC), timezones
and related settings.
2012-10-17 21:25:42 +02:00
Lennart Poettering
7708588119 logind: only release logind session from the PAM module if the same module instance actually created it 2012-10-16 19:21:21 +02:00
Zbigniew Jędrzejewski-Szmek
1ca6783f5e log: introduce a macro to format message id
The MESSAGE_ID=... stanza will appear in countless number of places.
It is just too long to write it out in full each time.

Incidentally, this also fixes a typo of MESSSAGE is three places.
2012-10-13 14:26:30 +02:00
Lennart Poettering
083f4da2a8 logind: expose missing signals in Session bus objects 2012-10-09 00:49:53 +02:00
Сковорода Никита Андреевич
2f1bb51336 man: handle-sleep-key is invalid, replace it with handle-suspend-key and handle-hibernate-key in systemd-inhibit help and man. 2012-10-03 19:15:02 -04:00
Lennart Poettering
a8573ccc35 pam: check environ[] for XDG_SEAT as fallback
This is useful for systems such as kmscon which want to invoke classic
/sbin/login but use it on multiple seats.
2012-10-01 14:50:05 -04:00
Lennart Poettering
aaeef05886 multi-seat-x: drop a lot of unnecessary code 2012-09-21 17:03:40 +02:00
Lennart Poettering
8e7705e52a pam: document that we don't do error checking when parsing vtnr 2012-09-21 16:17:26 +02:00
Lukas Nykryn
5d5e98eb8c login: missing break for getopt ARG_NO_ASK_PASSWORD in loginctl 2012-09-21 16:12:55 +02:00
Václav Pavlín
ca4f2b6d6d login: check return value of session_get_idle_hint 2012-09-21 16:08:54 +02:00
Václav Pavlín
5a165aa6b9 logind: check return value, log warning on error 2012-09-21 16:04:48 +02:00
Dave Airlie
e57d4fa35e multi-seat-x: drop framebuffer specific stuff, as we have a DRM driver now 2012-09-21 15:53:10 +02:00
Lennart Poettering
ec29187225 Revert "multi-seat: drop multi-seat-x wrapper, as upstream X can handle multi-seat graphics on its own now"
This reverts commit 636d30a089.

Turns out we will need the multi-seat wrapper a bit longer, however
without the fb-specific bits in it.
2012-09-21 15:51:04 +02:00
Lennart Poettering
8e7fd6ade4 logind: split up HandleSleepKey= into HandleSuspendKey= and HandleHibernateKey=
The kernel and X11 distuingish these two, and Thinkpad keys have both,
hence we really should distinguish them too.
2012-09-21 15:44:14 +02:00
Lennart Poettering
636d30a089 multi-seat: drop multi-seat-x wrapper, as upstream X can handle multi-seat graphics on its own now 2012-09-21 12:46:22 +02:00
Lennart Poettering
409133be63 logind: allow users to override their own suspend/sleep inhibitors 2012-09-21 11:57:48 +02:00
Lennart Poettering
7d5e9c0f60 util: define union dirent_storage and make use of it everywhere
Make sure to allocate enough space for readdir_r().

https://bugzilla.redhat.com/show_bug.cgi?id=858754
2012-09-19 22:21:09 +02:00
Lennart Poettering
65b5116220 logind: if a lid-switch lock was taken while the lid was closed, recheck lid status when the lock is released 2012-09-19 15:42:29 +02:00
Lennart Poettering
f981b9c5be logind: properly parse handle-lid-switch inhibitor 2012-09-19 15:29:24 +02:00
Lennart Poettering
12a1309e11 man: document new inhibitor types 2012-09-19 15:28:55 +02:00
Lennart Poettering
beaafb2ea6 logind: rework power key/suspend key/lid switch handling
http://lists.freedesktop.org/archives/systemd-devel/2012-September/006604.html
https://bugzilla.gnome.org/show_bug.cgi?id=680689

This changes the meaning of the
HandlePowerKey=/HandleSleepKey=/HandleLidSwitch= setting of logind.conf
2012-09-19 13:10:10 +02:00
Lennart Poettering
b14eda963c logind: split up inhibit acquire policy 2012-09-18 01:16:23 +02:00
Lennart Poettering
d4d882e5ce logind: make VT reservation logic compatible with containers 2012-09-17 19:11:48 +02:00
Lennart Poettering
98a77df5fe logind: make sure there's always a getty available on TTY6
Previously, if X allocated all 6 TTYs (for multi-session for example) no
getty would be available anymore to guarantee console-based logins.

With the new ReserveVT= switch in logind.conf we can now choose one VT
(6 by default) that will always be subject to autovt-style activation,
i.e. we'll always have a getty on TTY6, and X will never take possession
of it.
2012-09-17 12:39:16 +02:00
Zbigniew Jędrzejewski-Szmek
4a271908f1 logind: redefine idleness to start at last activity
Before, after the timeout, a session would be timestamped as idle
since 'last activity' + 'idle timeout'. Now, it is timestamped as idle
since 'last activity'.

Before, after all sessions were idle, the seat would be marked with as
idle with the timestamp of the oldest idle session. Now it is
marked with the timestamp of the youngest idle session.

Both changes seem to me to be closer to natural understanding of
idleness: the time since last activity counts.
2012-09-16 11:34:53 +02:00
Lennart Poettering
d18dff430b login: reshuffle meaning of require_active parameter 2012-09-12 08:30:35 +02:00
Colin Guthrie
78ab361c8f logind: Avoid unnecesary rewrite of user file when switching sessions of the same user. 2012-09-12 08:20:01 +02:00
Colin Guthrie
23bd3b6263 logind: Ensure the user, seat and session files are updated when the session is closing. 2012-09-12 08:19:59 +02:00
Colin Guthrie
2dc8f41a2b logind: Add a two new variables to the user session tracking file.
This counts 'online sessions' in addition to 'active sessions' and 'sessions'.

In this context, an 'online session' covers all session in the 'active' state
in addition to the explicit 'online' state.

This provides an easy machanism to determin all relevant sessions easily
(i.e. those that are not 'closing') and adds new semantics to the sd-login.c
APIs sd_uid_get_sessions() and sd_uid_get_seats() where the require_active
argument can be supplied as a value 2 which only lists sessions which are
'online'.

This functionality should allow client applications to avoid deadlocks where
they only exit when all sessions are complete, such as a the problem where
PulseAudio will not exit until all sessions are gone, but in itself prevents
the session from exiting.
2012-09-12 08:19:54 +02:00
Colin Guthrie
47acb2f15f logind: Properly list the ACTIVE_SEATS in the user session tracking file.
Prevsiouly the first active seat for a user would never be listed and
any subsequent seats would be concatenated on without any spaces.
2012-09-12 08:19:43 +02:00
Colin Guthrie
c9caad8021 logind: If all user sessions are in closing state, set the overall status to closing.
PulseAudio for example will keep a client connection open provided
at least one session exists. However, if all sessions are currently
in the process of closing, we should flag that as the overall state
appropriately to better reflect what is happening.

Although this does better reflect the status for any given user, it does
not actually solve the overall problem of PulseAudio still finding some
sessions active and thus not exiting and therefore actually preventing
the session from closing. Future commits will extend sd-login to cope
with this situation.
2012-09-12 08:19:40 +02:00
Colin Guthrie
f904bdf2e9 pam: Add session class to the debug log. 2012-09-12 08:19:23 +02:00
Lennart Poettering
77030bd65f inhibit: close all fds when invoking inhibited tool 2012-09-10 09:45:55 +02:00
Lennart Poettering
3137e0bd52 dbus: minor coding style fixes 2012-09-10 09:38:49 +02:00
Matthias Clasen
680258b112 Make systemd-inhibit --list work
The code in the print_inhibitors function had an unintended
unconditional early exit, causing it to never print any
inhibitors.
2012-09-10 09:32:50 +02:00
Lennart Poettering
877d54e9b0 journal: generate structured journal messages for a number of events 2012-09-03 18:59:04 -07:00
Lukas Nykryn
a34faf579d login: check return of parse_pid and parse_uid 2012-08-23 13:53:30 +02:00
Simon Peeters
b9c26b4134 logind: use bus_method_call_with_reply() where posible 2012-08-08 17:20:04 +02:00
Simon Peeters
2a3613b121 loginctl: use bus_method_call_with_reply() where posible 2012-08-08 14:38:05 +02:00
Lennart Poettering
7212a8a99e logind: add new loginctl lock-sessions command 2012-07-29 17:08:47 +02:00
Lennart Poettering
fa2b196da1 logind: add LockSessions() call to lock all local sessions at once 2012-07-29 16:17:06 +02:00
Lennart Poettering
9d17cf3e93 login: lose policy a bit: allow user suspend unauthenticated when multiple sessions exist 2012-07-26 15:56:56 +02:00
Shawn Landden
0d0f0c50d3 log.h: new log_oom() -> int -ENOMEM, use it
also a number of minor fixups and bug fixes: spelling, oom errors
that didn't print errors, not properly forwarding error codes,
few more consistency issues, et cetera
2012-07-26 11:48:26 +02:00
Shawn Landden
669241a076 use "Out of memory." consistantly (or with "\n")
glibc/glib both use "out of memory" consistantly so maybe we should
consider that instead of this.

Eliminates one string out of a number of binaries. Also fixes extra newline
in udev/scsi_id
2012-07-25 11:23:57 +02:00
Kay Sievers
ff87b7e748 uaccess: add ID_SECURITY_TOKEN device class for USB authentication keys 2012-07-24 20:13:46 +02:00
Zbigniew Jędrzejewski-Szmek
17804d7f0a logind: fix operation precedence mix-up
Since + has higher precedence than ?:, and u+b is unlikely to be exactly zero,
the timestamp would usually be set to IDLE_THRESHOLD_USEC. Fix it by
returning either 'last activity', or 'last activity+IDLE_THRESHOLD_USEC'.
2012-07-22 23:53:48 +02:00
Shawn Landden
c2f1db8f83 use #pragma once instead of foo*foo #define guards
#pragma once has been "un-deprecated" in gcc since 3.3, and is widely supported
in other compilers.

I've been using and maintaining (rebasing) this patch for a while now, as
it annoyed me to see #ifndef fooblahfoo, etc all over the place,
almost arrogant about the annoyance of having to define all these names to
perform a commen but neccicary functionality, when a completely superior
alternative exists.

I havn't sent it till now, cause its kindof a style change, and it is bad
voodoo to mess with style that has been established by more established
editors. So feel free to lambast me as a crazy bafoon.

v2 - preserve externally used headers
2012-07-19 12:30:59 +02:00