]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
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 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 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 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.".

4 years agosd-bus: add va_list variants of variadic convenience functions
Vito Caputo [Tue, 31 Mar 2020 14:28:01 +0000 (07:28 -0700)] 
sd-bus: add va_list variants of variadic convenience functions

Consumers of the sd-bus convenience API can't make convenience
helpers of their own without va_list variants.

This commit is a mechanical change splitting out the existing function
bodies into bare va_list variants having a 'v' suffixed to the names.

The original functions now simply create the va_list before forwarding
the call on to the va_list variant, and the va_list variants dispense
with those steps.

4 years agoMerge pull request #15252 from ssahani/dhcpv6-mud
Zbigniew Jędrzejewski-Szmek [Thu, 2 Apr 2020 08:23:15 +0000 (10:23 +0200)] 
Merge pull request #15252 from ssahani/dhcpv6-mud

DHCPv6: Add support to send MUD URL

4 years agoMerge pull request #15109 from keszybz/units-make-installable
Zbigniew Jędrzejewski-Szmek [Thu, 2 Apr 2020 08:21:29 +0000 (10:21 +0200)] 
Merge pull request #15109 from keszybz/units-make-installable

Make homed/userdbd/repart services installable (to allow uninstalling)

4 years agoudev: Fix SIGSEGV in AlternativeNamesPolicy handling
Lénaïc Huard [Wed, 1 Apr 2020 21:45:08 +0000 (23:45 +0200)] 
udev: Fix SIGSEGV in AlternativeNamesPolicy handling

The function sd_device_get_property_value has some paths where it exits without
touching the n pointer. In those cases, n remained uninitialized until it was
eventually read inside isempty where it caused the segmentation fault.

Fixes #15078

4 years agoMerge pull request #15238 from rpls/canfd
Lennart Poettering [Thu, 2 Apr 2020 08:13:24 +0000 (10:13 +0200)] 
Merge pull request #15238 from rpls/canfd

network: can: add support for CAN-FD related properties

4 years agonetwork: can: add support for CAN-FD related properties 15238/head
Richard Petri [Thu, 26 Mar 2020 21:27:41 +0000 (22:27 +0100)] 
network: can: add support for CAN-FD related properties

4 years agonetwork: can: introduce a config parser function for bitrates
Richard Petri [Mon, 30 Mar 2020 21:05:56 +0000 (23:05 +0200)] 
network: can: introduce a config parser function for bitrates

For now, this function is nearly equivalent to the si_uint64 parser, except for
an additional range check as Linux only takes 32-bit values as bitrates. In
future, this may also be used to introduce fancier bitrate config formats.

4 years agohomed: fall back to ftruncate() if fallocate() is not supported on backing fs 15297/head
Lennart Poettering [Wed, 1 Apr 2020 16:06:25 +0000 (18:06 +0200)] 
homed: fall back to ftruncate() if fallocate() is not supported on backing fs

This means "discard" mode is enabled implicitly on such simpler backing
fs.

Fixes: #15059
4 years agonetwork: DHCPv6 Add support to send MUD URL 15252/head
Susant Sahani [Mon, 30 Mar 2020 14:31:10 +0000 (16:31 +0200)] 
network: DHCPv6 Add support to send MUD URL

4 years agosd-dhcpv6: Add support to set request MUD URL
Susant Sahani [Mon, 30 Mar 2020 14:30:46 +0000 (16:30 +0200)] 
sd-dhcpv6: Add support to set request MUD URL

4 years agoMerge pull request #15253 from DaanDeMeyer/object-vtable-error-docs
Zbigniew Jędrzejewski-Szmek [Wed, 1 Apr 2020 10:25:34 +0000 (12:25 +0200)] 
Merge pull request #15253 from DaanDeMeyer/object-vtable-error-docs

sd-bus: Add error handling info to sd_bus_add_object_vtable docs

4 years agoman: add note that --no-hostname has limited effect 15290/head
Zbigniew Jędrzejewski-Szmek [Tue, 31 Mar 2020 20:26:59 +0000 (22:26 +0200)] 
man: add note that --no-hostname has limited effect

