chiark / gitweb /
elogind.git
6 years agoman: expand the documentation of $SYSTEMD_PAGER and related environment variables
Lennart Poettering [Tue, 11 Oct 2016 15:45:49 +0000 (17:45 +0200)]
man: expand the documentation of $SYSTEMD_PAGER and related environment variables

Document the default pagers used, as well as $SYSTEMD_LESSCHARSET.

Fixes: #4143
6 years agonspawn,mount-util: add [u]mount_verbose and use it in nspawn
Zbigniew Jędrzejewski-Szmek [Mon, 10 Oct 2016 19:55:20 +0000 (15:55 -0400)]
nspawn,mount-util: add [u]mount_verbose and use it in nspawn

This makes it easier to debug failed nspawn invocations:

Mounting sysfs on /var/lib/machines/fedora-rawhide/sys (MS_RDONLY|MS_NOSUID|MS_NOEXEC|MS_NODEV "")...
Mounting tmpfs on /var/lib/machines/fedora-rawhide/dev (MS_NOSUID|MS_STRICTATIME "mode=755,uid=1450901504,gid=1450901504")...
Mounting tmpfs on /var/lib/machines/fedora-rawhide/dev/shm (MS_NOSUID|MS_NODEV|MS_STRICTATIME "mode=1777,uid=1450901504,gid=1450901504")...
Mounting tmpfs on /var/lib/machines/fedora-rawhide/run (MS_NOSUID|MS_NODEV|MS_STRICTATIME "mode=755,uid=1450901504,gid=1450901504")...
Bind-mounting /sys/fs/selinux on /var/lib/machines/fedora-rawhide/sys/fs/selinux (MS_BIND "")...
Remounting /var/lib/machines/fedora-rawhide/sys/fs/selinux (MS_RDONLY|MS_NOSUID|MS_NOEXEC|MS_NODEV|MS_BIND|MS_REMOUNT "")...
Mounting proc on /proc (MS_NOSUID|MS_NOEXEC|MS_NODEV "")...
Bind-mounting /proc/sys on /proc/sys (MS_BIND "")...
Remounting /proc/sys (MS_RDONLY|MS_NOSUID|MS_NOEXEC|MS_NODEV|MS_BIND|MS_REMOUNT "")...
Bind-mounting /proc/sysrq-trigger on /proc/sysrq-trigger (MS_BIND "")...
Remounting /proc/sysrq-trigger (MS_RDONLY|MS_NOSUID|MS_NOEXEC|MS_NODEV|MS_BIND|MS_REMOUNT "")...
Mounting tmpfs on /tmp (MS_STRICTATIME "mode=1777,uid=0,gid=0")...
Mounting tmpfs on /sys/fs/cgroup (MS_NOSUID|MS_NOEXEC|MS_NODEV|MS_STRICTATIME "mode=755,uid=0,gid=0")...
Mounting cgroup on /sys/fs/cgroup/elogind (MS_NOSUID|MS_NOEXEC|MS_NODEV "none,name=elogind,xattr")...
Failed to mount cgroup on /sys/fs/cgroup/elogind (MS_NOSUID|MS_NOEXEC|MS_NODEV "none,name=elogind,xattr"): No such file or directory

