]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
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-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 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 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 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 agotest: wait a bit after stopping the test service 15361/head
Frantisek Sumsal [Wed, 8 Apr 2020 10:12:46 +0000 (12:12 +0200)] 
test: wait a bit after stopping the test service

Give systemd a chance to process the stop event before checking if the
PID has indeed leaked. This should fix the intermittent test fails in CI
even with a fixed systemd version, like this one:

```
Apr 08 10:22:09 testsuite-47.sh[345]: ++ cat /leakedtestpid
Apr 08 10:22:09 testsuite-47.sh[334]: + leaked_pid=342
Apr 08 10:22:09 testsuite-47.sh[334]: + systemctl stop testsuite-47-repro
Apr 08 10:22:10 testsuite-47.sh[334]: + ps -p 342
Apr 08 10:22:10 testsuite-47.sh[348]:     PID TTY          TIME CMD
Apr 08 10:22:10 testsuite-47.sh[348]:     342 ?        00:00:00 sleep
Apr 08 10:22:10 testsuite-47.sh[334]: + exit 42
```

Followup to 197298ff9fc930de450330095cc5b67d165d0801

4 years agoMerge pull request #15358 from poettering/preset-clean-up
Anita Zhang [Wed, 8 Apr 2020 00:52:45 +0000 (17:52 -0700)] 
Merge pull request #15358 from poettering/preset-clean-up

preset: let's clean up preset list a bit

4 years agoLLDP: Add support to transmit MUD URL 15234/head
Susant Sahani [Mon, 30 Mar 2020 19:57:58 +0000 (21:57 +0200)] 
LLDP: Add support to transmit MUD URL

4 years agopreset: let's clean up preset list a bit 15358/head
Lennart Poettering [Tue, 7 Apr 2020 17:01:00 +0000 (19:01 +0200)] 
preset: let's clean up preset list a bit

let's make sure we list all singleton units we define in the preset
list, either as disable or as enable. Only four were missing, let's add
them in.

Also, let's group the pstore one with the other ones that are enabled,
right at the top.

4 years agosd-lldp: Add support to receive MUD
Susant Sahani [Mon, 30 Mar 2020 19:57:14 +0000 (21:57 +0200)] 
sd-lldp: Add support to receive MUD

4 years agoMerge pull request #14930 from tomhughes/dnssec-canonicalise
Lennart Poettering [Tue, 7 Apr 2020 15:07:04 +0000 (17:07 +0200)] 
Merge pull request #14930 from tomhughes/dnssec-canonicalise

Canonicalise names in DNS responses per RFC4034 requirements

4 years agounits: add ProtectClock=yes
Topi Miettinen [Thu, 2 Apr 2020 18:18:11 +0000 (21:18 +0300)] 
units: add ProtectClock=yes

Add `ProtectClock=yes` to systemd units. Since it implies certain
`DeviceAllow=` rules, make sure that the units have `DeviceAllow=` rules so
they are still able to access other devices. Exclude timesyncd and timedated.

4 years agoRemove message->priority field
Zbigniew Jędrzejewski-Szmek [Fri, 3 Apr 2020 16:17:18 +0000 (18:17 +0200)] 
Remove message->priority field

A warning is emitted from sd_bus_message_{get,set}_priority. Those functions
are exposed by pystemd, so we have no easy way of checking if anything is
calling them.

Just making the functions always return without doing anything would be an
option, but then we could leave the caller with an undefined variable. So I
think it's better to make the functions emit a warnings and return priority=0
in the get operation.

4 years agosysctl: enable coredump for suid binaries
Zbigniew Jędrzejewski-Szmek [Fri, 3 Apr 2020 20:05:25 +0000 (22:05 +0200)] 
sysctl: enable coredump for suid binaries

Right now the kernel will not dump anything that went through setuid or
setgid. But it is routine for daemons to do that, and it makes things hard to
debug.

systemd-coredump saves the coredump readable by the users the process was
running as. This should be enough to avoid information leakage. So let's also
tell the kernel to do the coredump.

For https://bugzilla.redhat.com/show_bug.cgi?id=1790972.

