]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
4 years agovirt: Detect proot virtualisation by ptrace metadata
Chris Down [Tue, 14 Apr 2020 17:15:04 +0000 (18:15 +0100)] 
virt: Detect proot virtualisation by ptrace metadata

proot provides userspace-powered emulation of chroot and mount --bind,
lending it to be used on environments without unprivileged user
namespaces, or in otherwise restricted environments like Android.

In order to achieve this, proot makes use of the kernel's ptrace()
facility, which we can use in order to detect its presence. Since it
doesn't use any kind of namespacing, including PID namespacing, we don't
need to do any tricks when trying to get the tracer's metadata.

For our purposes, proot is listed as a "container", since we mostly use
this also as the bucket for non-container-but-container-like
technologies like WSL. As such, it seems like a good fit for this
section as well.

4 years agoMerge pull request #15431 from poettering/lock-and-key-emoji
Lennart Poettering [Wed, 15 Apr 2020 15:55:21 +0000 (17:55 +0200)] 
Merge pull request #15431 from poettering/lock-and-key-emoji

display lock/key emoji when prompting for passwords

4 years agoman: update os-release(5) to use 24bit ANSI color in example
Lennart Poettering [Mon, 13 Apr 2020 07:20:25 +0000 (09:20 +0200)] 
man: update os-release(5) to use 24bit ANSI color in example

Given that ANSI_COLOR= is mostly about branding it probably makes sense
to use RGB rather than paletted colors for them, so that the colors
match the project design as close as possible. Hence, provide a 25bit
RGB example for ANSI_COLOR, and update the overall example to something
newer.

Also see: https://bugzilla.redhat.com/show_bug.cgi?id=1823099

4 years agomeson,resolved: make default LLMNR= and MulticastDNS= values configurable
Zbigniew Jędrzejewski-Szmek [Tue, 14 Apr 2020 20:18:18 +0000 (22:18 +0200)] 
meson,resolved: make default LLMNR= and MulticastDNS= values configurable

For https://fedoraproject.org/wiki/Changes/systemd-resolved.

4 years agoask-password-api: reword some debug messages 15431/head
Lennart Poettering [Wed, 15 Apr 2020 10:01:03 +0000 (12:01 +0200)] 
ask-password-api: reword some debug messages

Otherwise, seeing this in the log output is confusing since we don't
know what kind of timeout or what kind if key we are adjusting here.

4 years agoask-password: prefix password questions with lock and key emoji
Lennart Poettering [Wed, 15 Apr 2020 09:59:30 +0000 (11:59 +0200)] 
ask-password: prefix password questions with lock and key emoji

It's pretty, and it highlights that the pw prompt is kinda special and
needs user input.

We suppress the emoji entirel if there's no emoji support (i.e. this
means we suppress the ASCII replacement), since it carries no additional
information, it is just decoration to highlight a line.

4 years agolocale-util: export emoji_enable() for other code to use
Lennart Poettering [Wed, 15 Apr 2020 09:59:06 +0000 (11:59 +0200)] 
locale-util: export emoji_enable() for other code to use

4 years agolocale-util: add support for lock+key emoji
Lennart Poettering [Wed, 15 Apr 2020 09:58:25 +0000 (11:58 +0200)] 
locale-util: add support for lock+key emoji

It looks pretty nice on gnome-terminal at least, let's make use of it
when asking for passwords.

4 years agoverify: ignore nonexistent executables if required
Giedrius Statkevičius [Tue, 7 Apr 2020 21:38:16 +0000 (00:38 +0300)] 
verify: ignore nonexistent executables if required

We provide a way via the '-' symbol to ignore errors when nonexistent
executable files are passed to Exec* parameters & so on. In such a case,
the flag `EXEC_COMMAND_IGNORE_FAILURE` is set and we go on happily with
our life if that happens. However, `systemd-analyze verify` complained
about missing executables even in such a case. In such a case it is not
an error for this to happen so check if the flag is set before checking
if the file is accessible and executable.

Add some small tests to check this condition.

Closes #15218.

4 years agoAdd meson build option to prevent building kernel-install
Jakov Smolic [Sat, 11 Apr 2020 12:32:52 +0000 (14:32 +0200)] 
Add meson build option to prevent building kernel-install

