b26fa1a2fbcfee7d03b0c8fd15ec3aa64ae70b9f |
|
10-Feb-2016 |
Daniel Mack <daniel@zonque.org> |
tree-wide: remove Emacs lines from all files
This should be handled fine now by .dir-locals.el, so need to carry that
stuff in every file. |
4b51966cf6c06250036e428608da92f8640beb96 |
|
02-Feb-2016 |
Nicolas Iooss <nicolas.iooss@m4x.org> |
logind: load SELinux labelling system
systemd-logind uses mkdir_label and label_fix functions without calling
first mac_selinux_init. This makes /run/user/$UID/ directories not
labelled correctly on an Arch Linux system using SELinux.
Fix this by calling mac_selinux_init("/run") early in systemd-logind.
This makes files created in /etc/udev/rules.d and /var/lib/systemd to be
labelled through transitions in the SELinux policy instead of using
setfscreatecon (with mac_selinux_create_file_prepare). |
2adae5ac5dd87cc6426ae0aa22116f20abc6646f |
|
18-Jan-2016 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
logind: simplify job variable handling
manager_{start,stop}_{slice,scope,unit} functions had an optional job
output parameter. But all callers specified job, so make the parameter
mandatory, add asserts. Also extract common job variable handling to
a helper function to avoid duplication.
Avoids gcc warning about job being unitialized. |
011062f3c0cff25f60fa15eca8a20b8e47d7db72 |
|
18-Jan-2016 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
logind: do not use an uninitialized variable
We requested various fields using SD_BUS_CREDS_AUGMENT but at least
sd_bus_creds_get_tty can fail with ENXIO, not setting the output variable. |
f5e5c28f42a2f6d006785ec8b5e98c11a71bb039 |
|
13-Jan-2016 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
tree-wide: check if errno is greater then zero
gcc is confused by the common idiom of
return errno ? -errno : -ESOMETHING
and thinks a positive value may be returned. Replace this condition
with errno > 0 to help gcc and avoid many spurious warnings. I filed
a gcc rfe a long time ago, but it hard to say if it will ever be
implemented [1].
Both conventions were used in the codebase, this change makes things
more consistent. This is a follow up to bcb161b0230f.
[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61846 |
0671d7f4636e2fb634f0fbad9c61fd1feb738023 |
|
19-Dec-2015 |
Joost Bremmer <toost.b@gmail.com> |
Fix typo on logind-dbus.c
method_schedule_shutdown referenced org.freedesktop.login1.poweroff*
which is never registered in polkit.
Now refers to org.freedesktop.login1.power-off*
Signed-off-by: Joost Bremmer <toost.b@gmail.com> |
716cff4b459017028ddb4460cdfdcd09acb36dff |
|
04-Dec-2015 |
Michal Sekletar <msekleta@redhat.com> |
login: make sure /run/nologin has correct SELinux label |
4afd3348c7506dd1d36305b7bcb9feb8952b9d6b |
|
27-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
tree-wide: expose "p"-suffix unref calls in public APIs to make gcc cleanup easy
GLIB has recently started to officially support the gcc cleanup
attribute in its public API, hence let's do the same for our APIs.
With this patch we'll define an xyz_unrefp() call for each public
xyz_unref() call, to make it easy to use inside a
__attribute__((cleanup())) expression. Then, all code is ported over to
make use of this.
The new calls are also documented in the man pages, with examples how to
use them (well, I only added docs where the _unref() call itself already
had docs, and the examples, only cover sd_bus_unrefp() and
sd_event_unrefp()).
This also renames sd_lldp_free() to sd_lldp_unref(), since that's how we
tend to call our destructors these days.
Note that this defines no public macro that wraps gcc's attribute and
makes it easier to use. While I think it's our duty in the library to
make our stuff easy to use, I figure it's not our duty to make gcc's own
features easy to use on its own. Most likely, client code which wants to
make use of this should define its own:
#define _cleanup_(function) __attribute__((cleanup(function)))
Or similar, to make the gcc feature easier to use.
Making this logic public has the benefit that we can remove three header
files whose only purpose was to define these functions internally.
See #2008. |
2f157acdae14962ed7b7f7734f3e3547477aea0a |
|
16-Nov-2015 |
David Herrmann <dh.herrmann@gmail.com> |
login: ignore JobRemoved of old jobs
If we requeue jobs, we are no longer interested in old jobs. Hence, we
better ignore any JobRemoved signals for old jobs and concentrate on our
replacements. |
79ee4ad108adc55c44891dc0058568d1068f311e |
|
16-Nov-2015 |
David Herrmann <dh.herrmann@gmail.com> |
login: make sure to replace existing units
When queuing unit jobs, we should rather replace existing units than
fail. This is especially important when we queued a user-shutdown and a
new login is encountered. In this case, we better raplce the shutdown
jobs. systemd takes care of everything else. |
06820eafdbc3dd89cb1f7563564c7d91426709ca |
|
15-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
machined,logind: be more careful when accepting PIDs and UIDs from clients
Always validate first before we start processing the data. |
90558f315844ec35e3fd4f1a19ac38c8721c9354 |
|
13-Nov-2015 |
Lennart Poettering <lennart@poettering.net> |
logind: add a new UserTasksMax= setting to logind.conf
This new setting configures the TasksMax= field for the slice objects we
create for each user.
This alters logind to create the slice unit as transient unit explicitly
instead of relying on implicit generation of slice units by simply
starting them. This also enables us to set a friendly description for
slice units that way. |
b5efdb8af40ea759a1ea584c1bc44ecc81dd00ce |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out allocation calls into alloc-util.[ch] |
430f0182b72373145c839dbfe99d2382855cb8f8 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
src/basic: rename audit.[ch] → audit-util.[ch] and capability.[ch] → capability-util.[ch]
The files are named too generically, so that they might conflict with
the upstream project headers. Hence, let's add a "-util" suffix, to
clarify that this are just our utility headers and not any official
upstream headers. |
f4f15635ec05293ffcc83a5b39f624bbabbd8fd0 |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: move a number of fs operations into fs-util.[ch] |
a09561746f15b84da9471b5c4be74e53d19e4f3f |
|
27-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: introduce dirent-util.[ch] for directory entry calls
Also, move a couple of more path-related functions to path-util.c. |
d02608170e599b1ffbc7c9a22062bae2579d6e36 |
|
26-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util: remove lookup_uid(), replace by uid_to_name()
So far we had two pretty much identical calls in user-util.[ch]:
lookup_uid() and uid_to_name(). Get rid of the former, in favour of the
latter, and while we are at it, rewrite it, to use getpwuid_r()
correctly, inside an allocation loop, as POSIX intended. |
b1d4f8e154bf61b5de1b27461ef8e9c8c5e838a1 |
|
26-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out user/group/uid/gid calls into user-util.[ch] |
3ffd4af22052963e7a29431721ee204e634bea75 |
|
25-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util-lib: split out fd-related operations into fd-util.[ch]
There are more than enough to deserve their own .c file, hence move them
over. |
4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3 |
|
24-Oct-2015 |
Lennart Poettering <lennart@poettering.net> |
util: split out escaping code into escape.[ch]
This really deserves its own file, given how much code this is now. |
af4efb515bc7a8f6460fa86aafaa1d5a3d3eed61 |
|
14-Oct-2015 |
Tom Gundersen <teg@jklm.no> |
login: suspend - be a bit more explicit when logging
When the Suspend method is called, the only log message we write
(unless debugging is enabled) is "Operation finished.". This is
not very helpful when trying to figure out what is going on, so
add what operation we are talking about to the message:
"Operation 'sleep' finished.".
Hat tip to Daniel Aleksandersen for pointing this out. |
f868cb58c1274d51a4615a69dc2bf6ee7764cb04 |
|
30-Sep-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
logind: avoid a dot before parenthesis
systemd-logind[27]: System is rebooting. (Applied kernel updates.)
is changed to
systemd-logind[27]: System is rebooting (Applied kernel updates).
Users should not add a dot in the sentence in --message, i.e. the correct usage is now:
$ systemctl reboot --message "Applied kernel updates" |
1389f4b95877f29cb357baee837d9c05e64df0c6 |
|
09-Sep-2015 |
Daniel Mack <daniel@zonque.org> |
logind: allow dry run variants for scheduled shutdowns
Allow passing a "dry-" prefix to the action parameter passed to
.ScheduleShutdown(). When strings with this prefix are passed,
the scheduled action will not take place. Instead, an info message
is logged. |
a1e58e8ee1c84b633d6d6d651d5328d4dd4eba5b |
|
09-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
tree-wide: use coccinelle to patch a lot of code to use mfree()
This replaces this:
free(p);
p = NULL;
by this:
p = mfree(p);
Change generated using coccinelle. Semantic patch is added to the
sources. |
91b3e7fb6c0b24a8d258c710304d50a45f90568a |
|
05-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
logind: make scope of wall message handling smaller |
403ed0e5c914f2a0a683403d8ba7eaf96e3ffcdf |
|
05-Sep-2015 |
Michael Chapman <mike@very.puzzling.org> |
bus-util: support details in CheckAuthorization calls
Extra details for an action can be supplied when calling polkit's
CheckAuthorization method. Details are a list of key/value string pairs.
Custom policy can use these details when making authorization decisions. |
3d1c455f9a898e7427b642800644ae7142dc7557 |
|
05-Sep-2015 |
David Herrmann <dh.herrmann@gmail.com> |
login: fix NULL-deref on wall_message
We treat an empty wall-message equal to a NULL wall-message since:
commit 5744f59a3ee883ef3a78214bd5236157acdc35ba
Author: Lennart Poettering <lennart@poettering.net>
Date: Fri Sep 4 10:34:47 2015 +0200
logind: treat an empty wall message like a NULL one
Fix the shutdown scheduler to not deref a NULL pointer, but properly
check for an empty wall-message.
Fixes: #1120 |
2cf088b56d72cb6a3243041524f1fbae7c1cb28e |
|
04-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
logind: when parsing a boolean via sd-bus the type must be "int"
And not bool. |
5744f59a3ee883ef3a78214bd5236157acdc35ba |
|
04-Sep-2015 |
Lennart Poettering <lennart@poettering.net> |
logind: treat an empty wall message like a NULL one |
9ef15026c0e7e6600372056c43442c99ec53746e |
|
25-Aug-2015 |
Jan Synacek <jsynacek@redhat.com> |
logind/systemctl: introduce SetWallMessage and --message
Enable unprivileged users to set wall message on a shutdown
operation. When the message is set via the --message option,
it is logged together with the default shutdown message.
$ systemctl reboot --message "Applied kernel updates."
$ journalctl -b -1
...
systemd-logind[27]: System is rebooting. (Applied kernel updates.)
... |
491ac9f2c4aeda8c40edde35112404b737e38b60 |
|
06-Aug-2015 |
Lennart Poettering <lennart@poettering.net> |
logind,machined: various smaller cleanups
Use mfree() where we can.
Drop unnecessary {}.
Drop unnecessary variable declarations.
Cast syscall invocations where explicitly don't care for the return
value to (void).
Reword a comment. |
65d73cf042ba7de11d254f5c4714f467db64b7c3 |
|
06-Aug-2015 |
Lennart Poettering <lennart@poettering.net> |
machined,logind: don't generate errors on signal match functions
If we get a weird signal, then we should log about it, but not return an
error, since sd-bus will not call us again then anymore, but for these
signals we match here we actually do want to be called on the next
invocation. |
3cde9e8fa0ae2a424ae2e6e27e14668ca5d90c98 |
|
05-Aug-2015 |
Daniel Mack <daniel@zonque.org> |
logind: switch to sd_bus_track helper
Let logind use the sd_bus_track helper object to track the controllers of
sessions. This does not only remove quite some code but also kills the
unconditional matches for all NameOwnerChanged signals.
The latter is something we should never ever do, as it wakes up the daemon
every time a client connects, which doesn't scale. |
97b11eedff9d2e17101ad453caf9e48b73246719 |
|
31-Jul-2015 |
David Herrmann <dh.herrmann@gmail.com> |
tree-wide: introduce mfree()
Pretty trivial helper which wraps free() but returns NULL, so we can
simplify this:
free(foobar);
foobar = NULL;
to this:
foobar = mfree(foobar); |
dacd6cee76a08331b8c8616c5f30f70ee49aa2f9 |
|
29-Jul-2015 |
Lennart Poettering <lennart@poettering.net> |
tree-wide: port everything over to fflush_and_check()
Some places invoked fflush() directly with their own manual error
checking, let's unify all that by using fflush_and_check().
This also unifies the general error paths of fflush()+rename() file
writers. |
6f566391a428789d0bb54654642d4dc3d6948c68 |
|
21-Jul-2015 |
Daniel Mack <daniel@zonque.org> |
logind: fix write_string_file() fallout
WRITE_STRING_FILE_ATOMIC is only valid if WRITE_STRING_FILE_CREATE is also
given. IOW, an atomic file write operation is only possible when creating a
file is also being asked for.
This is a regression from the recent write_string_file() rework. |
559b5cc2734bdd968c1c56ad1dc6fff08b8b30ba |
|
11-Jul-2015 |
Lennart Poettering <lennart@poettering.net> |
logind: bring bus policy up-to-date
A while back we opened up all of logind's bus calls to unprivileged
users, via PK. However, the dbus1 policy wasn't updated accordingly.
With this change, the dbus1 policy is opened up for all bus calls that
should be available to unprivileged clients.
(also rearranges some calls in the vtable, to make more sense, and be in
line with the order in the bus policy file)
Fixes #471. |
cc85d56245a21e458dbc955fbf94fa9b3bfb9e33 |
|
10-Jul-2015 |
David Herrmann <dh.herrmann@gmail.com> |
logind: allow greeters to take over VTs
Make sure a greeter can forcefully spawn a session on a VT that is
in-use. A recent patch prevented this (this used to be possible for all
session types) as it is highly fragile. However, as it turns out,
greeters seem to rely on that feature. Therefore, make sure we allow it
explicitly for greeters. |
b80120c4cba7d134b5437a58437a23fdf7ab2084 |
|
07-Jul-2015 |
David Herrmann <dh.herrmann@gmail.com> |
logind: fail on CreateSession if already in session
Right now, if you're already in a session and call CreateSession, we
return information about the current session of yours. This is highy
confusing and a nasty hack. Avoid that, and instead return a commonly
known error, so the caller can detect that.
This has the side-effect, that we no longer override XDG_VTNR and XDG_SEAT
in pam_systemd, if you're already in a session. But this sounds like the
right thing to do, anyway. |
586cd08e1bbf8d6b1a960dc94f46235fde0d68c1 |
|
07-Jul-2015 |
David Herrmann <dh.herrmann@gmail.com> |
logind: allow sessions to share a VT if it's a greeter
Old gdm and lightdm start the user-session during login before they
destroy the greeter-session. Therefore, the user-session will take over
the VT from the greeter. We recently prevented this by never allowing
multiple sessions on the same VT. Fix this now, by explicitly allowing
this if the owning session is a GREETER.
Note that gdm no longer behaves like this. Instead, due to wayland, they
always use a different VT for each session. All other login-managers are
highly encouraged to destroy the greeter-session _before_ starting the
user-session. We now work around this, but this will probably not last
forever (and will already have nasty side-effects on the greeter-session). |
4c1fc3e404d648c70bd2f50ac50aeac6ece8872e |
|
07-Jul-2015 |
Daniel Mack <daniel@zonque.org> |
fileio: consolidate write_string_file*()
Merge write_string_file(), write_string_file_no_create() and
write_string_file_atomic() into write_string_file() and provide a flags mask
that allows combinations of atomic writing, newline appending and automatic
file creation. Change all users accordingly. |
de7de280b5eae7206c35e869e7d5bcd3d6a18c22 |
|
05-Jul-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
login: simplify assignment |
0204c4bd69f694b527643ace9d434befce80085c |
|
01-Jul-2015 |
David Herrmann <dh.herrmann@gmail.com> |
login: re-use VT-sessions if they already exist
Right now, if you start a session via 'su' or 'sudo' from within a
session, we make sure to re-use the existing session instead of creating a
new one. We detect this by reading the session of the requesting PID.
However, with gnome-terminal running as a busname-unit, and as such
running outside the session of the user, this will no longer work.
Therefore, this patch makes sure to return the existing session of a VT if
you start a new one.
This has the side-effect, that you will re-use a session which your PID is
not part of. This works fine, but will break assumptions if the parent
session dies (and as such close your session even though you think you're
part of it). However, this should be perfectly fine. If you run multiple
logins on the same session, you should really know what you're doing. The
current way of silently accepting it but choosing the last registered
session is just weird. |
418b22b88f79911fe5d76fabedd18ef1eb491680 |
|
25-Jun-2015 |
Daniel Mack <daniel@zonque.org> |
logind: fix delayed execution regression
Commit c0f32805 ("logind: use sd_event timer source for inhibitor
logic") reworked the main loop logic of logind so that it uses a
real timeout callback handler to execute delayed functions.
What the old code did, however, was to call those functions on
every iteration in the main loop, not only when the timeout
expired.
Restore that behavior by bringing back manager_dispatch_delayed(),
and call it from manager_run(). The internal event source callback
manager_inhibit_timeout_handler() was turned into a wrapper of
manager_dispatch_delayed() now. |
602a41c22ac2df33b4b5e5083719c1cfaf58acf9 |
|
17-Jun-2015 |
Lennart Poettering <lennart@poettering.net> |
logind: rework display counting when detecting whether the system is docked
Previously, we'd just count connected displays, and if there was 2 or
more we assumed a "docked" state.
With this change we now:
- Only count external displays, ignore internal ones (which we detect by
checking the connector name against a whitelist of known external plug
types)
- We ignore connectors which are explicitly disabled
- We then compare the count with >= 1 rather than >= 2 as before
This new logic has the benefit that systems that disconnect the internal
display when the lid is closed are better supported. Also, explicitly
disabled ports do not confuse the algorithm anymore.
This new algorithm has been suggested here:
http://lists.freedesktop.org/archives/intel-gfx/2015-June/068821.html
This also makes two functions static, that are not used outside of their
.c files. |
148560792af3275a2bd3765659296985577e564e |
|
16-Jun-2015 |
Lennart Poettering <lennart@poettering.net> |
logind: expose "Docked" bool as property on the bus
We know the state anyway, let's expose it in the bus. It's useful for
debugging at least, but it might be useful for DEs too. |
5cb14b3742038b28551b161635a0cba3559404b2 |
|
16-Jun-2015 |
Lennart Poettering <lennart@poettering.net> |
everywhere: actually make use of DUAL_TIMESTAMP_NULL macro
Let's use it as initializer where appropriate. |
41dfeaa194c18de49706b5cecf4e53accd12b7f6 |
|
02-Jun-2015 |
Philip Withnall <philip.withnall@collabora.co.uk> |
logind: Save the user’s state when a session enters SESSION_ACTIVE
When (for example) switching from X11 to a new VT and logging in there,
creating a new session, the user state file (/run/systemd/users/$uid) is
not updated after the session becomes active. The latest time it is
saved is when the session is in SESSION_OPENING.
This results in a /run/systemd/users/$uid file which contains
STATE=online for the current user on the current active VT, which is
obviously wrong.
As functions like sd_uid_get_state() use this file to get the user’s
state, this could result in things like PolicyKit making incorrect
decisions about the user’s state. (See
https://bugs.freedesktop.org/show_bug.cgi?id=76358.)
Fix this by re-saving the state for a session’s user after completing
the state_job for that session.
https://bugs.freedesktop.org/show_bug.cgi?id=90818 |
a790812cb349c5cef95d1b4a20fc80ca08d3a145 |
|
27-May-2015 |
Daniel Mack <daniel@zonque.org> |
logind: prefix some calls to unlink with (void)
Make Coverity happy and tell it we're not interested in the return
value of these two calls. |
fb91034cf5907bbbabba1e8821b01f3b37aa56d5 |
|
27-May-2015 |
Daniel Mack <daniel@zonque.org> |
logind: unlink /run/nologin when shutdown is cancelled
When a scheduled is cancelled, make sure to remove /run/nologin.
This is a regression from the recent shutdownd removal and logind rework. |
9030ca462bd13cd6536299814e4a71d5c5e85be9 |
|
29-Apr-2015 |
Lennart Poettering <lennart@poettering.net> |
sd-bus: allow passing NULL as bus parameter to sd_bus_send()
If NULL is specified for the bus it is now automatically derived from
the passed in message.
This commit also changes a number of invocations of sd_bus_send() to
make use of this. |
190700621f95160d364f8ec1d3e360246c41ce75 |
|
29-Apr-2015 |
Lennart Poettering <lennart@poettering.net> |
sd-bus: drop bus parameter from message callback prototype
This should simplify the prototype a bit. The bus parameter is redundant
in most cases, and in the few where it matters it can be derived from
the message via sd_bus_message_get_bus(). |
c2a23db0b91faca3795099fd4b41587bac170ff7 |
|
24-Apr-2015 |
Daniel Mack <daniel@zonque.org> |
logind: kill newline characters from log_error_errno() calls
log_error_errno() already adds a newline, so drop them. |
867c37f6bb20886204679df9a43c973e2d7e44a5 |
|
24-Apr-2015 |
Daniel Mack <daniel@zonque.org> |
logind: add support for /run/nologin and /run/systemd/shutdown/scheduled
Port over more code from shutdownd and teach logind to write /run/nologin at
least 5 minutes before the system is going down, and
/run/systemd/shutdown/scheduled when a shutdown is scheduled. |
e2fa5721c3ee5ea400b99a6463e8c1c257e20415 |
|
24-Apr-2015 |
Daniel Mack <daniel@zonque.org> |
logind: add code for UTMP wall messages
Add a timer to print UTMP wall messages so that it repeatedly informs users
about a scheduled shutdown:
* every 1 minute with less than 10 minutes to go
* every 15 minutes with less than 60 minutes to go
* every 30 minutes with less than 180 minutes (3 hours) to go
* every 60 minutes if more than that to go
This functionality only active if the .EnableWallMessages DBus property
is set to true. Also, a custom string can be added to the wall message,
set through the WallMessagePrefix property. |
8aaa023ae78f3cb28db3edd87f96b21486810b91 |
|
24-Apr-2015 |
Daniel Mack <daniel@zonque.org> |
logind: add .ScheduleShutdown and .CancelScheduledShutdown methods
Add a method called ScheduleShutdown in org.freedesktop.login1.Manager
which adds a timer to shut down the system at a later point in time.
The first argument holds the type of the schedule that is about to
happen, and must be one of 'reboot', 'halt' or 'poweroff'.
The second argument specifies the absolute time, based on
CLOCK_REALTIME in nanoseconds, at which the the operation should be
executed.
To cancel a previously scheduled shutdown, the CancelScheduledShutdown()
can be called, which returns a bool, indicating whether a scheduled
timeout was cancelled.
Also add a new property called ScheduledShutdown which returns the
equivalent to what was passed in via ScheduleShutdown, as '(st)' type. |
b7aa9589e0bf37cd2682dee4528bd32a794d1363 |
|
24-Apr-2015 |
Daniel Mack <daniel@zonque.org> |
logind: factor out polkit checks
Factor out the code to ask polkit for authorization from
method_do_shutdown_or_sleep() into an own function called
verify_shutdown_creds().
This is needed in order to also use the same checks when shutdown
operations are scheduled. For that, it's also necessary to allow
NULL values for that action{,_multiple_sessions,_ignore_inhibit)
arguments, which will suppress the call if no action string is
passed. |
c0f32805086ff65d2905b0e3a9166d9ed6c2bc41 |
|
24-Apr-2015 |
Daniel Mack <daniel@zonque.org> |
logind: use sd_event timer source for inhibitor logic
Instead of open-coding the delayed action and inhibit timeout logic,
switch over to a real sd_event_source based implementation.
This is not only easier to read but also allows us to add more timers
in the future. |
3f61a7a6eb5ff7e5a14cd322897741969df6b723 |
|
24-Apr-2015 |
Daniel Mack <daniel@zonque.org> |
logind: drop unused argument from method_do_shutdown_or_sleep() |
288a74cce597f81d3ba01d8a5ca7d2ba5b654b7e |
|
11-Apr-2015 |
Ronny Chevalier <chevalier.ronny@gmail.com> |
shared: add terminal-util.[ch] |
0b452006de98294d1690f045f6ea2f7f6630ec3b |
|
10-Apr-2015 |
Ronny Chevalier <chevalier.ronny@gmail.com> |
shared: add process-util.[ch] |
6482f6269c87d2249e52e889a63adbdd50f2d691 |
|
10-Apr-2015 |
Ronny Chevalier <chevalier.ronny@gmail.com> |
shared: add formats-util.h |
889f25b2ccea77770e62220ecf65a6799794bfa2 |
|
07-Apr-2015 |
Lennart Poettering <lennart@poettering.net> |
logind: drop "interactive" parameter from SetRebootToFirmwareSetup() bus call
Newer dbus versions have an "allow interactive authentication" bit in
the message header, hence it is not necessary to take a boolean for this
explicitly. |
5bdf22430e367799dfa66c724144b624c5479518 |
|
07-Apr-2015 |
Jan Janssen <medhefgo@web.de> |
logind,systemctl: add reboot to EFI firmware support |
ceb242292630b4633aa707b565585a1e8bcbfeb8 |
|
07-Apr-2015 |
Lennart Poettering <lennart@poettering.net> |
polkit: rename bus_verify_polkit() to bus_test_polkit() and make it strictly non-interactive
Interactive authorization should only happen asynchronously, hence
disallow it in synchronous bus_verify_polkit(), and rename it to
bus_test_polkit(). This way even if the bus message header asks for
interactive authorization, we'll ask for non-interactive authorization
which is actually the desired behaviour if CanSuspend, CanHibernate and
friends, which call this function. |
ad8780c96999c99f5aefb00193f2e3d68b1db217 |
|
15-Mar-2015 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
logind: check return value of session_release
It allocates memory, so it can fail.
CID #1237527. |
9d10cbee89ca7f82d29b9cb27bef11e23e3803ba |
|
06-Mar-2015 |
David Herrmann <dh.herrmann@gmail.com> |
login: make hold-off timeout configurable
This introduces 'HoldoffTimeoutSec' to logind.conf to make
IGNORE_LID_SWITCH_{SUSPEND,STARTUP}_USEC configurable.
Background: If an external monitor is connected, or if the system is
docked, we want to ignore LID events. This is required to support setups
where a laptop is used with external peripherals while the LID is closed.
However, this requires us to probe all hot-plugged devices before reacting
to LID events. But with modern buses like USB, the standards do not impose
any timeout on the slots, so we have no chance to know whether a given
slot is used or not. Hence, after resume and startup, we have to wait a
fixed timeout to give the kernel a chance to probe devices. Our timeout
has always been generous enough to support even the slowest devices.
However, a lot of people didn't use these features and wanted to disable
the hold-off timer. Now we provide a knob to do that. |
2eec67acbb00593e414549a7e5b35eb7dd776b1b |
|
23-Feb-2015 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
remove unused includes
This patch removes includes that are not used. The removals were found with
include-what-you-use which checks if any of the symbols from a header is
in use. |
c529695e7a30b300fdaa61ace4a8a4ed0e94ad1c |
|
18-Feb-2015 |
Lennart Poettering <lennart@poettering.net> |
logind: open up most bus calls for unpriviliged processes, using PolicyKit
Also, allow clients to alter their own objects without any further
priviliges. i.e. this allows clients to kill and lock their own sessions
without involving PK. |
63c372cb9df3bee01e3bf8cd7f96f336bddda846 |
|
03-Feb-2015 |
Lennart Poettering <lennart@poettering.net> |
util: rework strappenda(), and rename it strjoina()
After all it is now much more like strjoin() than strappend(). At the
same time, add support for NULL sentinels, even if they are normally not
necessary. |
fed6df828d86c053a96d5b50af75c53eb8dd4666 |
|
02-Feb-2015 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
remove unused variables |
05bae4a60c32e29797597979cee2f3684eb3bc1e |
|
18-Jan-2015 |
David Herrmann <dh.herrmann@gmail.com> |
bus: use EUID over UID and fix unix-creds
Whenever a process performs an action on an object, the kernel uses the
EUID of the process to do permission checks and to apply on any newly
created objects. The UID of a process is only used if someone *ELSE* acts
on the process. That is, the UID of a process defines who owns the
process, the EUID defines what privileges are used by this process when
performing an action.
Process limits, on the other hand, are always applied to the real UID, not
the effective UID. This is, because a process has a user object linked,
which always corresponds to its UID. A process never has a user object
linked for its EUID. Thus, accounting (and limits) is always done on the
real UID.
This commit fixes all sd-bus users to use the EUID when performing
privilege checks and alike. Furthermore, it fixes unix-creds to be parsed
as EUID, not UID (as the kernel always takes the EUID on UDS). Anyone
using UID (eg., to do user-accounting) has to fall back to the EUID as UDS
does not transmit the UID. |
8cb4ab0058e51f1fba93683d145ef95f97c2fa86 |
|
09-Jan-2015 |
Lennart Poettering <lennart@poettering.net> |
logind: unify how we cast between uid_t and pointers for hashmap keys |
309a29dfd24f4175de334ca1593e3fe2436ab082 |
|
09-Jan-2015 |
Lennart Poettering <lennart@poettering.net> |
logind: when a bus call is done on a session, user or seat, optionally determine them from the caller credentials
More specifically, if an operation is requested on a session with an
empty name, the caller's session is used. If an operation is requested
on a seat with an empty name, the seat of the caller's session is used.
Finally, if an operation on the user with UID -1 is requested, the user
of the client's session is used (and not the UID of the client!). |
e5f5b5b9c92d59ef3cb5169982cb6f436c9206fa |
|
29-Dec-2014 |
Lennart Poettering <lennart@poettering.net> |
machined: ignore spurious error |
d7b8eec7dc7fe307d3a08b32cf1a9ad4276ce6d5 |
|
28-Dec-2014 |
Lennart Poettering <lennart@poettering.net> |
tmpfiles: add new line type 'v' for creating btrfs subvolumes |
d920e59c7df63300e5b5191d2a4be7b3baac6ea8 |
|
25-Dec-2014 |
Filipe Brandenburger <filbranden@google.com> |
logind: remove spurious include of <sys/capability.h>
They do not use any functions from libcap directly. The CAP_* constants in use
through these files come from "missing.h" which will import <linux/capability.h>
and complement it with CAP_* constants not defined by the current kernel
headers. The "missing.h" header is imported through "util.h" which gets
imported in "logind.h".
Tested that "systemd-logind" builds cleanly and works after this change. |
f7340ab269828d917cd1281e33e6dd4fdfee67b3 |
|
11-Dec-2014 |
Torstein Husebø <torstein@huseboe.net> |
treewide: correct spacing near eol in code comments |
96aad8d15a324d0e956a4e5653a11a67b209b41a |
|
10-Dec-2014 |
Lennart Poettering <lennart@poettering.net> |
sd-bus: move common errors src/shared/bus-errors.h → src/libsystemd/sd-bus/bus-common-errors.h
Stuff in src/shared/ should not use stuff from src/libsystemd/ really. |
56f64d95763a799ba4475daf44d8e9f72a1bd474 |
|
28-Nov-2014 |
Michal Schmidt <mschmidt@redhat.com> |
treewide: use log_*_errno whenever %m is in the format string
If the format string contains %m, clearly errno must have a meaningful
value, so we might as well use log_*_errno to have ERRNO= logged.
Using:
find . -name '*.[ch]' | xargs sed -r -i -e \
's/log_(debug|info|notice|warning|error|emergency)\((".*%m.*")/log_\1_errno(errno, \2/'
Plus some whitespace, linewrap, and indent adjustments. |
e2cc6eca73cd1df8be552d7c23f9ff3d69c06f1e |
|
28-Nov-2014 |
Lennart Poettering <lennart@poettering.net> |
log: fix order of log_unit_struct() to match other logging calls
Also, while we are at it, introduce some syntactic sugar for creating
ERRNO= and MESSAGE= structured logging fields. |
cc56fafeebf814ef035e549115cf1850e6473fa5 |
|
23-Oct-2014 |
WaLyong Cho <walyong.cho@samsung.com> |
mac: rename apis with mac_{selinux/smack}_ prefix |
3c56cab44150ad47323970cfadfb0257c6305a74 |
|
26-Aug-2014 |
Ben Wolsieffer <benwolsieffer@gmail.com> |
logind: add HandleLidSwitchDocked= option to logind.conf + documentation
https://bugs.freedesktop.org/show_bug.cgi?id=82485 |
f38857914ab5c9cc55aac05795e1886963a5fd04 |
|
18-Aug-2014 |
Lennart Poettering <lennart@poettering.net> |
bus-util: simplify bus_verify_polkit_async() a bit
First, let's drop the "bus" argument, we can determine it from the
message anyway.
Secondly, determine the right callback/userdata pair automatically from
what is currently is being dispatched. This should simplify things a lot
for us, since it makes it unnecessary to pass pointers through the
original handlers through all functions when we process messages, which
might require authentication. |
def9a7aa0182e5ecca3ac61b26f75136a5c4f103 |
|
15-Aug-2014 |
Lennart Poettering <lennart@poettering.net> |
sd-bus: add API to check if a client has privileges
This is a generalization of the vtable privilege check we already have,
but exported, and hence useful when preparing for a polkit change.
This will deal with the complexity that on dbus1 one cannot trust the
capability field we retrieve via the bus, since it is read via
/proc/$$/stat (and thus might be out-of-date) rather than directly from
the message (like on kdbus) or bus connection (as for uid creds on
dbus1).
Also, port over all code to this new API. |
de0671ee7fe465e108f62dcbbbe9366f81dd9e9a |
|
15-May-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Remove unnecessary casts in printfs
No functional change expected :) |
6a0f1f6d5af7c7300d3db7a0ba2b068f8abd222b |
|
24-Mar-2014 |
Lennart Poettering <lennart@poettering.net> |
sd-event: rework API to support CLOCK_REALTIME_ALARM and CLOCK_BOOTTIME_ALARM, too |
b5d3e1688133077ca20542a20dcd8919147e72e1 |
|
11-Mar-2014 |
Kay Sievers <kay@vrfy.org> |
logind: move lid switch handling from logind-main to logind-core
../src/login/logind-dbus.c:1352: error: undefined reference to 'manager_set_lid_switch_ignore'
collect2: error: ld returned 1 exit status
make[2]: *** [test-login-tables] |
236af516b866473c22f980b556a2d7535cef4d9b |
|
11-Mar-2014 |
Djalal Harouni <tixxdz@opendz.org> |
logind: add a debug message in case the session already exists
If the session already exists then the only way to log it is to set the
debug option of pam_systemd. There are no debug messages in the login
service that permits to log if the session already exists.
So just add it, and while we are it add the "uid" field to the debug
message that indicates that the session was created. |
055d406624cb9e01963558767420b71e5f75d2d3 |
|
10-Mar-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
logind: fix policykit checks |
f9cd6be10ece07e10488c05e270a0b5860779864 |
|
03-Mar-2014 |
Lennart Poettering <lennart@poettering.net> |
logind: ignore lid switch events for 30s after each suspend and 3min after startup
This is needed to give USB docking stations and suchlike time to settle,
so that a display connected to an USB docking station can actually act
as a lid swith inhibitor correctly.
With this change we should have somewhat reliable docking station
support in place. |
151b9b9662a90455262ce575a8a8ae74bf4ff336 |
|
20-Feb-2014 |
Lennart Poettering <lennart@poettering.net> |
api: in constructor function calls, always put the returned object pointer first (or second)
Previously the returned object of constructor functions where sometimes
returned as last, sometimes as first and sometimes as second parameter.
Let's clean this up a bit. Here are the new rules:
1. The object the new object is derived from is put first, if there is any
2. The object we are creating will be returned in the next arguments
3. This is followed by any additional arguments
Rationale:
For functions that operate on an object we always put that object first.
Constructors should probably not be too different in this regard. Also,
if the additional parameters might want to use varargs which suggests to
put them last.
Note that this new scheme only applies to constructor functions, not to
all other functions. We do give a lot of freedom for those.
Note that this commit only changes the order of the new functions we
added, for old ones we accept the wrong order and leave it like that. |
a87105a38637355bd6d648036f0369a1a9546ae9 |
|
12-Feb-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
logind: ignore PropertiesChanged signals for jobs
Otherwise we get a (harmless) message like:
systemd-logind[30845]: Failed to process message [type=signal sender=:1.36 path=/org/freedesktop/systemd1/job/4674 interface=org.freedesktop.DBus.Properties member=PropertiesChanged signature=sa{sv}as]: Invalid argument |
9bb69af4f2823fdd30902f5ffd959e9b041feb53 |
|
12-Feb-2014 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
logind: always kill session when termination is requested
KillUserProcesses=yes/no should be ignored when termination is
explicitly requested. |
ecd2f2c5947d9e2f4d6792c2a3a90b8ced6a5b3e |
|
07-Feb-2014 |
Thomas Hindoe Paaboel Andersen <phomes@gmail.com> |
remove unused variables |
4e2f8d27781731021aa6b96c0ee18a8966eefe1c |
|
07-Feb-2014 |
Lennart Poettering <lennart@poettering.net> |
core: when an already abandoned unit gets abandoned again generate a clean error |
ba4c5d93b73ef7bba0ae0c6bf2b36a42360f7a34 |
|
07-Feb-2014 |
Lennart Poettering <lennart@poettering.net> |
logind: order all scopes after both systemd-logind.service and
systemd-user-sessions.service
This way at shutdown we can be sure that the sessions go away before the
network. |
99e7e3922e1d25d0092bd61444c86dcc9a1e030e |
|
07-Feb-2014 |
Djalal Harouni <tixxdz@opendz.org> |
logind: add function session_jobs_reply() to unify the create reply
The session_send_create_reply() function which notifies clients about
session creation is used for both session and user units. Unify the
shared code in a new function session_jobs_reply().
The session_save() will be called unconditionally on sessions since it
does not make sense to only call it if '!session->started', this will
also allow to update the session state as soon as possible. |
a50df72b37ce2a7caf7775c70d18c3f9504b9e80 |
|
07-Feb-2014 |
Lennart Poettering <lennart@poettering.net> |
logind: given that we can now relatively safely shutdown sessions copes
without working cgroup empty notifications there's no need to set the
stop timeout of sessions scopes low |
5f41d1f10fd97e93517b6a762b1bec247f4d1171 |
|
07-Feb-2014 |
Lennart Poettering <lennart@poettering.net> |
logind: rework session shutdown logic
Simplify the shutdown logic a bit:
- Keep the session FIFO around in the PAM module, even after the session
shutdown hook has been finished. This allows logind to track precisely
when the PAM handler goes away.
- In the ReleaseSession() call start a timer, that will stop terminate
the session when elapsed.
- Never fiddle with the KillMode of scopes to configure whether user
processes should be killed or not. Instead, simply leave the scope
units around when we terminate a session whose processes should not be
killed.
- When killing is enabled, stop the session scope on FIFO EOF or after
the ReleaseSession() timeout. When killing is disabled, simply tell
PID 1 to abandon the scope.
Because the scopes stay around and hence all processes are always member
of a scope, the system shutdown logic should be more robust, as the
scopes can be shutdown as part of the usual shutdown logic. |
a4cd87e9dce6d38846f23d44df9e21f322f946df |
|
05-Feb-2014 |
Lennart Poettering <lennart@poettering.net> |
man: introduce new "Desktop" property for sessions
This is initialized from XDG_SESSION_DESKTOP and is useful for GNOME
to recognize its own sessions. It's supposed to be set to a short string
identifying the session, such as "kde" or "gnome". |
dd9b67aa3e9476b3a4b3e231006eea6d108c841f |
|
08-Jan-2014 |
Lennart Poettering <lennart@poettering.net> |
logind: wait for the user service to finish startup before completing login attempt |
d14ab08b29d5b0b3ead6e63ac8be472f273011f9 |
|
28-Dec-2013 |
Lennart Poettering <lennart@poettering.net> |
bus: fix a couple of format string mistakes |
556089dc57b10a12a03edd3d3e90ca17398ad206 |
|
22-Dec-2013 |
Lennart Poettering <lennart@poettering.net> |
bus: decorate the various object vtables with SD_BUS_VTABLE_PROPERTY_CONST where appropriate |
06acf2d46a38bec212d78094e6ef8b100679048a |
|
18-Dec-2013 |
Lennart Poettering <lennart@poettering.net> |
core,logind: libudev usage modernizations
Always use cleanup logic and don't eat up errors returned by libudev |
adacb9575a09981fcf11279f2f661e3fc21e58ff |
|
10-Dec-2013 |
Lennart Poettering <lennart@poettering.net> |
bus: introduce "trusted" bus concept and encode access control in object vtables
Introduces a new concept of "trusted" vs. "untrusted" busses. For the
latter libsystemd-bus will automatically do per-method access control,
for the former all access is automatically granted. Per-method access
control is encoded in the vtables: by default all methods are only
accessible to privileged clients. If the SD_BUS_VTABLE_UNPRIVILEGED flag
is set for a method it is accessible to unprivileged clients too. By
default whether a client is privileged is determined via checking for
its CAP_SYS_ADMIN capability, but this can be altered via the
SD_BUS_VTABLE_CAPABILITY() macro that can be ORed into the flags field
of the method.
Writable properties are also subject to SD_BUS_VTABLE_UNPRIVILEGED and
SD_BUS_VTABLE_CAPABILITY() for controlling write access to them. Note
however that read access is unrestricted, as PropertiesChanged messages
might send out the values anyway as an unrestricted broadcast.
By default the system bus is set to "untrusted" and the user bus is
"trusted" since per-method access control on the latter is unnecessary.
On dbus1 busses we check the UID of the caller rather than the
configured capability since the capability cannot be determined without
race. On kdbus the capability is checked if possible from the attached
meta-data of a message and otherwise queried from the sending peer.
This also decorates the vtables of the various daemons we ship with
these flags. |
5b12334d35eadf1f45cc3d631fd1a2e72ffaea0a |
|
28-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
bus: add new sd_bus_creds object to encapsulate process credentials
This way we can unify handling of credentials that are attached to
messages, or can be queried for bus name owners or connection peers.
This also adds the ability to extend incomplete credential information
with data from /proc,
Also, provide a convenience call that will automatically determine the
most appropriate credential object for an incoming message, by using the
the attached information if possible, the sending name information if
available and otherwise the peer's credentials. |
486cd82c8f7642016895b72bcc09a1bfe885a783 |
|
28-Nov-2013 |
David Herrmann <dh.herrmann@gmail.com> |
logind: remove unused session->closing field
This field is always false, drop it. If you want a reliable way to get
session state, call session_get_state(). Testing for any flags directly
doesn't work currently so don't pretend it would. |
c506027af881a9e4210845a7a8a6ec5910aa0f3b |
|
28-Nov-2013 |
David Herrmann <dh.herrmann@gmail.com> |
logind: require VTs on seat0 and forbid elsewhere
Sessions on seat0 must pass us a vtnr, otherwise, you shouldn't try
attaching it to seat0. For seats without VTs, we do the exact opposite: we
forbid VTs.
There can be odd situations if the session-files contain invalid
combinations. However, we try to keep sessions alive and restore state as
good as possible. |
92bd5ff3a062c3f9475b9d9d39b9335bfeb7705e |
|
28-Nov-2013 |
David Herrmann <dh.herrmann@gmail.com> |
logind: make VT numbers unsigned
Fix the whole code to use "unsigned int" for vtnr. 0 is an invalid vtnr so
we don't need negative numbers at all.
Note that most code already assumes it's unsigned so in case there's a
negative vtnr, our code may, under special circumstances, silently break.
So this patch makes sure all sources of vtnrs verify the validity. Also
note that the dbus api already uses unsigned ints. |
85a428c69465b047731b6abb5005f01824f1444e |
|
27-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
logind: log which process is delaying suspend and not closing locks |
baae0358f349870544884e405e82e4be7d8add9f |
|
26-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
pam_systemd: do not set XDG_RUNTIME_DIR if the session's original user is not the same as the newly logged in one
It's better not to set any XDG_RUNTIME_DIR at all rather than one of a
different user. So let's do this.
This changes the bus call parameters of CreateSession(), but that is
explicitly an internal API hence should be fine. Note however, that a
logind restart (the way the RPM postinst scriptlets do it) is necessary
to make things work again. |
86b8d289717bad2800342efca0a5023aa8374e9c |
|
21-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
logind,machined,run: properly invoke StartTransientUnit() bus call |
ebcf1f97de4f6b1580ae55eb56b1a3939fe6b602 |
|
21-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
bus: rework message handlers to always take an error argument
Message handler callbacks can be simplified drastically if the
dispatcher automatically replies to method calls if errors are returned.
Thus: add an sd_bus_error argument to all message handlers. When we
dispatch a message handler and it returns negative or a set sd_bus_error
we send this as message error back to the client. This means errors
returned by handlers by default are given back to clients instead of
rippling all the way up to the event loop, which is desirable to make
things robust.
As a side-effect we can now easily turn the SELinux checks into normal
function calls, since the method call dispatcher will generate the right
error replies automatically now.
Also, make sure we always pass the error structure to all property and
method handlers as last argument to follow the usual style of passing
variables for return values as last argument. |
df2d202e6ed4001a21c6512c244acad5d4706c87 |
|
21-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
bus: let's simplify things by getting rid of unnecessary bus parameters |
718db96199eb307751264e4163555662c9a389fa |
|
20-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
core: convert PID 1 to libsystemd-bus
This patch converts PID 1 to libsystemd-bus and thus drops the
dependency on libdbus. The only remaining code using libdbus is a test
case that validates our bus marshalling against libdbus' marshalling,
and this dependency can be turned off.
This patch also adds a couple of things to libsystem-bus, that are
necessary to make the port work:
- Synthesizing of "Disconnected" messages when bus connections are
severed.
- Support for attaching multiple vtables for the same interface on the
same path.
This patch also fixes the SetDefaultTarget() and GetDefaultTarget() bus
calls which used an inappropriate signature.
As a side effect we will now generate PropertiesChanged messages which
carry property contents, rather than just invalidation information. |
c49b30a23583ff39daaa26696bcab478d2fee0bb |
|
12-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
bus: rename sd_bus_send_with_reply_and_block() to sd_bus_call()
The call is one of the most important ones we expose, where we place
major emphasis on. We should make sure to give it a short, memorable
name. |
4e724d9c5ab76c3f8327945317463ef706011082 |
|
05-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
logind: automatically determine client side PID if GetSessionByPID() is called with a PID == 0 |
dd9f052591e482c57c57a92e2c7cc4b0470fe275 |
|
05-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
logind: fix serialization for PrepareForSleep boolean |
dbfa3fbbe423bfaa6b5e864cce51724f8ddfb64f |
|
05-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
logind: fix serialization of ListInhibitors() request |
b8358bce140f0e99d9603a7f09a96f24d3b47f74 |
|
05-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
logind: fix serialization of ListSeats() bus call |
cc3773810855956bad92337cee8fa193584ab62e |
|
05-Nov-2013 |
Lennart Poettering <lennart@poettering.net> |
logind: port logind to libsystemd-bus |
872c8faaf2009422a91d227ae0b5c6f04c9d2c69 |
|
13-Oct-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Fix write-only use of a few variables
Since the invention of read-only memory, write-only memory has been
considered deprecated. Where appropriate, either make use of the
value, or avoid writing it, to make it clear that it is not used. |
c68ba912c347a79885bb0e863034bdb3a8ae057e |
|
26-Sep-2013 |
Lennart Poettering <lennart@poettering.net> |
logind: never consider a closing session relevant for PK checks
https://bugzilla.redhat.com/show_bug.cgi?id=1010215 |
6c605695506cc55fd77241308540c5e1a15d807c |
|
20-Sep-2013 |
Mantas MikulÄ—nas <grawity@gmail.com> |
logind: put correct user object paths in introspection data
Sync with user_bus_path() in logind-user-dbus.c |
1dc2ced4646a78b3dee9e3ea44130f938d6425bc |
|
18-Sep-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Remove six unused variables and add annotation
clang FTW! |
bf7825ae69f53a7e80a740547919833e49ed1df4 |
|
17-Sep-2013 |
David Herrmann <dh.herrmann@gmail.com> |
logind: extract has_vts() from can_multi_session()
We currently use seat_can_multi_session() to test for two things:
* whether the seat can handle session-switching
* whether the seat has VTs
As both are currently logically equivalent, we didn't care. However, we
want to allow session-switching on seats without VTs, so split this helper
into:
* seat_can_multi_session(): whether session-switching is supported
* seat_has_vts(): whether the seat has VTs
Note that only one seat on a system can have VTs. There is only one set of
them. We automatically assign them to seat0 as usual.
With this patch in place, we can easily add new session-switching/tracking
methods without breaking any VT code as it is now protected by has_vts(),
no longer by can_multi_session(). |
92432fcc7f3a0320c07e99c5d395568a3aa216b6 |
|
17-Sep-2013 |
David Herrmann <dh.herrmann@gmail.com> |
logind: rename vtconsole to seat0
The seat->vtconsole member always points to the default seat seat0. Even
if VTs are disabled, it's used as default seat. Therefore, rename it to
seat0 to correctly state what it is.
This also changes the seat files in /run from IS_VTCONSOLE to IS_SEAT0. It
wasn't used by any code, yet, so this seems fine.
While we are at it, we also remove every "if (s->vtconsole)" as this
pointer is always valid! |
ae5e06bda24ebbb2ac00741738ad3a872fc577a5 |
|
17-Sep-2013 |
David Herrmann <dh.herrmann@gmail.com> |
logind: add session controllers
A session usually has only a single compositor or other application that
controls graphics and input devices on it. To avoid multiple applications
from hijacking each other's devices or even using the devices in parallel,
we add session controllers.
A session controller is an application that manages a session. Specific
API calls may be limited to controllers to avoid others from getting
unprivileged access to restricted resources. A session becomes a
controller by calling the RequestControl() dbus API call. It can drop it
via ReleaseControl().
logind tracks bus-names to release the controller once an application
closes the bus. We use the new bus-name tracking to do that. Note that
during ReleaseControl() we need to check whether some other session also
tracks the name before we remove it from the bus-name tracking list.
Currently, we only allow one controller at a time. However, the public API
does not enforce this restriction. So if it makes sense, we can allow
multiple controllers in parallel later. Or we can add a "scope" parameter,
which allows a different controller for graphics-devices, sound-devices
and whatever you want.
Note that currently you get -EBUSY if there is already a controller. You
can force the RequestControl() call (root-only) to drop the current
controller and recover the session during an emergency. To recover a seat,
this is not needed, though. You can simply create a new session or
force-activate it.
To become a session controller, a dbus caller must either be root or the
same user as the user of the session. This allows us to run a session
compositor as user and we no longer need any CAP_SYS_ADMIN. |
e8b212fe56f7f4e1778474777a7a2959244d0047 |
|
17-Sep-2013 |
David Herrmann <dh.herrmann@gmail.com> |
logind: add infrastructure to watch busnames
If we want to track bus-names to allow exclusive resource-access, we need
a way to get notified when a bus-name is gone. We make logind watch for
NameOwnerChanged dbus events and check whether the name is currently
watched. If it is, we remove it from the watch-list (notification for
other objects can be added in follow-up patches). |
4b549144d82ea0f368321d149215f577049fffa6 |
|
16-Sep-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
Verify validity of session name when received from outside
Only ASCII letters and digits are allowed. |
405e0255d5e6950180d9563f1a26294b5360db03 |
|
13-Aug-2013 |
Lennart Poettering <lennart@poettering.net> |
logind: restore logic to kill user processes when session ends |
743e89454093361653b85ff394d0434c0714a92d |
|
30-Jul-2013 |
Lennart Poettering <lennart@poettering.net> |
logind: make sure login sessions are terminated with SIGHUP
bash ignores SIGTERM, and can only be terminated cleanly via SIGHUP.
Hence make sure that we the scope unit for the session is created with
SendSIGHUP enabled. |
76e665855edef5b7103cb09d114377d477bfae02 |
|
26-Jul-2013 |
Lennart Poettering <lennart@poettering.net> |
logind: update the session state file before we send out the CreateSession() reply
https://bugs.freedesktop.org/show_bug.cgi?id=67273 |
cba38758b4d49c6fe7c2f0eea255e11ee9df23eb |
|
26-Jul-2013 |
Lennart Poettering <lennart@poettering.net> |
logind: update state file after generating the session fifo, not before
https://bugs.freedesktop.org/show_bug.cgi?id=67273 |
7fb3ee51c1b37738fd0ea2c81dfd6c336144698a |
|
10-Jul-2013 |
Lennart Poettering <lennart@poettering.net> |
user-sessions: rely on PID 1 to kill sessions
As we want to centralized cgroup access we should stop killing the user
sessions directly from the systemd-user-sessions service. Instead, rely
on PID 1 doing this by adding the right ordering dependencies to the
session scope units. |
6797c324a653f119a3d7133122648aaa4878ddd6 |
|
10-Jul-2013 |
Lennart Poettering <lennart@poettering.net> |
logind: don't misunderstand UnitRemoved signals during reloading
When PID 1 reloads the units logind/machined will see UnitRemoved
signals for all units. Instead of trusting these immediately, let's
check the actual unit state before considering a unit gone, so that
reloading PID 1 is not mistaken as the end of all sessions. |
6fa4853328e3d78d092172fa54effb7e785d0a85 |
|
10-Jul-2013 |
Lennart Poettering <lennart@poettering.net> |
core: serialize/deserialize bus subscribers |
943aca8efb39453e3994ccdd1e08534b788c5aee |
|
03-Jul-2013 |
Lennart Poettering <lennart@poettering.net> |
logind/machined: properly notice when units are gc'ed |
8b6fe8243d6a46d7435fb6789481489c44549cfb |
|
02-Jul-2013 |
Lennart Poettering <lennart@poettering.net> |
login: pass correct boolean type to libdbus |
8aec412ff697bc14995746953912ca6fdf2c9ba8 |
|
02-Jul-2013 |
Lennart Poettering <lennart@poettering.net> |
machined: sync to /run after job completed |
1ee306e1248866617c96ed9f4263f375588ad838 |
|
02-Jul-2013 |
Lennart Poettering <lennart@poettering.net> |
machined: split out machine registration stuff from logind
Embedded folks don't need the machine registration stuff, hence it's
nice to make this optional. Also, I'd expect that machinectl will grow
additional commands quickly, for example to join existing containers and
suchlike, hence it's better keeping that separate from loginctl. |
fb6becb4436ae4078337011b2017ce294e7361cf |
|
02-Jul-2013 |
Lennart Poettering <lennart@poettering.net> |
logind: port over to use scopes+slices for all cgroup stuff
In order to prepare things for the single-writer cgroup scheme, let's
make logind use systemd's own primitives for cgroup management.
Every login user now gets his own private slice unit, in which his sessions
live in a scope unit each. Also, add user@$UID.service to the same
slice, and implicitly start it on first login. |
9444b1f20e311f073864d81e913bd4f32fe95cfd |
|
20-Jun-2013 |
Lennart Poettering <lennart@poettering.net> |
logind: add infrastructure to keep track of machines, and move to slices
- This changes all logind cgroup objects to use slice objects rather
than fixed croup locations.
- logind can now collect minimal information about running
VMs/containers. As fixed cgroup locations can no longer be used we
need an entity that keeps track of machine cgroups in whatever slice
they might be located. Since logind already keeps track of users,
sessions and seats this is a trivial addition.
- nspawn will now register with logind and pass various bits of metadata
along. A new option "--slice=" has been added to place the container
in a specific slice.
- loginctl gained commands to list, introspect and terminate machines.
- user.slice and machine.slice will now be pulled in by logind.service,
since only logind.service requires this slice. |
19adb8a3204fefd91411b5f0f350c8bc6bcf75fe |
|
06-May-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
systemd-sleep: add support for freeze and standby
A new config file /etc/systemd/sleep.conf is added.
It is parsed by systemd-sleep and logind. The strings written
to /sys/power/disk and /sys/power/state can be configured.
This allows people to use different modes of suspend on
systems with broken or special hardware.
Configuration is shared between systemd-sleep and logind
to enable logind to answer the question "can the system be
put to sleep" as correctly as possible without actually
invoking the action. If the user configured systemd-sleep
to only use 'freeze', but current kernel does not support it,
logind will properly report that the system cannot be put
to sleep.
https://bugs.freedesktop.org/show_bug.cgi?id=57793
https://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=7e73c5ae6e7991a6c01f6d096ff8afaef4458c36
http://lists.freedesktop.org/archives/systemd-devel/2013-February/009238.html
SYSTEM_CONFIG_FILE and USER_CONFIG_FILE defines were removed
since they were used in only a few places and with the
addition of /etc/systemd/sleep.conf it becomes easier to just
append the name of each file to the dir name. |
842865365e598a090045894f8990fd384e801ccb |
|
25-Apr-2013 |
Lennart Poettering <lennart@poettering.net> |
logind: don't busy loop if a job is still running but the delay timeout expires |
7f6437976d31fa772ccef9abedd152d6f5372303 |
|
19-Apr-2013 |
Lukas Nykryn <lnykryn@redhat.com> |
logind-dbus: initialize result variable |
7fd1b19bc9e9f5574f2877936b8ac267c7706947 |
|
18-Apr-2013 |
Harald Hoyer <harald@redhat.com> |
move _cleanup_ attribute in front of the type
http://lists.freedesktop.org/archives/systemd-devel/2013-April/010510.html |
449101fce2757575c4813a9512890536365445f6 |
|
18-Apr-2013 |
Simon Peeters <peeters.simon@gmail.com> |
Move bus_error to dbus-common and remove bus_error_message_or_strerror
bus_error and bus_error_message_or_strerror dit almost exactly the same,
so use only one of them and place it in dbus-common. |
7027ff61a34a12487712b382a061c654acc3a679 |
|
16-Apr-2013 |
Lennart Poettering <lennart@poettering.net> |
nspawn: introduce the new /machine/ tree in the cgroup tree and move containers there
Containers will now carry a label (normally derived from the root
directory name, but configurable by the user), and the container's root
cgroup is /machine/<label>. This label is called "machine name", and can
cover both containers and VMs (as soon as libvirt also makes use of
/machine/).
libsystemd-login can be used to query the machine name from a process.
This patch also includes numerous clean-ups for the cgroup code. |
ed85d9a58d8e404877ec4bc2f2e9d31d16b98c47 |
|
16-Apr-2013 |
Lennart Poettering <lennart@poettering.net> |
logind: filter configured cgroup controller lists |
ab06eef8101866dd1337c4759002f7360a9db416 |
|
15-Apr-2013 |
Anatol Pomozov <anatol.pomozov@gmail.com> |
Fix spelling errors using 'codespell' tool |
e2acb67baaa1d63685dcaf80becf10291f13d086 |
|
09-Apr-2013 |
Lennart Poettering <lennart@poettering.net> |
logind: introduce an explicit session class for cronjobs and similar
cronjobs are neither interactive user session, nor lock screens, nor
login screens, hence they should get their own class. |
574d5f2dfc25226afc718aa5ba1a145fe5cad221 |
|
03-Apr-2013 |
Lennart Poettering <lennart@poettering.net> |
util: rename write_one_line_file() to write_string_file()
You can write much more than just one line with this call (and we
frequently do), so let's correct the naming. |
4654e558a3c297a71f05c3b2db6a2744fcf3cdea |
|
19-Mar-2013 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
logind: exploit previous cleanups and simplify returns |
ce0fc5f5f6debc6e37ac3ab0a3ea1c9c35b3ed99 |
|
19-Mar-2013 |
Colin Walters <walters@verbum.org> |
logind: Make more use of cleanup macros |
954449b82df7fc2d37a8d854977a1a73a65edfbd |
|
05-Mar-2013 |
Lennart Poettering <lennart@poettering.net> |
logind: when registering a new session always use previous session info from cgroup path rather than audit
Previously for cases like "su" or "sudo" where a session is attempted to
be created from within an existing one we used the audit session ID to
detect this and in such a case we simple returned the session data of
the original session a second time.
With this change we will now use the cgroup path of the calling path to
determine the old session, i.e. we only rely on our own session
identification scheme, instead of audits.
We will continue to keep the audit session ID and ours in sync however,
to avoid unnecessary confusion. |
b85bdddafb321fa870b9250a2ff17040d6996061 |
|
22-Feb-2013 |
Michal Schmidt <mschmidt@redhat.com> |
systemctl: make shutdown operations use irreversible jobs
Occasionally people report problem with reboot/poweroff operations hanging in
the middle. One known cause is when a new transaction to start a unit is
enqueued while the shutdown is going on. The start of the unit conflicts with
the shutdown jobs, so they get cancelled. The failure case can be quite unpleasant,
becase getty and sshd may already be stopped.
Fix it by using irreversible jobs for shutdown (reboot/poweroff/...) actions.
This applies to commands like "reboot", "telinit 6", "systemctl reboot". Should
someone desire to use reversible jobs, they can say "systemctl start reboot.target".` |
a5c32cff1f56afe6f0c6c70d91a88a7a8238b2d7 |
|
14-Feb-2013 |
Harald Hoyer <harald@redhat.com> |
honor SELinux labels, when creating and writing config files
Also split out some fileio functions to fileio.c and provide a SELinux
aware pendant in fileio-label.c
see https://bugzilla.redhat.com/show_bug.cgi?id=881577 |
314b4b0a68d9ab35de981923a088fc8c8820caa5 |
|
25-Jan-2013 |
Lennart Poettering <lennart@poettering.net> |
logind: rework delay inhibition logic
- Don't allow any locks to be taken while we are in the process of
executing the specific operation, so that apps are not surprised if a
suspend/shutdown happens while they rely on their inhibitor.
- Get rid of the Resumed signal, it was a bad idea, and redundant due to
PrepareForSleep(false), see below.
- Always send out PrepareFor{Shutdown,Sleep} signals, instead of only if
a delay lock is taken.
- Move PrepareForSleep(false) after we come back from the suspend, so
that apps can use this as "Resumed" notification. This also has the
benefit that apps know when to take a new lock. |
b61600291e3bbc51482bbb9823ccd48f03c130da |
|
24-Jan-2013 |
Lennart Poettering <lennart@poettering.net> |
logind: add UnlockSessions() clal to complement LockSessions() |
ee17c9281d3c208ca3f4fadd800990e61e8fd4f2 |
|
24-Jan-2013 |
Lennart Poettering <lennart@poettering.net> |
logind: send Resumed() signal after we come back from suspend/hibernate/hybrid-sleep
This allows clients to get asynchronous notifications for user-requested
suspend/hibernate cycles. Kernel-triggered automatic suspending is not
covered. |
af9792ac7f39354f80e9006c42c2400c5e41c447 |
|
24-Jan-2013 |
Lennart Poettering <lennart@poettering.net> |
logind: only allow one shutdown/sleep action to be queued at the same time
This should make sure that closing the lid while shutting down won't
suspend the machine but will simply cause the shutdown to complete. |
1ca04b87979b2add53ebb8a7fdf13c34fb6c2743 |
|
14-Jan-2013 |
Lennart Poettering <lennart@poettering.net> |
logind: ignore non-tty/non-x11 session when checking if there are other sessions before shutting down
https://bugzilla.redhat.com/show_bug.cgi?id=890827 |
23406ce58aa7142e8df3c5c9e5ac34a01e90e3e0 |
|
24-Dec-2012 |
Lennart Poettering <lennart@poettering.net> |
logind: add support for automatic suspend/hibernate/shutdown on idle |
1a37b9b9043ef83e9900e460a9a1fccced3acf89 |
|
20-Nov-2012 |
Colin Walters <walters@verbum.org> |
dbus-common: Add helper method to handle no-reply messages
[Tested in latest gnome-ostree; if accepted, I'll look at a followup
patch which fixes the other dbus_connection_send(reply, ...) calls
besides logind]
DBus messages can have a flag NO_REPLY associated that means "I don't
need a reply". This is for efficiency reasons - for one-off requests
that can't return an error, etc.
However, it's up to users to manually check
dbus_message_get_no_reply() from a message. libdbus will happily send
out a reply if you don't.
Unfortunately, doing so is not just less efficient - it also triggers
a security error, for complex reasons. This is something that will
eventually be fixed in dbus, but it's also correct to handle it in
client applications.
This new helper API is slightly nicer in that you don't have to pass
NULL to say you don't want a reply serial for your reply.
This patch also tweaks logind to use the API - there are more areas of
the code that need this treatment too. |
978cf3c75fbd94fd0e046206ada6169b35edd919 |
|
30-Oct-2012 |
Lennart Poettering <lennart@poettering.net> |
logind: it's OK if a process on an pty requests a session for seat0
After all, if a sudo/su inside an X terminal should get added to the
same session as the X session itself. |
7ba643863116cd0b5abf048e53321f93e5743f69 |
|
30-Oct-2012 |
Lennart Poettering <lennart@poettering.net> |
logind: unify all session lock loop |
6524990fdc98370ecba5d9f73e67161e8798c010 |
|
28-Oct-2012 |
Lennart Poettering <lennart@poettering.net> |
logind: support for hybrid sleep (i.e. suspend+hibernate at the same time) |
770858811930c0658b189d980159ea1ac5663467 |
|
16-Oct-2012 |
Lennart Poettering <lennart@poettering.net> |
logind: only release logind session from the PAM module if the same module instance actually created it |
1ca6783f5ea3755bd83e723f529c2eda512c7fed |
|
13-Oct-2012 |
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> |
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. |
8e7fd6ade44ce5dde0867ba748c7978ed1206865 |
|
21-Sep-2012 |
Lennart Poettering <lennart@poettering.net> |
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. |
409133be63387fc04d927e8aecd2f6ba03d2f143 |
|
21-Sep-2012 |
Lennart Poettering <lennart@poettering.net> |
logind: allow users to override their own suspend/sleep inhibitors |
beaafb2ea6be591882aef21fe19b88e3b2461087 |
|
19-Sep-2012 |
Lennart Poettering <lennart@poettering.net> |
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 |
b14eda963c698aa89fac1d91501d572ec644cc2f |
|
18-Sep-2012 |
Lennart Poettering <lennart@poettering.net> |
logind: split up inhibit acquire policy |
877d54e9b09e093c2102f519a84e2a52637ae035 |
|
04-Sep-2012 |
Lennart Poettering <lennart@poettering.net> |
journal: generate structured journal messages for a number of events |
b9c26b413497a0014ac2058a0ec04849a83df1ea |
|
08-Aug-2012 |
Simon Peeters <peeters.simon@gmail.com> |
logind: use bus_method_call_with_reply() where posible |
fa2b196da12642d3560f5766eef09ffca7c31f7b |
|
29-Jul-2012 |
Lennart Poettering <lennart@poettering.net> |
logind: add LockSessions() call to lock all local sessions at once |
5e4a79da3ac3859c2a1295e019b95a1e5589b9c1 |
|
29-Jun-2012 |
Lennart Poettering <lennart@poettering.net> |
logind: add PreparingForShutdown/PreparingForSleep properties |
2154761fbbc931e3e3d83100fa42609c99cd2536 |
|
12-Jun-2012 |
Michal Schmidt <mschmidt@redhat.com> |
logind: fix check for multiple sessions
The "$action-multiple-sessions" polkit actions are defined as
"$action while other users are logged in". To me this implies that the
following sessions should not count:
- greeter sessions
- user sessions belonging to the same user as the one who's asking
Not sure how to treat class SESSION_LOCK_SCREEN. I never have these.
I just ignore every class that's not SESSION_USER.
https://bugzilla.redhat.com/show_bug.cgi?id=814424 |
d5a745df4da6265e32db667807b4f7214cac95f0 |
|
01-Jun-2012 |
Lennart Poettering <lennart@poettering.net> |
logind: fix indentation |
398f7c881b90d2ca4edafcb60dba3822eb9f73eb |
|
01-Jun-2012 |
Matthias Clasen <mclasen@redhat.com> |
logind: interpret the can_sleep return value properly
can_sleep() returns a boolean, so a return value > 0 does not
mean 'na'. |
d2e54fae5ca7a0f71b5ac8b356a589ff0a09ea0a |
|
31-May-2012 |
Kay Sievers <kay@vrfy.org> |
mkdir: append _label to all mkdir() calls that explicitly set the selinux context |
069cfc85f876bb6966cb5a9bbe0235f5064622cd |
|
30-May-2012 |
Lennart Poettering <lennart@poettering.net> |
logind: optionally handle power, sleep and lid switch events
This takes handling of chassis power and sleep keys as well as the lid
switch over from acpid.
This logic is enabled by default for power and sleep keys, but not for
the lid switch.
If a graphical session is in the foreground no action is taken under the
assumption that the graphical session does this. |
d889a2069a87e4617b32ddbdeace5a53a12c699d |
|
08-May-2012 |
Lennart Poettering <lennart@poettering.net> |
logind: implement suspend/hibernate calls with inhibition logic |
9eb977db5b89b44f254ab40c1876a76b7d7ea2d0 |
|
08-May-2012 |
Kay Sievers <kay@vrfy.org> |
util: split-out path-util.[ch] |
eecd1362f7f4de432483b5d77c56726c3621a83a |
|
05-May-2012 |
Lennart Poettering <lennart@poettering.net> |
logind: implement delay inhibitor locks in addition to block inhibitor locks
This is useful to allow applications to synchronously save data before
the system is suspended or shut down. |
d1122ad5e3222cc17bfb556c23273598a5fb60fa |
|
22-Apr-2012 |
Lennart Poettering <lennart@poettering.net> |
login: assing /dev/console logins to seat0 |
c7b5eb98e8eeafe63a079ee3c51e9670872437ae |
|
16-Apr-2012 |
Lennart Poettering <lennart@poettering.net> |
logind: hook up inhibit logic with idle hint logic |
f8e2fb7b14e53f5a4bcfd66d26910af1dee185c6 |
|
16-Apr-2012 |
Lennart Poettering <lennart@poettering.net> |
logind: add shutdown/suspend/idle inhibition framework |
5430f7f2bc7330f3088b894166bf3524a067e3d8 |
|
12-Apr-2012 |
Lennart Poettering <lennart@poettering.net> |
relicense to LGPLv2.1 (with exceptions)
We finally got the OK from all contributors with non-trivial commits to
relicense systemd from GPL2+ to LGPL2.1+.
Some udev bits continue to be GPL2+ for now, but we are looking into
relicensing them too, to allow free copy/paste of all code within
systemd.
The bits that used to be MIT continue to be MIT.
The big benefit of the relicensing is that closed source code may now
link against libsystemd-login.so and friends. |
49e942b2bc9fdedba79cd266a076ce9c9d91fc13 |
|
10-Apr-2012 |
Kay Sievers <kay@vrfy.org> |
rename basic.la to shared.la and put selinux deps in shared-selinx.la
Only 34 of 74 tools need libselinux linked, and libselinux is a pain
with its unconditional library constructor. |
75c8e3cffd7da8eede614cf61384957af2c82a29 |
|
22-Mar-2012 |
Lennart Poettering <lennart@poettering.net> |
logind: close FIFO before ending sessions cleanly
For clean session endings ask logind explicitly to get rid of the FIFO
before closing it so that the FIFO logic doesn't result in su/sudo to be
terminated immediately. |
55efac6cbcea0d8edda9c6820620ceb390009e7a |
|
14-Feb-2012 |
Lennart Poettering <lennart@poettering.net> |
login: track login class (i.e. one of "user", "greeter", "lock-screen") for each session
This introduces the new PAM environment variable XDG_SESSION_CLASS. If
not set, defaults to "user".
This is useful for apps that want to distuingish real user logins from
"fake" ones which just exist to show a gdm login screen or a lock
screen. |
89f134406af6a4b4c7493f624a89dcd654b48e81 |
|
11-Feb-2012 |
Lennart Poettering <lennart@poettering.net> |
logind: introduce CanReboot/CanPowerOff bus calls |
cae5846b2cbb5091267f59f4c7f941ce767a1f8f |
|
07-Feb-2012 |
Lennart Poettering <lennart@poettering.net> |
logind: fix introspection data |
84c3361e129a5ae7a5a408b1562f7f2336b1de3a |
|
07-Feb-2012 |
Lennart Poettering <lennart@poettering.net> |
logind: introduce ActivateSessionOnSeat() |
c4aa65e7147dc742886edf25593e10466b02fc3a |
|
01-Feb-2012 |
Lennart Poettering <lennart@poettering.net> |
logind: add GetSessionByPID() bus call |
02b16a19a4f786f63ad6f4e8f6e185b41c9ca386 |
|
27-Jan-2012 |
Lennart Poettering <lennart@poettering.net> |
logind: make sure we create /var/lib/systemd before using it |
d200735e13c52dcfe36c0e066f9f6c2fbfb85a9c |
|
16-Jan-2012 |
Michal Schmidt <mschmidt@redhat.com> |
dbus: more efficient implementation of properties
The way the various properties[] arrays are initialized is inefficient:
- only the .data members change at runtime, yet the whole arrays of
properties with all the fields are constructed on the stack one by
one by the code.
- there's duplication, eg. the properties of "org.freedesktop.systemd1.Unit"
are repeated in several unit types.
Fix it by moving the information about properties into static const
sections. Instead of storing the .data directly in the property, store
a constant offset from a run-time base.
The small arrays of struct BusBoundProperties bind together the constant
information with the right runtime information (the base pointer).
On my system the code shrinks by 60 KB, data increases by 10 KB. |
addedec48ba0ffc4472ef6d3b5a45c9d4239f1cd |
|
03-Jan-2012 |
Lennart Poettering <lennart@poettering.net> |
logind: if we can't open /dev/tty0, assume there is no VT subsystem and don't pretend we could do VT switching |
4bba9156da3e1df2cee24d10d7cd88c776ef4179 |
|
31-Dec-2011 |
Lennart Poettering <lennart@poettering.net> |
logind: move logind into its own subdirectory |