Both patterns are stored in the same file, so they are enabled or disabled
together. (Though suid_dumpable=2 is supposed to be safe even when writing to
plain files.)

4 years agofix manager_state
root [Sat, 4 Apr 2020 03:35:22 +0000 (22:35 -0500)] 
fix manager_state

4 years agohwdb: Add accel orientation quirk for MPMAN MPWIN895CL tablet
Hans de Goede [Sun, 5 Apr 2020 14:01:32 +0000 (16:01 +0200)] 
hwdb: Add accel orientation quirk for MPMAN MPWIN895CL tablet

Add a quirk to fix the accelerometer orientation on the MPMAN MPWIN895CL
tablet.

4 years agoMerge pull request #15349 from keszybz/doc-work
Lennart Poettering [Tue, 7 Apr 2020 12:10:56 +0000 (14:10 +0200)] 
Merge pull request #15349 from keszybz/doc-work

Remove stray file and fix two minor issues in man pages

4 years agoman: update rules 15349/head
Zbigniew Jędrzejewski-Szmek [Mon, 6 Apr 2020 18:47:14 +0000 (20:47 +0200)] 
man: update rules

Apparently this step was forgotten in 935052a8aa11329061cbee234c99b03973163594.

4 years agoRemove stray file
Zbigniew Jędrzejewski-Szmek [Fri, 3 Apr 2020 16:32:53 +0000 (18:32 +0200)] 
Remove stray file

4 years agoman: drop apostophe from section title
Zbigniew Jędrzejewski-Szmek [Wed, 1 Apr 2020 19:55:58 +0000 (21:55 +0200)] 
man: drop apostophe from section title