This commit introduces new meson build option "kernel-install" to prevent kernel-install from building if the user
sets the added option as "false".
Signed-off-by: Jakov Smolic <jakov.smolic@sartura.hr>
Signed-off-by: Luka Perkov <luka.perkov@sartura.hr>
4 years agoMerge pull request #15417 from poettering/fileno-can-fail
Zbigniew Jędrzejewski-Szmek [Tue, 14 Apr 2020 10:54:27 +0000 (12:54 +0200)] 
Merge pull request #15417 from poettering/fileno-can-fail

fileio: fileno() can realistically return -1

4 years agoMerge pull request #15414 from mrc0mmand/coredumpctl-file
Anita Zhang [Mon, 13 Apr 2020 20:54:24 +0000 (13:54 -0700)] 
Merge pull request #15414 from mrc0mmand/coredumpctl-file

coredumpctl: support --file=PATH

4 years agoFix pam_systemd_home's debug parameter to match man page description
Joel Shapiro [Sun, 12 Apr 2020 05:40:17 +0000 (00:40 -0500)] 
Fix pam_systemd_home's debug parameter to match man page description

4 years agosd-network: DHCPv6 - Add status codes
Susant Sahani [Mon, 13 Apr 2020 10:17:22 +0000 (12:17 +0200)] 
sd-network: DHCPv6 - Add status codes

https://www.iana.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xhtml#dhcpv6-parameters-5

4 years agocore: make sure ProtectHostname= is handled gracefully in containers lacking seccomp
Lennart Poettering [Mon, 13 Apr 2020 09:38:34 +0000 (11:38 +0200)] 
core: make sure ProtectHostname= is handled gracefully in containers lacking seccomp

Fixes: #15408
4 years agocoredumpctl: support --file=PATH 15414/head
Frantisek Sumsal [Sun, 12 Apr 2020 18:39:09 +0000 (20:39 +0200)] 
coredumpctl: support --file=PATH

Let's match journalctl's functionality by throwing --file for
coredumpctl into the mix, so we can work on a single journal file
as well.

4 years agoupdate TODO
Lennart Poettering [Mon, 13 Apr 2020 12:31:46 +0000 (14:31 +0200)] 
update TODO

4 years agohwdb: optimize isatty()-per-line away 15417/head
Lennart Poettering [Mon, 13 Apr 2020 09:26:15 +0000 (11:26 +0200)] 
hwdb: optimize isatty()-per-line away

Fixes: #15407
4 years agofileio: extend comment a bit
Lennart Poettering [Mon, 13 Apr 2020 09:25:43 +0000 (11:25 +0200)] 
fileio: extend comment a bit

4 years agofileio: optionally allow telling read_line_full() whether we are processing a tty...
Lennart Poettering [Mon, 13 Apr 2020 09:20:59 +0000 (11:20 +0200)] 
fileio: optionally allow telling read_line_full() whether we are processing a tty or not

4 years agofileio: fileno() can realistically return -1
Lennart Poettering [Mon, 13 Apr 2020 08:09:44 +0000 (10:09 +0200)] 
fileio: fileno() can realistically return -1

An stdio FILE* stream usually refers to something with a file
descriptor, but that's just "usually". It doesn't have to, when taking
fmemopen() and similar into account. Most of our calls to fileno()
assumed the call couldn't fail. In most cases this was correct, but in
some cases where we didn't know whether we work on files or memory we'd
use the returned fd as if it was unconditionally valid while it wasn't,
and passed it to a multitude of kernel syscalls. Let's fix that, and do
something reasonably smart when encountering this case.

(Running test-fileio with this patch applied will remove tons of ioctl()
calls on -1).

4 years agoMerge pull request #15411 from ssahani/systemd-issue-15375
Lennart Poettering [Mon, 13 Apr 2020 08:58:38 +0000 (10:58 +0200)] 
Merge pull request #15411 from ssahani/systemd-issue-15375

sd-network: DHCPv6 - Add NoPrefixAvail to error code

4 years agoMerge pull request #15397 from ssahani/vxlan
Lennart Poettering [Mon, 13 Apr 2020 08:47:40 +0000 (10:47 +0200)] 
Merge pull request #15397 from ssahani/vxlan

