| Commit message (Collapse) | Author | Age |
|
|
|
|
| |
Auto-spawning VTs requires systemd in practice. If you're using systemd
you can just use its logind :)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* elogind does not support systemd services and units. But at least
the units are needed to support the systemd cgroup slice/scope
system.
* Remove systemd subscription to scope, service and slice jobs.
These can not be supported in any way, as they depend on systemd
running the machine.
* The functions session_start_scope(), user_start_service() and
user_start_slice() no longer try to call systemd via dbus for
assistance.
This way they generate their proper scope, service and slice names,
and store them in the Managers HashMaps for session and user units.
This should enable us to reverse track pids to users and such
stuff, as that is what systemd-logind does, not knowing whether any
unit *really* has been started or not.
However, this will not work out of the box until we find a way to
integrate cg_create_everywhere() into elogind without becoming
dependent of systemd unit, service and job knowledge again.
|
|
|
|
|
| |
Let elogind setup cgroups support on its manager initialization and
free the cgroups subsystem when the manager is destroyed.
|
|
|
|
|
| |
Add a highly reduced src/core/cgroup.[hc] to enable elogind to setup
cgroups for proper usage.
|
|
|
|
|
|
| |
Re-add elogind-cgroups-agent. elogind will not be able to support the
new unified hierarchy, and the agent is needed for the classical
hierarchy.
|
|
|
|
|
|
|
| |
* src/login/logind.c (main): Also create /run/systemd at startup.
* Create /run/systemd/machines, so that the login monitor works.
* Fail if any of the needed directories could not be created.
* But do not fail if any of the needed directories exist.
|
|
|
|
|
|
|
|
|
|
|
| |
* src/login/logind.c (manager_connect_bus):
- Notice instead of error if we can't subscribe to updates from
systemd. Perhaps we should remove this entirely. But leaving
it optional means, that a system managed by systemd can use
elogind substituting systemd-login.
- Warn instead of error if we can't add receiver matches from
systemd events. On a system not run by systemd, such events
wouldn't occur anyway.
|
| |
|
|
|
|
|
|
|
|
| |
The only function still using librt was
src/shared/clean-ipc.c::clean_posix_mq().
But that function is not really needed, because elogind does not call
mq_open() anywhere, or any other mqueue related functions.
|
|
|
|
|
|
|
| |
* src/systemd/sd-daemon.h:
* src/libelogind/sd-daemon/sd-daemon.c (sd_is_mq): Remove unused
function that depended on librt. Ultimately we should remove this
header at some point.
|
| |
|
|
|
|
| |
systemd dbus interface to control.
|
| |
|
| |
|
|
|
|
|
| |
Remove logind check, it is always built as elogind anyway.
Remove ENABLE_LOGIND conditional from man pages.
|
| |
|
|
|
|
|
|
|
|
|
| |
These definitions were not valid when compiling against eudev.
As a nice consequence, our own copies of any udev includes are no
longer needed and could be removed for good.
Add label.h include to logind.c, as "udev.h" is no longer available which would have done so otherwise.
|
| |
|
|
|
|
| |
LZ4 and XZ features from build.h
|
| |
|
|
|
|
|
|
|
|
|
| |
build-sys: add check for gperf lookup function signature (#5055)
gperf-3.1 generates lookup functions that take a size_t length
parameter instead of unsigned int. Test for this at configure time.
Fixes: https://github.com/systemd/systemd/issues/5039
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
needed by pager.c
|
|
|
|
| |
unneeded functions.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
When forking of a child process for connecting to a container, pass
the preicse connection error to the calling process.
We already did this correctly for kdbus busses, let's do so for dbus1
busses, too.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, our introspection data looks like this:
<node>
<interface name="org.freedesktop.DBus.Peer">
...
</interface>
<interface name="org.freedesktop.DBus.Introspectable">
...
</interface>
<interface name="org.freedesktop.DBus.Properties">
...
</interface>
<node name="org"/>
<node name="org/freedesktop"/>
<node name="org/freedesktop/login1"/>
<node name="org/freedesktop/login1/user"/>
<node name="org/freedesktop/login1/user/self"/>
<node name="org/freedesktop/login1/user/_1000"/>
<node name="org/freedesktop/login1/seat"/>
<node name="org/freedesktop/login1/seat/self"/>
<node name="org/freedesktop/login1/seat/seat0"/>
<node name="org/freedesktop/login1/session"/>
<node name="org/freedesktop/login1/session/self"/>
<node name="org/freedesktop/login1/session/c1"/>
</node>
(ordered alphabetically for better visibility)
This is grossly incorrect. The spec says that we're allowed to return
non-directed children, however, it does not allow us to return data
recursively in multiple parents. If we return "org", then we must not
return anything else that starts with "org/".
It is unclear, whether we can include child-nodes as a tree. Moreover, it
is usually not what the caller wants. Hence, this patch changes sd-bus to
never return introspection data recursively. Instead, only a single
child-layer is returned.
This patch relies on enumerators to never return hierarchies. If someone
registers an enumerator via sd_bus_add_enumerator, they better register
sub-enumerators if they support *TRUE* hierarchies. Each enumerator is
treated as a single layer and not filtered.
Enumerators are still allowed to return nested data. However, that data
is still required to be a single hierarchy. For instance, returning
"/org/foo" and "/com/bar" is fine, but including "/com" or "/org" in that
dataset is not.
This should be the default for enumerators and I see no reason to filter
in sd-bus. Moreover, filtering that data-set would require to sort the
strv by path and then do prefix-filtering. This is O(n log n), which
would be fine, but still better to avoid.
Fixes #664.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Whenever we run in a user context, sd_bus_{default_user,open_user}() and
friends should always connect to the user-bus of the current context,
instead of deriving the uid from getuid(). This allows us running
programs via sudo/su, without the nasty side-effect of accidentally
connecting to the root user-bus.
This patch enforces the idea of making su/sudo *not* opening sessions by
default. That is, all they do is raising privileges, but keeping
everything set as before. You can still use su/sudo to open real sessions
by requesting a login-session (or loading pam_elogind otherwise).
However, in this case XDG_RUNTIME_DIR= will not be set (as usual in these
cases), hence, you will not be able to connect to *any* user-bus.
Long story short: With this patch applied, both:
- ./busctl --user
- sudo ./busctl --user
..will successfully connect to the user-bus of the local user.
Fixes #390.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
And not bool.
|
| |
|
| |
|