For whatever reason, this does not get rendered propely in the man
page and results in an invalid code:
W: manual-page-warning /usr/share/man/man7/systemd.special.7.gz 103: warning: macro `AQ' not defined

We say 'user manager' and 'system manager' in most other places, so let's just
use this form here too.

4 years agohwdb: Update database of Bluetooth company identifiers
Marcel Holtmann [Sun, 5 Apr 2020 08:01:14 +0000 (10:01 +0200)] 
hwdb: Update database of Bluetooth company identifiers

4 years agobus: introduce some sd-bus convenience helpers 15331/head
Vito Caputo [Sat, 4 Apr 2020 05:35:42 +0000 (22:35 -0700)] 
bus: introduce some sd-bus convenience helpers

Many of the convenience functions from sd-bus operate on verbose sets
of discrete strings for destination/path/interface/member.

For most callers, destination/path/interface are uniform, and just the
member is distinct.

This commit introduces a new struct encapsulating the
destination/path/interface pointers called BusAddress, and wrapper
functions which take a BusAddress* instead of three strings, and just
pass the encapsulated strings on to the sd-bus convenience functions.

Future commits will update call sites to use these helpers throwing
out a bunch of repetitious destination/path/interface strings littered
throughout the codebase, replacing them with some appropriately named
static structs passed by pointer to these new helpers.

4 years agooss-fuzz: point the badge directly to our logs
Evgeny Vereshchagin [Sat, 4 Apr 2020 17:22:02 +0000 (17:22 +0000)] 
oss-fuzz: point the badge directly to our logs

4 years agosemaphore: switch to upstream-ci
Evgeny Vereshchagin [Sat, 4 Apr 2020 15:58:25 +0000 (15:58 +0000)] 
semaphore: switch to upstream-ci

"debian/master" has been broken since
https://salsa.debian.org/systemd-team/systemd/-/commit/d6483013d5779d4d465a1e174e44a754b941d0e6
was merged.

4 years agodetect-virt: also detect "microsoft" as WSL
Zbigniew Jędrzejewski-Szmek [Fri, 3 Apr 2020 17:38:50 +0000 (19:38 +0200)] 
detect-virt: also detect "microsoft" as WSL

From https://github.com/microsoft/WSL/issues/423#issuecomment-221627364:
> it's unlikely we'll change it to something that doesn't contain "Microsoft"
> or "WSL".

... but well, it happened. If they change it incompatibly w/o adding an stable
detection mechanism, I think we should not add yet another detection method.
But adding a different casing of "microsoft" is not a very big step, so let's
do that.

Follow-up for #11932.

4 years agoMerge pull request #15298 from keszybz/show-property-value
Lennart Poettering [Sat, 4 Apr 2020 09:22:59 +0000 (11:22 +0200)] 
Merge pull request #15298 from keszybz/show-property-value

systemctl --property-value as shortcut for --property --value

4 years agoMerge pull request #15321 from topimiettinen/dbus-execute-add-protect-clock
Anita Zhang [Fri, 3 Apr 2020 23:15:51 +0000 (16:15 -0700)] 
Merge pull request #15321 from topimiettinen/dbus-execute-add-protect-clock

dbus-execute: show also ProtectClock

4 years agoMerge pull request #15290 from keszybz/unrelated-fixes
Anita Zhang [Fri, 3 Apr 2020 22:54:38 +0000 (15:54 -0700)] 
Merge pull request #15290 from keszybz/unrelated-fixes

Three unrelated minor tweaks

4 years agoMerge pull request #15297 from poettering/homed-no-fallocate
Anita Zhang [Fri, 3 Apr 2020 22:49:43 +0000 (15:49 -0700)] 
Merge pull request #15297 from poettering/homed-no-fallocate

homed: fall back to ftruncate() if fallocate() is not supported on ba…

4 years agotest: use show -P in places 15298/head
Zbigniew Jędrzejewski-Szmek [Wed, 1 Apr 2020 16:32:30 +0000 (18:32 +0200)] 
test: use show -P in places

Not all places are converted on purpose, to also test the other option
name.

4 years agosystemctl: add -P as short for --value --property=
Zbigniew Jędrzejewski-Szmek [Wed, 1 Apr 2020 16:29:00 +0000 (18:29 +0200)] 
systemctl: add -P as short for --value --property=

4 years agoMerge pull request #15315 from DaanDeMeyer/deprecate-sd-bus-priority
Zbigniew Jędrzejewski-Szmek [Fri, 3 Apr 2020 16:07:54 +0000 (18:07 +0200)] 
Merge pull request #15315 from DaanDeMeyer/deprecate-sd-bus-priority

sd-bus: Deprecate priority functions

4 years agocapability: don't skip ambient caps setup if we actually have something to set
Lennart Poettering [Thu, 2 Apr 2020 15:20:47 +0000 (17:20 +0200)] 
capability: don't skip ambient caps setup if we actually have something to set

Follow-up for 7ea4392f1e444388caa706d6bd64fb7b30dc2903

Let's not hide errors needlessly aggressively.

4 years agoMerge pull request #15310 from poettering/repart-no-enable
Zbigniew Jędrzejewski-Szmek [Fri, 3 Apr 2020 15:44:47 +0000 (17:44 +0200)] 
Merge pull request #15310 from poettering/repart-no-enable

make systemd-repart static again, but condition it out if no config

4 years agoshared/dissect-image: log messages from cryptsetup
Topi Miettinen [Thu, 2 Apr 2020 13:57:26 +0000 (16:57 +0300)] 
shared/dissect-image: log messages from cryptsetup

Before:
```
write(2, "Device /dev/loop1p1 is too small.\n", 34) = -1 ENOTCONN (Transport
endpoint is not connected)
```

After:
```
$ journalctl -b -e | grep 'too small'
Apr 02 16:53:30 loora systemd[343579]: Device /dev/loop1p1 is too small.
```

4 years agoresolve: reload /etc/hosts on inode change
Giedrius Statkevičius [Sun, 22 Mar 2020 20:40:18 +0000 (22:40 +0200)] 
resolve: reload /etc/hosts on inode change

On certain distributions such as NixOS the mtime of `/etc/hosts` is
locked to a fixed value. In such cases, only checking the last mtime of
`/etc/hosts` is not enough - we also need to check if the st_ino/st_dev
match up. Thus, let's make sure make sure that systemd-resolved also
rereads `/etc/hosts` if the inode or the device containing `/etc/hosts` changes.

Test script:

```bash
hosts="/etc/hosts"
echo "127.0.0.1 testpr" > "hosts_new"
mv "hosts_new" "$hosts"
resolvectl query testpr || exit 1
mtime="$(stat -c %y "$hosts")"
echo "127.0.0.1 newhost" > "hosts_tmp"
touch -d "$mtime" "hosts_tmp"
install -p "hosts_tmp" "$hosts"
sleep 10
resolvectl query newhost || exit 1
rm -f "hosts_tmp"
```

Closes #14456.

4 years agodbus-execute: show also ProtectClock 15321/head
Topi Miettinen [Fri, 3 Apr 2020 13:32:10 +0000 (16:32 +0300)] 
dbus-execute: show also ProtectClock

Show also `ProtectClock=` setting. This also lets `systemd-analyze security`
get the correct state for it.

4 years agoMerge pull request #15309 from poettering/strv-split
Evgeny Vereshchagin [Fri, 3 Apr 2020 03:37:54 +0000 (06:37 +0300)] 
Merge pull request #15309 from poettering/strv-split

remove dead-lock in strv_split()

4 years agosd-bus: remove unused priority logic 15315/head
Daan De Meyer [Thu, 2 Apr 2020 19:42:32 +0000 (21:42 +0200)] 
sd-bus: remove unused priority logic

4 years agosd-bus: Deprecate priority functions
Daan De Meyer [Thu, 2 Apr 2020 19:36:59 +0000 (21:36 +0200)] 
sd-bus: Deprecate priority functions

4 years agounits: run systemd-repart only if there's configuration for it 15310/head
Lennart Poettering [Thu, 2 Apr 2020 15:04:38 +0000 (17:04 +0200)] 
units: run systemd-repart only if there's configuration for it

4 years agoRevert "units: make systemd-repart.service installable"
Lennart Poettering [Thu, 2 Apr 2020 15:01:34 +0000 (17:01 +0200)] 
Revert "units: make systemd-repart.service installable"

This reverts commit 7e1ed1f3b29162df25064b33dc55ac8cf432bb0b.

systemd-repart is not a user service that should be something people
enable/disable, instead it should just work if there's configuration for
it. It's like systemd-tmpfiles, systemd-sysusers, systemd-load-modules,
systemd-binfmt, systemd-systemd-sysctl which are NOPs if they have no
configuration, and thus don't hurt, but cannot be disabled since they
are too deep part of the OS.

This doesn't mean people couldn't disable the service if they really
want to, there's after all "systemctl mask" and build-time disabling,
but those are OS developer facing instead of admin facing, that's how it
should be.

Note that systemd-repart is in particular an initrd service, and so far
enable/disable state of those is not managed anyway via "systemctl
enable/disable" but more what dracut decides to package up and what not.

4 years agoupdate TODO
Lennart Poettering [Thu, 2 Apr 2020 14:58:49 +0000 (16:58 +0200)] 
update TODO

4 years agostring-util: make clear that split() + FOREACH_WORD() should die 15309/head
Lennart Poettering [Thu, 2 Apr 2020 14:38:27 +0000 (16:38 +0200)] 
string-util: make clear that split() + FOREACH_WORD() should die

4 years agostring-util: make sure we eat even half complete words in split()
Lennart Poettering [Thu, 2 Apr 2020 14:36:33 +0000 (16:36 +0200)] 
string-util: make sure we eat even half complete words in split()

split() and FOREACH_WORD really should die, and everything be moved to
extract_first_word() and friends, but let's at least make sure that for
the remaining code using it we can't deadlock by not progressing in the
word iteration.

Fixes: #15305
4 years agostring-util: some minor coding style updates
Lennart Poettering [Thu, 2 Apr 2020 14:00:55 +0000 (16:00 +0200)] 
string-util: some minor coding style updates

4 years agoupdate TODO
Lennart Poettering [Thu, 2 Apr 2020 14:00:06 +0000 (16:00 +0200)] 
update TODO

4 years agoMerge pull request #15210 from ssahani/networkctl-up-down
Zbigniew Jędrzejewski-Szmek [Thu, 2 Apr 2020 08:43:53 +0000 (10:43 +0200)] 
Merge pull request #15210 from ssahani/networkctl-up-down

Merging by hand because github refuses merging because "Rebasing the commits of
this branch on top of the base branch cannot be performed automatically as this
would create a different result than a regular merge.".