Clearly there is some confusion about the intent of this option, let's add
a short note.

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

4 years agoMerge pull request #15278 from vcaputo/more-trivial-cleanups
Zbigniew Jędrzejewski-Szmek [Tue, 31 Mar 2020 22:16:56 +0000 (00:16 +0200)] 
Merge pull request #15278 from vcaputo/more-trivial-cleanups

Expand use of _cleanup_close_ where trivial

4 years agoman: mention that stdout logging works the same as stderr logging
Lennart Poettering [Tue, 31 Mar 2020 13:59:29 +0000 (15:59 +0200)] 
man: mention that stdout logging works the same as stderr logging

Apparently people wondered about that:

https://lists.freedesktop.org/archives/systemd-devel/2020-March/044091.html

4 years agosd-bus: sd_bus_call docs improvements
Daan De Meyer [Tue, 31 Mar 2020 17:50:53 +0000 (19:50 +0200)] 
sd-bus: sd_bus_call docs improvements

4 years agosd-bus: Add sd_bus_get/set_priority docs + fixes
Daan De Meyer [Tue, 31 Mar 2020 19:06:02 +0000 (21:06 +0200)] 
sd-bus: Add sd_bus_get/set_priority docs + fixes

4 years agoMerge pull request #15229 from ssahani/mud
Zbigniew Jędrzejewski-Szmek [Tue, 31 Mar 2020 22:10:13 +0000 (00:10 +0200)] 
Merge pull request #15229 from ssahani/mud

network: Introduce MUD

4 years agojournal-remote: fix description of option
Zbigniew Jędrzejewski-Szmek [Mon, 30 Mar 2020 20:02:13 +0000 (22:02 +0200)] 
journal-remote: fix description of option

We use whatever compression is configured, most often not XZ.

4 years agosd-bus: simplify bus_maybe_reply_error
Zbigniew Jędrzejewski-Szmek [Mon, 30 Mar 2020 11:49:05 +0000 (13:49 +0200)] 
sd-bus: simplify bus_maybe_reply_error

sd_bus_reply_method_errno already does the same two checks
(sd_bus_error_is_set(error), r < 0) internally. But it did them in opposite
order. The effect is the same, because sd_bus_reply_method_errno falls back to
sd_bus_reply_method_error, but it seems inelegant. So let's simplify
bus_maybe_reply_error() to offload the job fully to sd_bus_reply_method_errno().

No functional change.

4 years agosd-bus: Add note about sd_bus_reply_method_return to SD_BUS_METHOD docs 15253/head
Daan De Meyer [Mon, 30 Mar 2020 19:11:42 +0000 (21:11 +0200)] 
sd-bus: Add note about sd_bus_reply_method_return to SD_BUS_METHOD docs

4 years agosd-bus: Add sd_bus_add_object and callback docs
Daan De Meyer [Mon, 30 Mar 2020 18:53:24 +0000 (20:53 +0200)] 
sd-bus: Add sd_bus_add_object and callback docs

4 years agosd-bus: Fix typos in sd_bus_add_object_vtable docs
Daan De Meyer [Sat, 28 Mar 2020 21:22:58 +0000 (22:22 +0100)] 
sd-bus: Fix typos in sd_bus_add_object_vtable docs

4 years agosd-bus: Wrap add_object_vtable docs at 100 columns
Daan De Meyer [Sat, 28 Mar 2020 21:03:19 +0000 (22:03 +0100)] 
sd-bus: Wrap add_object_vtable docs at 100 columns

4 years ago*: use _cleanup_close_ with fdopendir() where trivial 15278/head
Vito Caputo [Tue, 31 Mar 2020 09:35:00 +0000 (02:35 -0700)] 
*: use _cleanup_close_ with fdopendir() where trivial

Also convert these to use take_fdopendir().

4 years ago*: use _cleanup_close_ with fdopen() where trivial
Vito Caputo [Tue, 31 Mar 2020 09:29:37 +0000 (02:29 -0700)] 
*: use _cleanup_close_ with fdopen() where trivial