network: VXlan group and remote fixes

4 years agoRemove unneded {}s
Zbigniew Jędrzejewski-Szmek [Sun, 12 Apr 2020 16:26:05 +0000 (18:26 +0200)] 
Remove unneded {}s

$ perl -i -0pe 's|\s+{\n([^\n]*;)\n\s+}\n|\n\1\n|gms' **/*.c

Inspired by ea7cbf5bdd68d7861ebf1570c439e8bbabd83f6c.

4 years agosd-network: DHCP6 - Use readable error status rather than numeric 15411/head
Susant Sahani [Mon, 13 Apr 2020 03:04:22 +0000 (05:04 +0200)] 
sd-network: DHCP6 - Use readable error status rather than numeric
value in the log message

4 years agoMerge pull request #15281 from keszybz/functional-test-rework
Zbigniew Jędrzejewski-Szmek [Sun, 12 Apr 2020 17:31:53 +0000 (19:31 +0200)] 
Merge pull request #15281 from keszybz/functional-test-rework

Post-merge tweaks to the functional tests

4 years agoMerge pull request #15406 from DaanDeMeyer/sd-bus-set-exec-docs
Zbigniew Jędrzejewski-Szmek [Sun, 12 Apr 2020 16:38:49 +0000 (18:38 +0200)] 
Merge pull request #15406 from DaanDeMeyer/sd-bus-set-exec-docs

Add sd_bus_set_exec docs

4 years agosd-bus: Add sd_bus_set_exec docs 15406/head
Daan De Meyer [Sat, 11 Apr 2020 19:57:36 +0000 (21:57 +0200)] 
sd-bus: Add sd_bus_set_exec docs

4 years agohome: switch to BusLocator-oriented helpers
Vito Caputo [Sat, 4 Apr 2020 13:36:51 +0000 (06:36 -0700)] 
home: switch to BusLocator-oriented helpers

Remove some unnecessary verbosity, largely mechanical change with
no functional difference.

4 years agohwdb: Add accel orientation quirk for Geoflex laptop
Ross Lagerwall [Sat, 11 Apr 2020 16:01:37 +0000 (17:01 +0100)] 
hwdb: Add accel orientation quirk for Geoflex laptop

Add a quirk to fix the accelerometer orientation on the Geoflex laptop
so that the display is upright rather than upside-down.

4 years agoMerge pull request #15365 from poettering/remount-fs-pstore-fix
Zbigniew Jędrzejewski-Szmek [Sun, 12 Apr 2020 15:16:07 +0000 (17:16 +0200)] 
Merge pull request #15365 from poettering/remount-fs-pstore-fix

pid1: automatically generate systemd-remount-fs.service deps, plus enable systemd-pstore from sysinit.target

4 years agoMerge pull request #15405 from DaanDeMeyer/sd-bus-can-send-docs
Zbigniew Jędrzejewski-Szmek [Sun, 12 Apr 2020 15:05:05 +0000 (17:05 +0200)] 
Merge pull request #15405 from DaanDeMeyer/sd-bus-can-send-docs

Add sd_bus_can_send docs

4 years agoMerge pull request #15399 from DaanDeMeyer/sd-bus-property-docs
Zbigniew Jędrzejewski-Szmek [Sun, 12 Apr 2020 15:02:55 +0000 (17:02 +0200)] 
Merge pull request #15399 from DaanDeMeyer/sd-bus-property-docs

sd_bus_get/set_property docs

4 years agosd-network: DHCPv6 - Add NoPrefixAvail to error code
Susant Sahani [Sun, 12 Apr 2020 12:14:52 +0000 (14:14 +0200)] 
sd-network: DHCPv6 - Add NoPrefixAvail to error code

4 years agosd-bus: Use pointer syntax for sd_bus_set_exec argv parameter
Daan De Meyer [Sat, 11 Apr 2020 19:57:28 +0000 (21:57 +0200)] 
sd-bus: Use pointer syntax for sd_bus_set_exec argv parameter

4 years agosd-bus: Add sd_bus_can_send docs 15405/head
Daan De Meyer [Sat, 11 Apr 2020 19:25:39 +0000 (21:25 +0200)] 
sd-bus: Add sd_bus_can_send docs

4 years agosd-bus: Fix sd_bus_close.xml line wrapping
Daan De Meyer [Sat, 11 Apr 2020 19:09:05 +0000 (21:09 +0200)] 
sd-bus: Fix sd_bus_close.xml line wrapping

4 years agomeson: Exclude more deprecated functions from check-api-docs
Daan De Meyer [Sat, 11 Apr 2020 19:08:34 +0000 (21:08 +0200)] 
meson: Exclude more deprecated functions from check-api-docs

4 years agosd-bus: Add sd_bus_get/set_property docs 15399/head
Daan De Meyer [Fri, 10 Apr 2020 19:46:46 +0000 (21:46 +0200)] 
sd-bus: Add sd_bus_get/set_property docs

4 years agodocs: introduce documentation category for user/group stuff
Lennart Poettering [Sat, 11 Apr 2020 16:03:24 +0000 (18:03 +0200)] 
docs: introduce documentation category for user/group stuff

We have so many different docs on various facets of user/group stuff,
let's add our own category for it.

4 years agoMerge pull request #15376 from poettering/homed-btrfs-subvol-luks
Zbigniew Jędrzejewski-Szmek [Sat, 11 Apr 2020 14:26:01 +0000 (16:26 +0200)] 
Merge pull request #15376 from poettering/homed-btrfs-subvol-luks

homed: when doing luks homedir with btrfs inside, place subvol at top of fs

4 years agonetworkctl: Add support to display VXLan remote address 15397/head
Susant Sahani [Fri, 10 Apr 2020 13:50:23 +0000 (15:50 +0200)] 
networkctl: Add support to display VXLan remote address

4 years agoMerge pull request #15377 from poettering/userdb-no-shadow
Zbigniew Jędrzejewski-Szmek [Sat, 11 Apr 2020 14:08:33 +0000 (16:08 +0200)] 
Merge pull request #15377 from poettering/userdb-no-shadow

don't try to access shadow from logind

4 years agoMerge pull request #15392 from keszybz/flag-helper
Zbigniew Jędrzejewski-Szmek [Sat, 11 Apr 2020 14:05:11 +0000 (16:05 +0200)] 
Merge pull request #15392 from keszybz/flag-helper

Flag setting helper and some other minor cleanups

4 years agonetwork: VXLan - Add support for remote address
Susant Sahani [Fri, 10 Apr 2020 13:37:21 +0000 (15:37 +0200)] 
network: VXLan - Add support for remote address

4 years agosd-bus: sd_bus_message_append fixes
Daan De Meyer [Fri, 10 Apr 2020 19:31:29 +0000 (21:31 +0200)] 
sd-bus: sd_bus_message_append fixes

4 years agodocs: add some documentation about hooking up userdb/homed to desktop environments
Lennart Poettering [Thu, 9 Apr 2020 17:02:57 +0000 (19:02 +0200)] 
docs: add some documentation about hooking up userdb/homed to desktop environments

Prompted by some inquires from the GNOME camp. let's document this here,
since other DEs might be interested too.

4 years agoAdd yet another tiny helper to manipulate flags 15392/head
Zbigniew Jędrzejewski-Szmek [Thu, 9 Apr 2020 12:24:11 +0000 (14:24 +0200)] 
Add yet another tiny helper to manipulate flags

4 years agoman: fix garbled paragraph in systemd.network(3)
Zbigniew Jędrzejewski-Szmek [Wed, 8 Apr 2020 21:46:49 +0000 (23:46 +0200)] 
man: fix garbled paragraph in systemd.network(3)

The following message was emitted:

  "Element term in namespace  encountered in para, but no template matches."

4 years agobusctl: wrap long lines
Zbigniew Jędrzejewski-Szmek [Tue, 7 Apr 2020 09:17:34 +0000 (11:17 +0200)] 
busctl: wrap long lines

4 years agobusctl: use the pager everywhere
Zbigniew Jędrzejewski-Szmek [Tue, 7 Apr 2020 07:39:46 +0000 (09:39 +0200)] 
busctl: use the pager everywhere

There is no reason to assume that the user doesn't want the pager
even if they are looking at xml output or such.

4 years agoman: extend documentation of the suspend= switch of pam_systemd_home
Lennart Poettering [Thu, 9 Apr 2020 09:11:02 +0000 (11:11 +0200)] 
man: extend documentation of the suspend= switch of pam_systemd_home

As suggested on #15343.

Fixes: #15343
4 years agodocs: add brief document how to convert home directories to homed
Lennart Poettering [Thu, 9 Apr 2020 15:13:12 +0000 (17:13 +0200)] 
docs: add brief document how to convert home directories to homed

4 years agonetwork: VXLan - fix adding Group address
Susant Sahani [Fri, 10 Apr 2020 13:29:10 +0000 (15:29 +0200)] 
network: VXLan - fix adding Group address

4 years agologin: Fix incorrect reporting of CanMultiSession=no on non-seat0 seats
nerdopolis [Thu, 9 Apr 2020 21:22:07 +0000 (17:22 -0400)] 
login: Fix incorrect reporting of CanMultiSession=no on non-seat0 seats

4 years agobus: add sd_bus_message_new_method_call() helper
Vito Caputo [Fri, 10 Apr 2020 07:34:37 +0000 (00:34 -0700)] 
bus: add sd_bus_message_new_method_call() helper

adds BusLocator variant called bus_message_new_method_call()

4 years agobus: s/BusAddress/BusLocator/
Vito Caputo [Thu, 9 Apr 2020 16:54:32 +0000 (09:54 -0700)] 
bus: s/BusAddress/BusLocator/

Mechanical rename in response to
https://github.com/systemd/systemd/pull/15331#issuecomment-611472240

4 years agoMerge pull request #15379 from poettering/homed-man-ref-add
Anita Zhang [Thu, 9 Apr 2020 22:27:12 +0000 (15:27 -0700)] 
Merge pull request #15379 from poettering/homed-man-ref-add

man: reference pam_systemd_home man page from systemd-homed man page

4 years agoMerge pull request #15361 from mrc0mmand/yet-another-TEST-47-tweak
Anita Zhang [Thu, 9 Apr 2020 21:18:37 +0000 (14:18 -0700)] 
Merge pull request #15361 from mrc0mmand/yet-another-TEST-47-tweak

test: wait a bit after stopping the test service

4 years agobootctl: fix assert issue
Lennart Poettering [Thu, 9 Apr 2020 18:03:19 +0000 (20:03 +0200)] 
bootctl: fix assert issue

Follow-up for b46c3e4913f7f234039ebd8104446450917cab8d

4 years agodocs: fix typo now → not
Lennart Poettering [Thu, 9 Apr 2020 17:26:36 +0000 (19:26 +0200)] 
docs: fix typo now → not

4 years agodocs: add missing dash
Lennart Poettering [Thu, 9 Apr 2020 17:24:44 +0000 (19:24 +0200)] 
docs: add missing dash

4 years agoMerge pull request #15352 from poettering/user-group-name-valdity-rework
Lennart Poettering [Thu, 9 Apr 2020 16:49:22 +0000 (18:49 +0200)] 
Merge pull request #15352 from poettering/user-group-name-valdity-rework

user/group name validity rework

4 years agoMerge pull request #15318 from fbuihuu/inherit-umask-for-user-units
Lennart Poettering [Thu, 9 Apr 2020 15:15:55 +0000 (17:15 +0200)] 
Merge pull request #15318 from fbuihuu/inherit-umask-for-user-units

pid1: by default make user units inherit their umask from the user ma…

4 years agoMerge pull request #15332 from keszybz/coredump-filter
Lennart Poettering [Thu, 9 Apr 2020 15:15:26 +0000 (17:15 +0200)] 
Merge pull request #15332 from keszybz/coredump-filter

CoredumpFilter=

4 years agoman: reference pam_systemd_home man page from systemd-homed man page 15379/head
Lennart Poettering [Thu, 9 Apr 2020 15:11:20 +0000 (17:11 +0200)] 
man: reference pam_systemd_home man page from systemd-homed man page

They are very closely related after all.

4 years agologind: avoid shadow lookups when doing userdb client side 15377/head
Lennart Poettering [Thu, 9 Apr 2020 12:28:56 +0000 (14:28 +0200)] 
logind: avoid shadow lookups when doing userdb client side

Let's not trigger MACs needlessly.

Ideally everybody would turn on userdb, but if people insist in not
doing so, then let's not attempt to open shadow.

It's a bit ugly to implement this, since shadow information is more than
just passwords (but accound validity metadata), and thus userdb's own
"privieleged" scheme is orthogonal to this, but let's still do this for
the client side.

Fixes: #15105
4 years agouserdb: when doing client-side NSS look-ups optionally avoid shadow look-ups
Lennart Poettering [Thu, 9 Apr 2020 12:28:34 +0000 (14:28 +0200)] 
userdb: when doing client-side NSS look-ups optionally avoid shadow look-ups

4 years agopam-systemd-home: drop redundant newline
Lennart Poettering [Thu, 9 Apr 2020 12:27:57 +0000 (14:27 +0200)] 
pam-systemd-home: drop redundant newline

4 years agohwdb: Fix kbd brightness keys on Acer Predator PH 315-52
Jian-Hong Pan [Thu, 9 Apr 2020 08:20:36 +0000 (16:20 +0800)] 
hwdb: Fix kbd brightness keys on Acer Predator PH 315-52

Acer defines Fn+F9/10 as keyboard brightness down/up on Predator PH
315-52 laptop. So, add the quirk to correct key mappings.

4 years agopid1: by default make user units inherit their umask from the user manager 15318/head
Franck Bui [Fri, 3 Apr 2020 08:00:25 +0000 (10:00 +0200)] 
pid1: by default make user units inherit their umask from the user manager

This patch changes the way user managers set the default umask for the units it
manages.

Indeed one can expect that if user manager's umask is redefined through PAM
(via /etc/login.defs or pam_umask), all its children including the units it
spawns have their umask set to the new value.

Hence make user units inherit their umask value from their parent instead of
the hard coded value 0022 but allow them to override this value via their unit
file.

Note that reexecuting managers with 'systemctl daemon-reexec' after changing
UMask= has no effect. To take effect managers need to be restarted with
'systemct restart' instead. This behavior was already present before this
patch.

Fixes #6077.

4 years agomanager: also log at debug level failure to read oom_score_adj 15332/head
Zbigniew Jędrzejewski-Szmek [Thu, 9 Apr 2020 10:44:46 +0000 (12:44 +0200)] 
manager: also log at debug level failure to read oom_score_adj

4 years agomanager: add CoredumpFilter= setting
Zbigniew Jędrzejewski-Szmek [Sat, 4 Apr 2020 14:43:25 +0000 (16:43 +0200)] 
manager: add CoredumpFilter= setting

Fixes #6685.

4 years agoMerge pull request #15345 from keszybz/systemctl-show-spaces
Lennart Poettering [Thu, 9 Apr 2020 11:55:35 +0000 (13:55 +0200)] 
Merge pull request #15345 from keszybz/systemctl-show-spaces

Show Environment= entries with spaces in systemctl

4 years agoAdd parser and printer for coredump filter mask
Zbigniew Jędrzejewski-Szmek [Sat, 4 Apr 2020 13:02:12 +0000 (15:02 +0200)] 
Add parser and printer for coredump filter mask

4 years agohomed: when creating home directory as btrfs inside luks volume, place subvol inside it 15376/head
Lennart Poettering [Thu, 9 Apr 2020 09:57:15 +0000 (11:57 +0200)] 
homed: when creating home directory as btrfs inside luks volume, place subvol inside it

When managing a home directory as LUKS image we currently place a
directory at the top that contains the actual home directory (so that
the home directory of the user won't be cluttered by lost-found and
suchlike). On btrfs let's make that a subvol though. This is a good idea
so that possibly later on we can make use of this for automatic history
management.

Fixes: #15121
4 years agoimport: use our new btrfs_subvol_make_fallback() at two places
Lennart Poettering [Thu, 9 Apr 2020 09:57:00 +0000 (11:57 +0200)] 
import: use our new btrfs_subvol_make_fallback() at two places

4 years agobtrfs-util: define helper that creates a btrfs subvol if we can, and a directory...
Lennart Poettering [Thu, 9 Apr 2020 09:56:23 +0000 (11:56 +0200)] 
btrfs-util: define helper that creates a btrfs subvol if we can, and a directory as fallback

4 years agoman: add missing varname around keywords in systemd.unit.xml
Luca Boccassi [Thu, 9 Apr 2020 09:51:23 +0000 (10:51 +0100)] 
man: add missing varname around keywords in systemd.unit.xml

4 years agoman: explicitly note that ExecSt*Post does count for After/Before ordering
Luca Boccassi [Wed, 8 Apr 2020 14:39:20 +0000 (15:39 +0100)] 
man: explicitly note that ExecSt*Post does count for After/Before ordering

4 years agobasic/parse-util: add safe_atoux64()
Zbigniew Jędrzejewski-Szmek [Thu, 9 Apr 2020 09:18:26 +0000 (11:18 +0200)] 
basic/parse-util: add safe_atoux64()

4 years agosleep: improve log msg slightly
Lennart Poettering [Wed, 8 Apr 2020 17:54:44 +0000 (19:54 +0200)] 
sleep: improve log msg slightly

Let's make the log msgs a bit longer, to make clearer what is going on
here...

Prompted bymy attempts to debug #15354

4 years agoMerge pull request #15368 from poettering/color-fix
Zbigniew Jędrzejewski-Szmek [Thu, 9 Apr 2020 08:17:18 +0000 (10:17 +0200)] 
Merge pull request #15368 from poettering/color-fix

minor terminal ansi color seq fixes

4 years agomount-setup: change the system mount propagation to shared by default only at bootup
Wen Yang [Mon, 23 Mar 2020 02:42:46 +0000 (10:42 +0800)] 
mount-setup: change the system mount propagation to shared by default only at bootup

The commit b3ac5f8cb987 has changed the system mount propagation to
shared by default, and according to the following patch:
https://github.com/opencontainers/runc/pull/208
When starting the container, the pouch daemon will call runc to execute
make-private.

However, if the systemctl daemon-reexec is executed after the container
has been started, the system mount propagation will be changed to share
again by default, and the make-private operation above will have no chance
to execute.

4 years agosystemctl: show Environment entries with whitespace 15345/head
Zbigniew Jędrzejewski-Szmek [Mon, 6 Apr 2020 07:57:07 +0000 (09:57 +0200)] 
systemctl: show Environment entries with whitespace

This makes the Environment entries more round-trippable: a similar format is
used for input and output. It is certainly more useful for users, because
showing [unprintable] on anything non-trivial makes systemctl show -p Environment
useless in many cases.

Fixes: #14723 and https://bugzilla.redhat.com/show_bug.cgi?id=1525593.
$ systemctl --user show -p Environment run-*.service
Environment=ASDF=asfd "SPACE= "
Environment=ASDF=asfd "SPACE=\n\n\n"
Environment=ASDF=asfd "TAB=\t\\" "FOO=X X"

4 years agoshared/escape: add new escape style with \n\t escaped
Zbigniew Jędrzejewski-Szmek [Mon, 6 Apr 2020 07:50:51 +0000 (09:50 +0200)] 
shared/escape: add new escape style with \n\t escaped

4 years agoMerge pull request #15331 from vcaputo/busdpi
Zbigniew Jędrzejewski-Szmek [Thu, 9 Apr 2020 07:32:58 +0000 (09:32 +0200)] 
Merge pull request #15331 from vcaputo/busdpi

bus: introduce some sd-bus convenience helpers

4 years agosystemd-run: add --slice-inherit
Marc-André Lureau [Wed, 8 Apr 2020 12:57:52 +0000 (14:57 +0200)] 
systemd-run: add --slice-inherit

Add a new option to easily place a slice within the systemd-run slice.

4 years agoman: correct the default slice for systemd-run units
Lennart Poettering [Wed, 8 Apr 2020 16:45:31 +0000 (18:45 +0200)] 
man: correct the default slice for systemd-run units

As suggested in #15362

4 years agoMerge pull request #15234 from ssahani/mud-lldp
Lennart Poettering [Thu, 9 Apr 2020 07:03:47 +0000 (09:03 +0200)] 
Merge pull request #15234 from ssahani/mud-lldp

LLDP : Introduce Manufacturer Usage Description (MUD)

4 years agotest-terminal-util: fix typo 15368/head
Lennart Poettering [Wed, 8 Apr 2020 17:45:08 +0000 (19:45 +0200)] 
test-terminal-util: fix typo

4 years agoterminal-util: fixate underlined yellow color too
Lennart Poettering [Wed, 8 Apr 2020 17:43:44 +0000 (19:43 +0200)] 
terminal-util: fixate underlined yellow color too

non-underlined yellow uses RGB ANSI sequences while the underlined
version uses the paletted ANSI sequences. Let's unify that and use the
RGB sequence for both cases, so that underlined or not doesn't alter the
color.

4 years agocatalog: add entry for SD_MESSAGE_UNSAFE_USER_NAME 15352/head
Lennart Poettering [Tue, 7 Apr 2020 09:15:49 +0000 (11:15 +0200)] 
catalog: add entry for SD_MESSAGE_UNSAFE_USER_NAME

4 years agodocs: hook up the new USER_NAMES document everywhere
Lennart Poettering [Tue, 7 Apr 2020 09:04:59 +0000 (11:04 +0200)] 
docs: hook up the new USER_NAMES document everywhere

(Also correct the set of names we accept in User=, which was forgotten
to be updated in ae480f0b09aec815b64579bb1828ea935d8ee236.

4 years agodocs: add a longer document explaining our rules on user/group names
Lennart Poettering [Tue, 7 Apr 2020 08:38:39 +0000 (10:38 +0200)] 
docs: add a longer document explaining our rules on user/group names

4 years agouser-util: rework how we validate user names
Lennart Poettering [Sat, 4 Apr 2020 10:23:02 +0000 (12:23 +0200)] 
user-util: rework how we validate user names

This reworks the user validation infrastructure. There are now two
modes. In regular mode we are strict and test against a strict set of
valid chars. And in "relaxed" mode we just filter out some really
obvious, dangerous stuff. i.e. strict is whitelisting what is OK, but
"relaxed" is blacklisting what is really not OK.

The idea is that we use strict mode whenver we allocate a new user
(i.e. in sysusers.d or homed), while "relaxed" mode is when we process
users registered elsewhere, (i.e. userdb, logind, …)

The requirements on user name validity vary wildly. SSSD thinks its fine
to embedd "@" for example, while the suggested NAME_REGEX field on
Debian does not even allow uppercase chars…

This effectively liberaralizes a lot what we expect from usernames.

The code that warns about questionnable user names is now optional and
only used at places such as unit file parsing, so that it doesn't show
up on every userdb query, but only when processing configuration files
that know better.

Fixes: #15149 #15090
4 years agouserdbctl: drop redundant user name validity check
Lennart Poettering [Fri, 3 Apr 2020 20:27:09 +0000 (22:27 +0200)] 
userdbctl: drop redundant user name validity check

The userdb_by_name() invocation immediately following does the same check
anyway, no need to do this twice.

(Also, make sure we exit the function early on failure)

4 years agounits: make sure systemd-pstore stops at shutdown 15365/head
Lennart Poettering [Wed, 8 Apr 2020 14:25:03 +0000 (16:25 +0200)] 
units: make sure systemd-pstore stops at shutdown

This doesn't matter too much given that the service doesn't do anything
on shutdown, but let's still stop it to make things cleaner.

4 years agounits: drop systemd-remount-fs.service dependency from more services
Lennart Poettering [Wed, 8 Apr 2020 14:24:23 +0000 (16:24 +0200)] 
units: drop systemd-remount-fs.service dependency from more services

All services using StateDirectory= don't need the explicit dep anymore,
let's hence drop it everywhere.

4 years agounits: drop dependency on systemd-remount-fs.service from systemd-pstore.service
Lennart Poettering [Wed, 8 Apr 2020 14:10:38 +0000 (16:10 +0200)] 
units: drop dependency on systemd-remount-fs.service from systemd-pstore.service

This dependency is now generated automatically given we use
StateDirectory=. Moreover the combination of Wants= and After= was too
strong anway, as whether remount-fs is pulled in or not should not be up
to systemd-pstore.service, and in fact is part of the initial
transaction anyway.