6 years agologin: drop fedora-specific PAM config, add note to DISTRO_PORTING (#4314)
Felipe Sateler [Mon, 10 Oct 2016 13:40:05 +0000 (10:40 -0300)]
login: drop fedora-specific PAM config, add note to DISTRO_PORTING (#4314)

It is impossible to ship a fully generic PAM configuration upstream.
Therefore, ship a minimal configuration with the elogind --user requirements,
and add a note to DISTRO_PORTING documenting this.

Fixes #4284

6 years agonetworkd: address add support to configure flags (#4201)
Susant Sahani [Sat, 8 Oct 2016 11:05:41 +0000 (16:35 +0530)]
networkd: address add support to configure flags (#4201)

This patch enables to configure

IFA_F_HOMEADDRESS
IFA_F_NODAD
IFA_F_MANAGETEMPADDR
IFA_F_NOPREFIXROUTE
IFA_F_MCAUTOJOIN

6 years agouser-util: rework maybe_setgroups() a bit
Lennart Poettering [Thu, 6 Oct 2016 15:54:12 +0000 (17:54 +0200)]
user-util: rework maybe_setgroups() a bit

Let's drop the caching of the setgroups /proc field for now. While there's a
strict regime in place when it changes states, let's better not cache it since
we cannot really be sure we follow that regime correctly.

More importantly however, this is not in performance sensitive code, and
there's no indication the cache is really beneficial, hence let's drop the
caching and make things a bit simpler.

Also, while we are at it, rework the error handling a bit, and always return
negative errno-style error codes, following our usual coding style. This has
the benefit that we can sensible hanld read_one_line_file() errors, without
having to updat errno explicitly.

6 years agosd-bus: add DNS errors to the errno translation table
Lennart Poettering [Thu, 6 Oct 2016 14:01:44 +0000 (16:01 +0200)]
sd-bus: add DNS errors to the errno translation table

We generate these, hence we should also add errno translations for them.

6 years agosd-bus: add a few missing entries to the error translation tables
Lennart Poettering [Thu, 6 Oct 2016 13:50:30 +0000 (15:50 +0200)]
sd-bus: add a few missing entries to the error translation tables

These were forgotten, let's add some useful mappings for all errors we define.

6 years agosd-device/networkd: unify code to get a socket for issuing netdev ioctls on
Lennart Poettering [Thu, 6 Oct 2016 13:48:15 +0000 (15:48 +0200)]
sd-device/networkd: unify code to get a socket for issuing netdev ioctls on

As suggested here:

https://github.com/elogind/elogind/pull/4296#issuecomment-251911349

Let's try AF_INET first as socket, but let's fall back to AF_NETLINK, so that
we can use a protocol-independent socket here if possible. This has the benefit
that our code will still work even if AF_INET/AF_INET6 is made unavailable (for
exmple via seccomp), at least on current kernels.

6 years agolist: LIST_INSERT_BEFORE: update head if necessary (#4261)
Michael Olbrich [Tue, 4 Oct 2016 14:15:37 +0000 (16:15 +0200)]
list: LIST_INSERT_BEFORE: update head if necessary (#4261)

If the new item is inserted before the first item in the list, then the
head must be updated as well.
Add a test to the list unit test to check for this.

6 years agotree-wide: remove consecutive duplicate words in comments
Stefan Schweter [Sun, 2 Oct 2016 17:37:21 +0000 (19:37 +0200)]
tree-wide: remove consecutive duplicate words in comments

6 years agopath-util: add a function to peek into a container and guess elogind version
Zbigniew Jędrzejewski-Szmek [Sun, 2 Oct 2016 13:51:27 +0000 (15:51 +0200)]
path-util: add a function to peek into a container and guess elogind version

This is a bit crude and only works for new elogind versions which
have libelogind-shared.

6 years agocore: do not fail in a container if we can't use setgroups
Giuseppe Scrivano [Wed, 28 Sep 2016 16:37:39 +0000 (18:37 +0200)]
core: do not fail in a container if we can't use setgroups

It might be blocked through /proc/PID/setgroups

6 years agoaudit: disable if cannot create NETLINK_AUDIT socket
Giuseppe Scrivano [Wed, 28 Sep 2016 16:26:25 +0000 (18:26 +0200)]
audit: disable if cannot create NETLINK_AUDIT socket

6 years agobasic: fix for IPv6 status (#4224)
Susant Sahani [Tue, 27 Sep 2016 13:55:13 +0000 (19:25 +0530)]
basic: fix for IPv6 status (#4224)

Even if
```
   cat /proc/sys/net/ipv6/conf/all/disable_ipv6
1
```

is disabled

cat /proc/net/sockstat6

```
TCP6: inuse 2
UDP6: inuse 1
UDPLITE6: inuse 0
RAW6: inuse 0
FRAG6: inuse 0 memory 0
 ```

Looking for /proc/net/if_inet6 is the right choice.

6 years agonamespace: rework how ReadWritePaths= is applied
Lennart Poettering [Sun, 25 Sep 2016 08:40:51 +0000 (10:40 +0200)]
namespace: rework how ReadWritePaths= is applied

Previously, if ReadWritePaths= was nested inside a ReadOnlyPaths=
specification, then we'd first recursively apply the ReadOnlyPaths= paths, and
make everything below read-only, only in order to then flip the read-only bit
again for the subdirs listed in ReadWritePaths= below it.

This is not only ugly (as for the dirs in question we first turn on the RO bit,
only to turn it off again immediately after), but also problematic in
containers, where a container manager might have marked a set of dirs read-only
and this code will undo this is ReadWritePaths= is set for any.

With this patch behaviour in this regard is altered: ReadOnlyPaths= will not be
applied to the children listed in ReadWritePaths= in the first place, so that
we do not need to turn off the RO bit for those after all.

This means that ReadWritePaths=/ReadOnlyPaths= may only be used to turn on the
RO bit, but never to turn it off again. Or to say this differently: if some
dirs are marked read-only via some external tool, then ReadWritePaths= will not
undo it.

This is not only the safer option, but also more in-line with what the man page
currently claims:

        "Entries (files or directories) listed in ReadWritePaths= are
        accessible from within the namespace with the same access rights as
        from outside."

To implement this change bind_remount_recursive() gained a new "blacklist"
string list parameter, which when passed may contain subdirs that shall be
excluded from the read-only mounting.

A number of functions are updated to add more debug logging to make this more
digestable.

6 years agobasic/strv: add STRPTR_IN_SET
Zbigniew Jędrzejewski-Szmek [Sun, 25 Sep 2016 00:13:28 +0000 (20:13 -0400)]
basic/strv: add STRPTR_IN_SET

Also some trivial tests for STR_IN_SET and STRPTR_IN_SET.

6 years agonamespace: chase symlinks for mounts to set up in userspace
Lennart Poettering [Sat, 24 Sep 2016 10:41:30 +0000 (12:41 +0200)]
namespace: chase symlinks for mounts to set up in userspace

This adds logic to chase symlinks for all mount points that shall be created in
a namespace environment in userspace, instead of leaving this to the kernel.
This has the advantage that we can correctly handle absolute symlinks that
shall be taken relative to a specific root directory. Moreover, we can properly
handle mounts created on symlinked files or directories as we can merge their
mounts as necessary.

(This also drops the "done" flag in the namespace logic, which was never
actually working, but was supposed to permit a partial rollback of the
namespace logic, which however is only mildly useful as it wasn't clear in
which case it would or would not be able to roll back.)

Fixes: #3867
6 years agologind: fix /run/user/$UID creation in apparmor-confined containers (#4154)
Tomáš Janoušek [Thu, 15 Sep 2016 23:26:31 +0000 (01:26 +0200)]
logind: fix /run/user/$UID creation in apparmor-confined containers (#4154)

When a docker container is confined with AppArmor [1] and happens to run
on top of a kernel that supports mount mediation [2], e.g. any Ubuntu
kernel, mount(2) returns EACCES instead of EPERM.  This then leads to:

    elogind-logind[33]: Failed to mount per-user tmpfs directory /run/user/1000: Permission denied
    login[42]: pam_elogind(login:session): Failed to create session: Access denied

and user sessions don't start.

This also applies to selinux that too returns EACCES on mount denial.

[1] https://github.com/docker/docker/blob/master/docs/security/apparmor.md#understand-the-policies
[2] http://bazaar.launchpad.net/~apparmor-dev/apparmor/master/view/head:/kernel-patches/4.7/0025-UBUNTU-SAUCE-apparmor-Add-the-ability-to-mediate-mou.patch

6 years agotime-util: export timespec_load_nsec()
Ivan Shapovalov [Thu, 15 Sep 2016 02:19:31 +0000 (05:19 +0300)]
time-util: export timespec_load_nsec()

6 years agofileio: simplify mkostemp_safe() (#4090)
Topi Miettinen [Tue, 13 Sep 2016 06:20:38 +0000 (06:20 +0000)]
fileio: simplify mkostemp_safe() (#4090)

According to its manual page, flags given to mkostemp(3) shouldn't include
O_RDWR, O_CREAT or O_EXCL flags as these are always included. Beyond
those, the only flag that all callers (except a few tests where it
probably doesn't matter) use is O_CLOEXEC, so set that unconditionally.

6 years agoAlways use unicode ellipsis when ellipsizing
Zbigniew Jędrzejewski-Szmek [Mon, 12 Sep 2016 19:09:36 +0000 (20:09 +0100)]
Always use unicode ellipsis when ellipsizing

We were already unconditionally using the unicode character when the
input string was not pure ASCII, leading to different behaviour in
depending on the input string.

elogind[1]: Starting printit.service.
python3[19962]: foooooooooooooooooooooooooooooooooooo…oooo
python3[19964]: fooąęoooooooooooooooooooooooooooooooo…oooo
python3[19966]: fooąęoooooooooooooooooooooooooooooooo…ąęąę
python3[19968]: fooąęoooooooooooooooooąęąęąęąęąęąęąęą…ąęąę
elogind[1]: Started printit.service.

6 years agoshared/conf-parser: add config_parse_many which takes strv with dirs
Zbigniew Jędrzejewski-Szmek [Sat, 10 Sep 2016 11:19:41 +0000 (12:19 +0100)]
shared/conf-parser: add config_parse_many which takes strv with dirs

This way we don't have to create a nulstr just to unpack it in a moment.

6 years agotree-wide: rename config_parse_many to …_nulstr
Zbigniew Jędrzejewski-Szmek [Sat, 10 Sep 2016 10:02:40 +0000 (11:02 +0100)]
tree-wide: rename config_parse_many to …_nulstr

In preparation for adding a version which takes a strv.

6 years agosd-bus: bump message queue size
Lennart Poettering [Wed, 31 Aug 2016 18:09:31 +0000 (20:09 +0200)]
sd-bus: bump message queue size

Let's bump it further, as this the current limit turns out to be problematic
IRL. Let's bump it to more than twice what we know of is needed.

Fixes: #4068
6 years agomachinectl: split OS field in two; print ip addresses (#4058)
Seraphime Kirkovski [Wed, 31 Aug 2016 18:06:57 +0000 (21:06 +0300)]
machinectl: split OS field in two; print ip addresses (#4058)

This splits the OS field in two : one for the distribution name
and one for the the version id.
Dashes are written for missing fields.
This also prints ip addresses of known machines. The `--max-addresses`
option specifies how much ip addresses we want to see. The default is 1.
When more than one address is written for a machine, a `,` follows it.
If there are more ips than `--max-addresses`, `...` follows the last
address.

6 years agonetworkd: add options to bridge (#4051)
Tobias Jungel [Wed, 31 Aug 2016 18:06:23 +0000 (20:06 +0200)]
networkd: add options to bridge (#4051)

This patch allows to configure AgeingTimeSec, Priority and DefaultPVID for
bridge interfaces.

6 years agocore: add "invocation ID" concept to service manager
Lennart Poettering [Tue, 30 Aug 2016 21:18:46 +0000 (23:18 +0200)]
core: add "invocation ID" concept to service manager

This adds a new invocation ID concept to the service manager. The invocation ID
identifies each runtime cycle of a unit uniquely. A new randomized 128bit ID is
generated each time a unit moves from and inactive to an activating or active
state.

The primary usecase for this concept is to connect the runtime data PID 1
maintains about a service with the offline data the journal stores about it.
Previously we'd use the unit name plus start/stop times, which however is
highly racy since the journal will generally process log data after the service
already ended.

The "invocation ID" kinda matches the "boot ID" concept of the Linux kernel,
except that it applies to an individual unit instead of the whole system.

The invocation ID is passed to the activated processes as environment variable.
It is additionally stored as extended attribute on the cgroup of the unit. The
latter is used by journald to automatically retrieve it for each log logged
message and attach it to the log entry. The environment variable is very easily
accessible, even for unprivileged services. OTOH the extended attribute is only
accessible to privileged processes (this is because cgroupfs only supports the
"trusted." xattr namespace, not "user."). The environment variable may be
altered by services, the extended attribute may not be, hence is the better
choice for the journal.

Note that reading the invocation ID off the extended attribute from journald is
racy, similar to the way reading the unit name for a logging process is.

This patch adds APIs to read the invocation ID to sd-id128:
sd_id128_get_invocation() may be used in a similar fashion to
sd_id128_get_boot().

PID1's own logging is updated to always include the invocation ID when it logs
information about a unit.

A new bus call GetUnitByInvocationID() is added that allows retrieving a bus
path to a unit by its invocation ID. The bus path is built using the invocation
ID, thus providing a path for referring to a unit that is valid only for the
current runtime cycleof it.

Outlook for the future: should the kernel eventually allow passing of cgroup
information along AF_UNIX/SOCK_DGRAM messages via a unique cgroup id, then we
can alter the invocation ID to be generated as hash from that rather than
entirely randomly. This way we can derive the invocation race-freely from the
messages.

6 years agoutil: use SPECIAL_ROOT_SLICE macro where appropriate
Lennart Poettering [Tue, 30 Aug 2016 19:49:26 +0000 (21:49 +0200)]
util: use SPECIAL_ROOT_SLICE macro where appropriate

6 years agolog: minor fixes
Lennart Poettering [Tue, 30 Aug 2016 19:02:36 +0000 (21:02 +0200)]
log: minor fixes

Most important is a fix to negate the error number if necessary, before we
first access it.

6 years agobasic/fileio: we always have O_TMPFILE now
Yann E. MORIN [Mon, 29 Aug 2016 10:34:50 +0000 (12:34 +0200)]
basic/fileio: we always have O_TMPFILE now

fileio makes use of O_TMPFILE when it is available.

We now always have O_TMPFILE, defined in missing.h if missing
from the toolchain headers.

Have fileio include missing.h and drop the guards around the
use of O_TMPFILE.

6 years agomissing.h: add missing definitions for __O_TMPFILE
Yann E. MORIN [Sun, 28 Aug 2016 15:26:42 +0000 (17:26 +0200)]
missing.h: add missing definitions for __O_TMPFILE

Currently, a missing __O_TMPFILE was only defined for i386 and x86_64,
leaving any other architectures with an "old" toolchain fail miserably
at build time:
    src/import/export-raw.c: In function 'reflink_snapshot':
    src/import/export-raw.c:271:26: error: 'O_TMPFILE' undeclared (first use in this function)
             new_fd = open(d, O_TMPFILE|O_CLOEXEC|O_NOCTTY|O_RDWR, 0600);
                              ^

__O_TMPFILE (and O_TMPFILE) are available since glibc 2.19. However, a
lot of existing toolchains are still using glibc-2.18, and some even
before that, and it is not really possible to update those toolchains.

Instead of defining it only for i386 and x86_64, define __O_TMPFILE
with the specific values for those archs where it is different from the
generic value. Use the values as found in the Linux kernel (v4.8-rc3,
current as of time of commit).

6 years agobus-util: generalize helper for ID128 prpoerties
Lennart Poettering [Fri, 26 Aug 2016 17:20:02 +0000 (19:20 +0200)]
bus-util: generalize helper for ID128 prpoerties

This way, we can make use of this in other code, too.

6 years agostrv: fix STRV_FOREACH_BACKWARDS() to be a single statement only
Lennart Poettering [Fri, 26 Aug 2016 17:18:15 +0000 (19:18 +0200)]
strv: fix STRV_FOREACH_BACKWARDS() to be a single statement only

Let's make sure people invoking STRV_FOREACH_BACKWARDS() as a single statement
of an if statement don't fall into a trap, and find the tail for the list via
strv_length().

6 years agoexecute: move suppression of HOME=/ and SHELL=/bin/nologin into user-util.c
Lennart Poettering [Thu, 25 Aug 2016 08:24:10 +0000 (10:24 +0200)]
execute: move suppression of HOME=/ and SHELL=/bin/nologin into user-util.c

This adds a new call get_user_creds_clean(), which is just like
get_user_creds() but returns NULL in the home/shell parameters if they contain
no useful information. This code previously lived in execute.c, but by
generalizing this we can reuse it in run.c.

6 years agobus-util: turn on exit-on-disconnect for all command line tools
Lennart Poettering [Mon, 22 Aug 2016 15:21:27 +0000 (17:21 +0200)]
bus-util: turn on exit-on-disconnect for all command line tools

bus_connect_transport() is exclusively used from our command line tools, hence
let's set exit-on-disconnect for all of them, making behaviour a bit nicer in
case dbus-daemon goes down.

6 years agosd-bus: optionally, exit process or event loop on disconnect
Lennart Poettering [Mon, 22 Aug 2016 15:19:12 +0000 (17:19 +0200)]
sd-bus: optionally, exit process or event loop on disconnect

Old libdbus has a feature that the process is terminated whenever the the bus
connection receives a disconnect. This is pretty useful on desktop apps (where
a disconnect indicates session termination), as well as on command line apps
(where we really shouldn't stay hanging in most cases if dbus daemon goes
down).

Add a similar feature to sd-bus, but make it opt-in rather than opt-out, like
it is on libdbus. Also, if the bus is attached to an event loop just exit the
event loop rather than the the whole process.

6 years agosd-bus: when the server-side disconnects, make sure to dispatch all tracking objects...
Lennart Poettering [Mon, 22 Aug 2016 14:11:54 +0000 (16:11 +0200)]
sd-bus: when the server-side disconnects, make sure to dispatch all tracking objects immediately

If the server side kicks us from the bus, from our view no names are on the bus
anymore, hence let's make sure to dispatch all tracking objects immediately.

6 years agosd-bus: ensure we don't dispatch track objects while we are adding names to them
Lennart Poettering [Mon, 22 Aug 2016 14:09:15 +0000 (16:09 +0200)]
sd-bus: ensure we don't dispatch track objects while we are adding names to them

In order to add a name to a bus tracking object we need to do some bus
operations: we need to check if the name already exists and add match for it.
Both are synchronous bus calls. While processing those we need to make sure
that the tracking object is not dispatched yet, as it might still be empty, but
is not going to be empty for very long.

hence, block dispatching by removing the object from the dispatch queue while
adding it, and readding it on error.

6 years agosd-bus: split out handling of reply callbacks on close into its own function
Lennart Poettering [Mon, 22 Aug 2016 12:45:34 +0000 (14:45 +0200)]
sd-bus: split out handling of reply callbacks on close into its own function

When a bus connection is closed we dispatch all reply callbacks. Do so in a new
function if its own.

No behaviour changes.

6 years agoterminal-util: remove unnecessary check of result of isatty() (#4000)
0xAX [Fri, 19 Aug 2016 22:51:54 +0000 (01:51 +0300)]
terminal-util: remove unnecessary check of result of isatty() (#4000)

After the call of the isatty() we check its result twice in the
open_terminal(). There are no sense to check result of isatty() that
it is less than zero and return -errno, because as described in
documentation:

isatty() returns 1 if fd is an open file descriptor referring to a
terminal;  otherwise 0 is returned, and errno is set to indicate the
error.

So it can't be less than zero.

6 years agoterminal-util: use getenv_bool for $SYSTEMD_COLORS
Zbigniew Jędrzejewski-Szmek [Fri, 19 Aug 2016 14:26:27 +0000 (10:26 -0400)]
terminal-util: use getenv_bool for $SYSTEMD_COLORS

This changes the semantics a bit: before, SYSTEMD_COLORS= would be treated as
"yes", same as SYSTEMD_COLORS=xxx and SYSTEMD_COLORS=1, and only
SYSTEMD_COLORS=0 would be treated as "no". Now, only valid booleans are treated
as "yes". This actually matches how $SYSTEMD_COLORS was announced in NEWS.

6 years agojournald: do not create split journals for dynamic users
Zbigniew Jędrzejewski-Szmek [Fri, 19 Aug 2016 03:19:10 +0000 (23:19 -0400)]
journald: do not create split journals for dynamic users

Dynamic users should be treated like system users, and their logs
should end up in the main system journal.

6 years agologind: update empty and "infinity" handling for [User]TasksMax (#3835)
Tejun Heo [Fri, 19 Aug 2016 02:57:53 +0000 (22:57 -0400)]
logind: update empty and "infinity" handling for [User]TasksMax (#3835)

The parsing functions for [User]TasksMax were inconsistent.  Empty string and
"infinity" were interpreted as no limit for TasksMax but not accepted for
UserTasksMax.  Update them so that they're consistent with other knobs.

* Empty string indicates the default value.
* "infinity" indicates no limit.

While at it, replace opencoded (uint64_t) -1 with CGROUP_LIMIT_MAX in TasksMax
handling.

v2: Update empty string to indicate the default value as suggested by Zbigniew
    Jędrzejewski-Szmek.

v3: Fixed empty UserTasksMax handling.

6 years agoelogind: ignore lack of tty when checking whether colors should be enabled
Zbigniew Jędrzejewski-Szmek [Fri, 19 Aug 2016 02:03:56 +0000 (22:03 -0400)]
elogind: ignore lack of tty when checking whether colors should be enabled

When started by the kernel, we are connected to the console, and we'll set TERM
properly to some value in fixup_environment(). We'll then enable or disable
colors based on the value of $SYSTEMD_COLORS and $TERM.

When reexecuting, TERM should be already set, so we can use this value.
Effectively, behaviour is the same as before affd7ed1a was reverted, but instead
of reopening the console before configuring color output, we just ignore what
stdout is connected to and decide based on the variables only.

6 years agohostnamectl: rework pretty hostname validation (#3985)
Lennart Poettering [Fri, 19 Aug 2016 01:16:16 +0000 (03:16 +0200)]
hostnamectl: rework pretty hostname validation (#3985)

Rework 17eb9a9ddba3f03fcba33445c1c1eedeb948da04 a bit.

Let's make sure we don't clobber the input parameter args[1], following our
coding style to not clobber parameters unless explicitly indicated. (in
particular, as we don't want to have our changes appear in the command line
shown in "ps"...)

No functional change.

6 years agocore: cache last CPU usage counter, before destorying a cgroup
Lennart Poettering [Thu, 18 Aug 2016 18:58:10 +0000 (20:58 +0200)]
core: cache last CPU usage counter, before destorying a cgroup

It is useful for clients to be able to read the last CPU usage counter value of
a unit even if the unit is already terminated. Hence, before destroying a
cgroup's cgroup cache the last CPU usage counter and return it if the cgroup is
gone.

6 years agobus-util: make sure map_basic() returns EOPNOTSUPP if called for an unknown type
Lennart Poettering [Wed, 17 Aug 2016 17:04:35 +0000 (19:04 +0200)]
bus-util: make sure map_basic() returns EOPNOTSUPP if called for an unknown type

Make sure we return proper errors for types not understood yet.

6 years agobus-util: treat an empty string as a NULL
Lennart Poettering [Wed, 17 Aug 2016 17:03:44 +0000 (19:03 +0200)]
bus-util: treat an empty string as a NULL

Instead of ignoring empty strings retrieved via the bus, treat them as NULL, as
it's customary in elogind.

6 years agobus-util: support mapping signed integers with bus_map_properties()
Lennart Poettering [Wed, 17 Aug 2016 17:00:12 +0000 (19:00 +0200)]
bus-util: support mapping signed integers with bus_map_properties()

Let's make sure we can read the exit code/status properties exposed by PID 1
properly. Let's reuse the existing code for unsigned fields, as we just use it
to copy words around, and don't calculate it.

6 years agocore: rename cg_unified() to cg_all_unified()
Tejun Heo [Mon, 15 Aug 2016 22:13:36 +0000 (18:13 -0400)]
core: rename cg_unified() to cg_all_unified()

A following patch will update cgroup handling so that the elogind controller
(/sys/fs/cgroup/elogind) can use the unified hierarchy even if the kernel
resource controllers are on the legacy hierarchies.  This would require
distinguishing whether all controllers are on cgroup v2 or only the elogind
controller is.  In preparation, this patch renames cg_unified() to
cg_all_unified().

This patch doesn't cause any functional changes.

6 years agocore: use the unified hierarchy for the elogind cgroup controller hierarchy
Tejun Heo [Mon, 15 Aug 2016 22:13:36 +0000 (18:13 -0400)]
core: use the unified hierarchy for the elogind cgroup controller hierarchy

Currently, elogind uses either the legacy hierarchies or the unified hierarchy.
When the legacy hierarchies are used, elogind uses a named legacy hierarchy
mounted on /sys/fs/cgroup/elogind without any kernel controllers for process
management.  Due to the shortcomings in the legacy hierarchy, this involves a
lot of workarounds and complexities.

Because the unified hierarchy can be mounted and used in parallel to legacy
hierarchies, there's no reason for elogind to use a legacy hierarchy for
management even if the kernel resource controllers need to be mounted on legacy
hierarchies.  It can simply mount the unified hierarchy under
/sys/fs/cgroup/elogind and use it without affecting other legacy hierarchies.
This disables a significant amount of fragile workaround logics and would allow
using features which depend on the unified hierarchy membership such bpf cgroup
v2 membership test.  In time, this would also allow deleting the said
complexities.

This patch updates elogind so that it prefers the unified hierarchy for the
elogind cgroup controller hierarchy when legacy hierarchies are used for kernel
resource controllers.

* cg_unified(@controller) is introduced which tests whether the specific
  controller in on unified hierarchy and used to choose the unified hierarchy
  code path for process and service management when available.  Kernel
  controller specific operations remain gated by cg_all_unified().

* "elogind.legacy_elogind_cgroup_controller" kernel argument can be used to
  force the use of legacy hierarchy for elogind cgroup controller.

* nspawn: By default nspawn uses the same hierarchies as the host.  If
  UNIFIED_CGROUP_HIERARCHY is set to 1, unified hierarchy is used for all.  If
  0, legacy for all.

* nspawn: arg_unified_cgroup_hierarchy is made an enum and now encodes one of
  three options - legacy, only elogind controller on unified, and unified.  The
  value is passed into mount setup functions and controls cgroup configuration.

* nspawn: Interpretation of SYSTEMD_CGROUP_CONTROLLER to the actual mount
  option is moved to mount_legacy_cgroup_hierarchy() so that it can take an
  appropriate action depending on the configuration of the host.

v2: - CGroupUnified enum replaces open coded integer values to indicate the
      cgroup operation mode.
    - Various style updates.

v3: Fixed a bug in detect_unified_cgroup_hierarchy() introduced during v2.

v4: Restored legacy container on unified host support and fixed another bug in
    detect_unified_cgroup_hierarchy().

6 years agocore: add Ref()/Unref() bus calls for units
Lennart Poettering [Mon, 15 Aug 2016 16:12:01 +0000 (18:12 +0200)]
core: add Ref()/Unref() bus calls for units

This adds two (privileged) bus calls Ref() and Unref() to the Unit interface.
The two calls may be used by clients to pin a unit into memory, so that various
runtime properties aren't flushed out by the automatic GC. This is necessary
to permit clients to race-freely acquire runtime results (such as process exit
status/code or accumulated CPU time) on successful service termination.

Ref() and Unref() are fully recursive, hence act like the usual reference
counting concept in C. Taking a reference is a privileged operation, as this
allows pinning units into memory which consumes resources.

Transient units may also gain a reference at the time of creation, via the new
AddRef property (that is only defined for transient units at the time of
creation).

6 years agosd-bus: add a "recursive" mode to sd_bus_track
Lennart Poettering [Mon, 15 Aug 2016 12:58:09 +0000 (14:58 +0200)]
sd-bus: add a "recursive" mode to sd_bus_track

This adds an optional "recursive" counting mode to sd_bus_track. If enabled
adding the same name multiple times to an sd_bus_track object is counted
individually, so that it also has to be removed the same number of times before
it is gone again from the tracking object.

This functionality is useful for implementing local ref counted objects that
peers make take references on.

6 years agocore: add cgroup CPU controller support on the unified hierarchy
Tejun Heo [Sun, 7 Aug 2016 13:45:39 +0000 (09:45 -0400)]
core: add cgroup CPU controller support on the unified hierarchy

Unfortunately, due to the disagreements in the kernel development community,
CPU controller cgroup v2 support has not been merged and enabling it requires
applying two small out-of-tree kernel patches.  The situation is explained in
the following documentation.

 https://git.kernel.org/cgit/linux/kernel/git/tj/cgroup.git/tree/Documentation/cgroup-v2-cpu.txt?h=cgroup-v2-cpu

While it isn't clear what will happen with CPU controller cgroup v2 support,
there are critical features which are possible only on cgroup v2 such as
buffered write control making cgroup v2 essential for a lot of workloads.  This
commit implements elogind CPU controller support on the unified hierarchy so
that users who choose to deploy CPU controller cgroup v2 support can easily
take advantage of it.

On the unified hierarchy, "cpu.weight" knob replaces "cpu.shares" and "cpu.max"
replaces "cpu.cfs_period_us" and "cpu.cfs_quota_us".  [Startup]CPUWeight config
options are added with the usual compat translation.  CPU quota settings remain
unchanged and apply to both legacy and unified hierarchies.

v2: - Error in man page corrected.
    - CPU config application in cgroup_context_apply() refactored.
    - CPU accounting now works on unified hierarchy.

6 years agoadd a new tool for creating transient mount and automount units
Lennart Poettering [Fri, 5 Aug 2016 22:32:46 +0000 (00:32 +0200)]
add a new tool for creating transient mount and automount units

This adds "elogind-mount" which is for transient mount and automount units what
"elogind-run" is for transient service, scope and timer units.

The tool allows establishing mounts and automounts during runtime. It is very
similar to the usual /bin/mount commands, but can pull in additional
dependenices on access (for example, it pulls in fsck automatically), an take
benefit of the automount logic.

This tool is particularly useful for mount removable file systems (such as USB
sticks), as the automount logic (together with automatic unmount-on-idle), as
well as automatic fsck on first access ensure that the removable file system
has a high chance to remain in a fully clean state even when it is unplugged
abruptly, and returns to a clean state on the next re-plug.

This is a follow-up for #2471, as it adds a simple client-side for the
transient automount logic added in that PR.

In later work it might make sense to invoke this tool automatically from udev
rules in order to implement a simpler and safer version of removable media
management á la udisks.

6 years agoutil-lib: unify parsing of nice level values
Lennart Poettering [Fri, 5 Aug 2016 09:17:08 +0000 (11:17 +0200)]
util-lib: unify parsing of nice level values

This adds parse_nice() that parses a nice level and ensures it is in the right
range, via a new nice_is_valid() helper. It then ports over a number of users
to this.

No functional changes.

6 years agofileio: fix MIN/MAX mixup (#3896)
Vito Caputo [Fri, 5 Aug 2016 04:09:23 +0000 (21:09 -0700)]
fileio: fix MIN/MAX mixup (#3896)

The intention is to clamp the value to READ_FULL_BYTES_MAX, which
would be the minimum of the two.

6 years agobasic/set: remove some spurious spaces
Zbigniew Jędrzejewski-Szmek [Fri, 5 Aug 2016 00:36:10 +0000 (20:36 -0400)]
basic/set: remove some spurious spaces

6 years agofileio: fix read_full_stream() bugs (#3887)
Vito Caputo [Thu, 4 Aug 2016 20:52:02 +0000 (13:52 -0700)]
fileio: fix read_full_stream() bugs (#3887)

read_full_stream() _always_ allocated twice the memory needed, due to
only breaking the realloc() && fread() loop when fread() returned 0,
requiring another iteration and exponentially enlarged buffer just to
discover the EOF condition.

This also caused file sizes >2MiB && <= 4MiB to erroneously be treated
as E2BIG, due to the inappropriately doubled buffer size exceeding
4*1024*1024.

Also made the 4*1024*1024 magic number a READ_FULL_BYTES_MAX constant.

6 years agoutil-lib: add parse_percent_unbounded() for percentages over 100% (#3886)
David Michael [Thu, 4 Aug 2016 11:09:54 +0000 (04:09 -0700)]
util-lib: add parse_percent_unbounded() for percentages over 100% (#3886)

This permits CPUQuota to accept greater values as documented.

6 years agoutil-lib: make timestamp generation and parsing reversible (#3869)
Lennart Poettering [Wed, 3 Aug 2016 23:04:53 +0000 (01:04 +0200)]
util-lib: make timestamp generation and parsing reversible (#3869)

This patch improves parsing and generation of timestamps and calendar
specifications in two ways:

- The week day is now always printed in the abbreviated English form, instead
  of the locale's setting. This makes sure we can always parse the week day
  again, even if the locale is changed. Given that we don't follow locale
  settings for printing timestamps in any other way either (for example, we
  always use 24h syntax in order to make uniform parsing possible), it only
  makes sense to also stick to a generic, non-localized form for the timestamp,
  too.

- When parsing a timestamp, the local timezone (in its DST or non-DST name)
  may be specified, in addition to "UTC". Other timezones are still not
  supported however (not because we wouldn't want to, but mostly because libc
  offers no nice API for that). In itself this brings no new features, however
  it ensures that any locally formatted timestamp's timezone is also parsable
  again.

These two changes ensure that the output of format_timestamp() may always be
passed to parse_timestamp() and results in the original input. The related
flavours for usec/UTC also work accordingly. Calendar specifications are
extended in a similar way.

The man page is updated accordingly, in particular this removes the claim that
timestamps elogind prints wouldn't be parsable by elogind. They are now.

The man page previously showed invalid timestamps as examples. This has been
removed, as the man page shouldn't be a unit test, where such negative examples
would be useful. The man page also no longer mentions the names of internal
functions, such as format_timestamp_us() or UNIX error codes such as EINVAL.

6 years agoclean-ipc: debug log about all remove IPC objects
Lennart Poettering [Tue, 2 Aug 2016 09:14:56 +0000 (11:14 +0200)]
clean-ipc: debug log about all remove IPC objects

6 years agocore: add RemoveIPC= setting
Lennart Poettering [Mon, 1 Aug 2016 17:24:40 +0000 (19:24 +0200)]
core: add RemoveIPC= setting

This adds the boolean RemoveIPC= setting to service, socket, mount and swap
units (i.e.  all unit types that may invoke processes). if turned on, and the
unit's user/group is not root, all IPC objects of the user/group are removed
when the service is shut down. The life-cycle of the IPC objects is hence bound
to the unit life-cycle.

This is particularly relevant for units with dynamic users, as it is essential
that no objects owned by the dynamic users survive the service exiting. In
fact, this patch adds code to imply RemoveIPC= if DynamicUser= is set.

In order to communicate the UID/GID of an executed process back to PID 1 this
adds a new "user lookup" socket pair, that is inherited into the forked
processes, and closed before the exec(). This is needed since we cannot do NSS
from PID 1 due to deadlock risks, However need to know the used UID/GID in
order to clean up IPC owned by it if the unit shuts down.

6 years agovirt: detect bhyve (FreeBSD hypervisor) (#3840)
Leonardo Brondani Schenkel [Mon, 1 Aug 2016 13:04:49 +0000 (15:04 +0200)]
virt: detect bhyve (FreeBSD hypervisor) (#3840)

The CPUID and DMI vendor strings do not seem to be documented.
Values were found experimentally and by inspecting the source code.

6 years agoclean-ipc: shorten code a bit
Lennart Poettering [Thu, 28 Jul 2016 07:51:47 +0000 (09:51 +0200)]
clean-ipc: shorten code a bit

6 years agoclean-ipc: don't filter out '.' and '..' twice
Lennart Poettering [Thu, 28 Jul 2016 07:51:25 +0000 (09:51 +0200)]
clean-ipc: don't filter out '.' and '..' twice

6 years agocore: inherit TERM from PID 1 for all services started on /dev/console
Lennart Poettering [Wed, 27 Jul 2016 13:25:55 +0000 (15:25 +0200)]
core: inherit TERM from PID 1 for all services started on /dev/console

This way, invoking nspawn from a shell in the best case inherits the TERM
setting all the way down into the login shell spawned in the container.

Fixes: #3697
6 years agostring-util: rework memory_erase() to not use GCC optimize attribute (#3812)
Michael Biebl [Wed, 27 Jul 2016 03:32:37 +0000 (05:32 +0200)]
string-util: rework memory_erase() to not use GCC optimize attribute (#3812)

"#pragma GCC optimize" is merely a convenience to decorate multiple
functions with attribute optimize. And the manual has this to say about
this attribute:

  This attribute should be used for debugging purposes only. It
  is not suitable in production code.

Some versions of GCC also seem to have a problem with this pragma in
combination with LTO, resulting in ICEs.

So use a different approach (indirect the memset call via a volatile
function pointer) as implemented in openssl's crypto/mem_clr.c.

Closes: #3811
6 years agoutil-lib: rework /tmp and /var/tmp handling code
Lennart Poettering [Tue, 26 Jul 2016 15:23:28 +0000 (17:23 +0200)]
util-lib: rework /tmp and /var/tmp handling code

Beef up the existing var_tmp() call, rename it to var_tmp_dir() and add a
matching tmp_dir() call (the former looks for the place for /var/tmp, the
latter for /tmp).

Both calls check $TMPDIR, $TEMP, $TMP, following the algorithm Python3 uses.
All dirs are validated before use. secure_getenv() is used in order to limite
exposure in suid binaries.

This also ports a couple of users over to these new APIs.

The var_tmp() return parameter is changed from an allocated buffer the caller
will own to a const string either pointing into environ[], or into a static
const buffer. Given that environ[] is mostly considered constant (and this is
exposed in the very well-known getenv() call), this should be OK behaviour and
allows us to avoid memory allocations in most cases.

Note that $TMPDIR and friends override both /var/tmp and /tmp usage if set.

6 years agoAdd enable_disable() helper
Zbigniew Jędrzejewski-Szmek [Sun, 24 Jul 2016 18:12:58 +0000 (14:12 -0400)]
Add enable_disable() helper

In this patch "enabled" and "disabled" is used exclusively, but "enable" and
"disable" forms are need for the following patch.

6 years agobootctl: move toupper() implementation to string-util.h
Lennart Poettering [Tue, 19 Jul 2016 18:43:54 +0000 (20:43 +0200)]
bootctl: move toupper() implementation to string-util.h

We already have tolower() calls there, hence let's unify this at one place.
Also, update the code to only use ASCII operations, so that we don't end up
being locale dependant.

6 years agocore: add a concept of "dynamic" user ids, that are allocated as long as a service...
Lennart Poettering [Thu, 14 Jul 2016 10:37:28 +0000 (12:37 +0200)]
core: add a concept of "dynamic" user ids, that are allocated as long as a service is running

This adds a new boolean setting DynamicUser= to service files. If set, a new
user will be allocated dynamically when the unit is started, and released when
it is stopped. The user ID is allocated from the range 61184..65519. The user
will not be added to /etc/passwd (but an NSS module to be added later should
make it show up in getent passwd).

For now, care should be taken that the service writes no files to disk, since
this might result in files owned by UIDs that might get assigned dynamically to
a different service later on. Later patches will tighten sandboxing in order to
ensure that this cannot happen, except for a few selected directories.

A simple way to test this is:

        elogind-run -p DynamicUser=1 /bin/sleep 99999

6 years agosysusers: move various user credential validity checks to src/basic/
Lennart Poettering [Thu, 14 Jul 2016 10:23:39 +0000 (12:23 +0200)]
sysusers: move various user credential validity checks to src/basic/

This way we can reuse them for validating User=/Group= settings in unit files
(to be added in a later commit).

Also, add some tests for them.

6 years agocore: introduce MemorySwapMax=
WaLyong Cho [Mon, 4 Jul 2016 07:03:54 +0000 (07:03 +0000)]
core: introduce MemorySwapMax=

Similar to MemoryMax=, MemorySwapMax= limits swap usage. This controls
controls "memory.swap.max" attribute in unified cgroup.

6 years agocgroup: detect cgroup namespaces
Christian Brauner [Thu, 23 Jun 2016 09:52:45 +0000 (11:52 +0200)]
cgroup: detect cgroup namespaces

- define CLONE_NEWCGROUP
- add fun to detect whether cgroup namespaces are supported

6 years agoRevert "build-sys: hide magic section variables from exported symbols"
David Herrmann [Wed, 22 Jul 2015 09:16:44 +0000 (11:16 +0200)]
Revert "build-sys: hide magic section variables from exported symbols"

This reverts commit aac7c5ed8bc6ffaba417b9c0b87bcf342865431b. This
visibility bug originated in ld.gold and has been fixed upstream:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=5417c94d1a944d1a27f99240e5d62a6d7cd324f1

6 years agoMerge pull request #21 from elogind/v231-stable
Sven Eden [Mon, 3 Jul 2017 13:31:42 +0000 (15:31 +0200)]
Merge pull request #21 from elogind/v231-stable

V231 stable

6 years agoMerge pull request #19 from elogind/dev_v231
Sven Eden [Mon, 3 Jul 2017 13:28:24 +0000 (15:28 +0200)]
Merge pull request #19 from elogind/dev_v231

Merge dev_v231 into master

6 years agoVersion 231.4 Release v231.4
Sven Eden [Mon, 3 Jul 2017 13:21:43 +0000 (15:21 +0200)]
Version 231.4 Release

6 years agoRe-add the saving of the user state file when creating a new session.
Sven Eden [Mon, 3 Jul 2017 12:48:37 +0000 (14:48 +0200)]
Re-add the saving of the user state file when creating a new session.

6 years agoVersion v231.3 v231.3
Sven Eden [Thu, 29 Jun 2017 11:49:09 +0000 (13:49 +0200)]
Version v231.3

6 years agoPrep v231.3: libelogind-shared.so does not need to be installed.
Sven Eden [Thu, 29 Jun 2017 13:20:30 +0000 (15:20 +0200)]
Prep v231.3: libelogind-shared.so does not need to be installed.

6 years agoPrep v231.3: Fix typo in README
Sven Eden [Thu, 29 Jun 2017 11:36:08 +0000 (13:36 +0200)]
Prep v231.3: Fix typo in README

6 years agoPrep v231.3: libelogind-internal does not need to link against libresolv
Sven Eden [Thu, 29 Jun 2017 10:32:26 +0000 (12:32 +0200)]
Prep v231.3: libelogind-internal does not need to link against libresolv

6 years agoPrep v231.3: Add --with-cgroup-controller=name to configure
Sven Eden [Thu, 29 Jun 2017 09:14:20 +0000 (11:14 +0200)]
Prep v231.3: Add --with-cgroup-controller=name to configure

This option can be used, if elogind is built while a different cgroup
controller than planned is active.
A valid scenario could be a gentoo user switching from systemd to
openrc+elogind.

6 years agoPrep v231.3: Only ask for reboot authorization when shutting down or rebooting.
Sven Eden [Thu, 29 Jun 2017 08:06:25 +0000 (10:06 +0200)]
Prep v231.3: Only ask for reboot authorization when shutting down or rebooting.

It is not needed to ask for authorization to put the system to sleep.
Such a system is most commonly a single-user laptop, and no user,
especially me, wants to enter the root password after hitting the
suspend key. ;-)

6 years agoPrep v231.3: No authorization for setting the wall message.
Sven Eden [Thu, 29 Jun 2017 08:03:32 +0000 (10:03 +0200)]
Prep v231.3: No authorization for setting the wall message.

elogind only calls this when shutting down, rebooting or cancelling a
pending shutdown/reboot. Authorization is already needed there, so do
not question the user twice, just because they forgot to sudo.

6 years agoVersion v231.2
Sven Eden [Thu, 29 Jun 2017 08:02:40 +0000 (10:02 +0200)]
Version v231.2

6 years agoPrep v231.2: Make sure logs go to syslog or kmsg if elogind was started in debug...
Sven Eden [Wed, 28 Jun 2017 16:56:23 +0000 (18:56 +0200)]
Prep v231.2: Make sure logs go to syslog or kmsg if elogind was started in debug mode, even if it was started from a tty.

6 years agoPrep v231.2: Minor changes to make future patching easier.
Sven Eden [Wed, 28 Jun 2017 08:48:10 +0000 (10:48 +0200)]
Prep v231.2: Minor changes to make future patching easier.

6 years agoPrep v231.2: Move elogind specific code in logind-dbus.c to elogind-dbus.c
Sven Eden [Wed, 28 Jun 2017 08:41:24 +0000 (10:41 +0200)]
Prep v231.2: Move elogind specific code in logind-dbus.c to elogind-dbus.c

6 years agoPrep v231.2: Do not set a wall message when suspending (none there anyway)
Sven Eden [Wed, 28 Jun 2017 05:49:45 +0000 (07:49 +0200)]
Prep v231.2: Do not set a wall message when suspending (none there anyway)

6 years agoPrep v231.2: elogind is a stand-alone daemon, so do not exit if suspending the system...
Sven Eden [Tue, 27 Jun 2017 06:25:23 +0000 (08:25 +0200)]
Prep v231.2: elogind is a stand-alone daemon, so do not exit if suspending the system fails.

6 years agoPrep v231.2: Send processes the wakeup signal, even if suspending the system failed.
Sven Eden [Tue, 27 Jun 2017 06:05:27 +0000 (08:05 +0200)]
Prep v231.2: Send processes the wakeup signal, even if suspending the system failed.

6 years agoPrep v231.2: Only check time and wall arguments for shutdown and reboot.
Sven Eden [Mon, 26 Jun 2017 17:09:25 +0000 (19:09 +0200)]
Prep v231.2: Only check time and wall arguments for shutdown and reboot.

6 years agoPrep v231.2: elogind_log_special() : Add missing case breaks.
Sven Eden [Mon, 26 Jun 2017 16:39:03 +0000 (18:39 +0200)]
Prep v231.2: elogind_log_special() : Add missing case breaks.

6 years agoPrep v231.2: Add mor debug messages to find out, why 'loginctl suspend' isn't working.
Sven Eden [Mon, 26 Jun 2017 07:03:51 +0000 (09:03 +0200)]
Prep v231.2: Add mor debug messages to find out, why 'loginctl suspend' isn't working.

6 years agoPrep v231.2: Really set an extra wall message (if any) and display it when cancelling...
Sven Eden [Mon, 26 Jun 2017 06:18:53 +0000 (08:18 +0200)]
Prep v231.2: Really set an extra wall message (if any) and display it when cancelling a pending shutdown/reboot

6 years agoPrep v231.2: loginctl: Move check for cancelling a scheduled shutdown to allow extra...
Sven Eden [Mon, 26 Jun 2017 06:03:24 +0000 (08:03 +0200)]
Prep v231.2: loginctl: Move check for cancelling a scheduled shutdown to allow extra wall messages.

6 years agoPrep v231.2: Add log messages for loginctl invoking system commands.
Sven Eden [Thu, 22 Jun 2017 16:22:58 +0000 (18:22 +0200)]
Prep v231.2: Add log messages for loginctl invoking system commands.