Also convert these to use take_fdopen().

4 years ago*: convert amenable fdopendir() calls to take_fdopendir()
Vito Caputo [Tue, 31 Mar 2020 09:00:44 +0000 (02:00 -0700)] 
*: convert amenable fdopendir() calls to take_fdopendir()

Some fdopendir() calls remain where safe_close() is manually
performed, those could be simplified as well by converting to
use the _cleanup_close_ machinery, but makes things less trivial
to review so left for a future cleanup.

4 years agofileio: add take_fdopendir() variant
Vito Caputo [Tue, 31 Mar 2020 08:59:33 +0000 (01:59 -0700)] 
fileio: add take_fdopendir() variant

fdopendir() wrapper analogous to take_fdopen()

4 years ago*: convert amenable fdopen calls to take_fdopen
Vito Caputo [Tue, 31 Mar 2020 08:07:21 +0000 (01:07 -0700)] 
*: convert amenable fdopen calls to take_fdopen

Mechanical change to eliminate some cruft by using the
new take_fdopen{_unlocked}() wrappers where trivial.

4 years agofileio: introduce take_fdopen{_unlocked}() variant
Vito Caputo [Tue, 31 Mar 2020 07:49:07 +0000 (00:49 -0700)] 
fileio: introduce take_fdopen{_unlocked}() variant

With the addition of _cleanup_close_ there's a repetitious
pattern of assigning -1 to the fd after a successful fdopen
to prevent its close on cleanup now that the FILE * owns the
fd.

This introduces a wrapper that instead takes a pointer to the
fd being opened, and always overwrites the fd with -1 on success.

A future commit will cleanup all the fdopen call sites to use the
wrapper and elide the manual -1 fd assignment.

4 years agoMerge pull request #15268 from poettering/sigusr1-sigusr2
Zbigniew Jędrzejewski-Szmek [Tue, 31 Mar 2020 13:32:28 +0000 (15:32 +0200)] 
Merge pull request #15268 from poettering/sigusr1-sigusr2

Doing manual merge because github thinks there's a conflict.

4 years agounits: do not pull in home.mount from systemd-homed.service
Lennart Poettering [Tue, 31 Mar 2020 09:35:08 +0000 (11:35 +0200)] 
units: do not pull in home.mount from systemd-homed.service

/home is posibly a remote file system. it makes sense to order homed
after it, so that we can properly enumerate users in it, but we probably
shouldn't pull it in ourselves, and leave that to users to configure
otherwise.

Fixes: #15102
4 years agohome: fix several typos
Vito Caputo [Tue, 31 Mar 2020 10:50:13 +0000 (03:50 -0700)] 
home: fix several typos

4 years agotest: print path to build directory on misconfiguration 15109/head
Zbigniew Jędrzejewski-Szmek [Tue, 31 Mar 2020 13:13:13 +0000 (15:13 +0200)] 
test: print path to build directory on misconfiguration

This way it's easier to see when a wrong $BUILD_DIR was passed.

4 years agounits: make systemd-userdbd.{socket,service} installable
Zbigniew Jędrzejewski-Szmek [Fri, 13 Mar 2020 17:40:54 +0000 (18:40 +0100)] 
units: make systemd-userdbd.{socket,service} installable

It's lightweight and generally useful, so it should be enabled by default. But
users might want to disable it for whatever reason, and things should be fine
without it, so let's make it installable so it can be disabled if wanted.

Fixes #15175.

4 years agounits: make systemd-homed.service installable
Zbigniew Jędrzejewski-Szmek [Fri, 13 Mar 2020 17:38:09 +0000 (18:38 +0100)] 
units: make systemd-homed.service installable

Fixes #15083. Users might want to disable homed if not used to save resources.

4 years agounits: make systemd-repart.service installable
Zbigniew Jędrzejewski-Szmek [Fri, 13 Mar 2020 17:33:44 +0000 (18:33 +0100)] 
units: make systemd-repart.service installable

This essentially adds another layer of configurability:
build disable, this, presence of configuration. The default is
set to enabled, because the service does nothing w/o config.