systemd/.git
4 years agocore: log about "systemctl kill" requests
Lennart Poettering [Fri, 16 Oct 2020 15:20:20 +0000 (17:20 +0200)]
core: log about "systemctl kill" requests

let's add informational logging about each client requested signal
sending. While we are at, let's beef up error handling/log messages in
this case quite a bit: let's log errors both to syslog and report errors
back to client.

Fixes: #17254
(cherry picked from commit d991100291b6d5b81176417a42c0ca6a17cf6ab8)

4 years agocore: correct handling of "systemctl kill --kill-who=main-fail"
Lennart Poettering [Fri, 16 Oct 2020 15:16:23 +0000 (17:16 +0200)]
core: correct handling of "systemctl kill --kill-who=main-fail"

--kill-who=main-fail never worked correctly, due to a copy and paste
mistake in ac5e3a505e49c80b56c971a8fc13bacac961640d, where the same item
was listed twice. The mistake was
later noticed, but fixed incorrectly, in
201f0c916d8f65ad2595a651b1371fcd39a4cf55.

Let's list all *-fail types correctly, finally.

And while we are at it, add a nice comment and generate a prettier D-Bus
error about this.

(cherry picked from commit 2ae0508e6dab3bb61893132fa936c1f62af8aa29)

4 years agoman: document that for Type=dbus services dropping bus name has consequences
Lennart Poettering [Fri, 16 Oct 2020 16:04:59 +0000 (18:04 +0200)]
man: document that for Type=dbus services dropping bus name has consequences

Fixes: #17150
(cherry picked from commit bb63863304795a2454a9071ebad75ee673c145d8)

4 years agoman: document that ConditionKernelCommandLine= looks at /proc/1/environ in containers
Lennart Poettering [Fri, 16 Oct 2020 16:22:37 +0000 (18:22 +0200)]
man: document that ConditionKernelCommandLine= looks at /proc/1/environ in containers

Fixes: #16941
(cherry picked from commit af4b8f8048e2d2da0b1a1a4927339cf39c62fb8a)

4 years agomeson: Fix missing libseccomp dependencies
Michal Koutný [Thu, 15 Oct 2020 15:56:30 +0000 (17:56 +0200)]
meson: Fix missing libseccomp dependencies

The builds with HAVE_SECCOMP fail on missing include paths:

FAILED: src/basic/libbasic.a.p/parse-util.c.o
cc -Isrc/basic/libbasic.a.p -Isrc/basic -I../src/basic -Isrc/boot -I../src/boot -Isrc/home -I../src/home -Isrc/shared -I../src/shared -Isrc/systemd -I../src/systemd -Isrc/journal -I../src/journal -Isrc/journal-remote -I../src/journal-remote -Isrc/nspawn -I../src/nspawn -Isrc/resolve -I../src/resolve -Isrc/timesync -I../src/timesync -I../src/time-wait-sync -Isrc/login -I../src/login -Isrc/udev -I../src/udev -Isrc/libudev -I../src/libudev -Isrc/core -I../src/core -Isrc/shutdown -I../src/shutdown -I../src/xdg-autostart-generator -I../src/libsystemd/sd-bus -I../src/libsystemd/sd-device -I../src/libsystemd/sd-event -I../src/libsystemd/sd-hwdb -I../src/libsystemd/sd-id128 -I../src/libsystemd/sd-netlink -I../src/libsystemd/sd-network -I../src/libsystemd/sd-resolve -Isrc/libsystemd-network -I../src/libsystemd-network -I. -I.. -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu99 -g -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-result -Wno-format-signedness -Werror=undef -Wlogical-op -Wmissing-include-dirs -Wold-style-definition -Wpointer-arith -Winit-self -Wfloat-equal -Wsuggest-attribute=noreturn -Werror=missing-prototypes -Werror=implicit-function-declaration -Werror=missing-declarations -Werror=return-type -Werror=incompatible-pointer-types -Werror=format=2 -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wimplicit-fallthrough=5 -Wshadow -Wendif-labels -Wstrict-aliasing=2 -Wwrite-strings -Werror=overflow -Werror=shift-count-overflow -Werror=shift-overflow=2 -Wdate-time -Wnested-externs -Wno-maybe-uninitialized -ffast-math -fno-common -fdiagnostics-show-option -fno-strict-aliasing -fvisibility=hidden -fstack-protector -fstack-protector-strong --param=ssp-buffer-size=4 -Werror=shadow -include config.h -fPIC -pthread -fvisibility=default -MD -MQ src/basic/libbasic.a.p/parse-util.c.o -MF src/basic/libbasic.a.p/parse-util.c.o.d -o src/basic/libbasic.a.p/parse-util.c.o -c ../src/basic/parse-util.c
In file included from ../src/basic/parse-util.c:20:
../src/shared/seccomp-util.h:4:10: fatal error: seccomp.h: No such file or directory
    4 | #include <seccomp.h>
      |          ^~~~~~~~~~~
compilation terminated.

FAILED: test-parse-util.p/src_test_test-parse-util.c.o
cc -Itest-parse-util.p -I. -I.. -Isrc/basic -I../src/basic -Isrc/boot -I../src/boot -Isrc/home -I../src/home -Isrc/shared -I../src/shared -Isrc/systemd -I../src/systemd -Isrc/journal -I../src/journal -Isrc/journal-remote -I../src/journal-remote -Isrc/nspawn -I../src/nspawn -Isrc/resolve -I../src/resolve -Isrc/timesync -I../src/timesync -I../src/time-wait-sync -Isrc/login -I../src/login -Isrc/udev -I../src/udev -Isrc/libudev -I../src/libudev -Isrc/core -I../src/core -Isrc/shutdown -I../src/shutdown -I../src/xdg-autostart-generator -I../src/libsystemd/sd-bus -I../src/libsystemd/sd-device -I../src/libsystemd/sd-event -I../src/libsystemd/sd-hwdb -I../src/libsystemd/sd-id128 -I../src/libsystemd/sd-netlink -I../src/libsystemd/sd-network -I../src/libsystemd/sd-resolve -Isrc/libsystemd-network -I../src/libsystemd-network -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu99 -g -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-result -Wno-format-signedness -Werror=undef -Wlogical-op -Wmissing-include-dirs -Wold-style-definition -Wpointer-arith -Winit-self -Wfloat-equal -Wsuggest-attribute=noreturn -Werror=missing-prototypes -Werror=implicit-function-declaration -Werror=missing-declarations -Werror=return-type -Werror=incompatible-pointer-types -Werror=format=2 -Wstrict-prototypes -Wredundant-decls -Wmissing-noreturn -Wimplicit-fallthrough=5 -Wshadow -Wendif-labels -Wstrict-aliasing=2 -Wwrite-strings -Werror=overflow -Werror=shift-count-overflow -Werror=shift-overflow=2 -Wdate-time -Wnested-externs -Wno-maybe-uninitialized -ffast-math -fno-common -fdiagnostics-show-option -fno-strict-aliasing -fvisibility=hidden -fstack-protector -fstack-protector-strong --param=ssp-buffer-size=4 -Werror=shadow -include config.h -MD -MQ test-parse-util.p/src_test_test-parse-util.c.o -MF test-parse-util.p/src_test_test-parse-util.c.o.d -o test-parse-util.p/src_test_test-parse-util.c.o -c ../src/test/test-parse-util.c
In file included from ../src/test/test-parse-util.c:14:
../src/shared/seccomp-util.h:4:10: fatal error: seccomp.h: No such file or directory
    4 | #include <seccomp.h>
      |          ^~~~~~~~~~~
compilation terminated.

Add the respective deps.

Fixes: 005bfaf118 ("exec: Add kill action to system call filters")
(cherry picked from commit 0bc2f071e199daca9e02e0261ddf5bfd208e2c9a)

4 years agopid1: ignore whole /run/host hierarchy
Lennart Poettering [Thu, 15 Oct 2020 13:25:56 +0000 (15:25 +0200)]
pid1: ignore whole /run/host hierarchy

Let's mark the whole /run/host hierarchy as something to ignore by PID 1
for generation of .mount units, i.e. consider it as "extrinsic".

By unifying container mgr supplied resources in one dir it's also easy
to exclude the whole lot from PID1's management inside the container.
This is the right thing to do, since from the payload's PoV these mounts
are just API and not manipulatable as they are established, managed and
owned by the container manager, not the payload.

(While we are it, also add the boot ID mount to the existing list, as
nspawn and other container managers overmount that too, typically, and
it is thus owned by the container manager and not the payload
typically.)

(cherry picked from commit 6f997852c8830ca073c55241b0068ebbf1f94a72)

4 years agovarlink: add server write states to disconnect check
Anita Zhang [Wed, 9 Sep 2020 01:35:27 +0000 (18:35 -0700)]
varlink: add server write states to disconnect check

While a server is in the VARLINK_PENDING_METHOD or VARLINK_PENDING_METHOD_MORE
states and its write end is disconnected and it gets a POLLHUP, we
should disconnect since it can't write anymore.

In the case of systemd-oomd disconnecting while pid1 was pending-more, this
condition left pid1 in a state where it started throttling from
continually getting POLLHUP.

(cherry picked from commit e8e9227f5c3f8d47bec1d57a2801b22d53d0b341)

4 years agopager: lets check SYSTEMD_PAGERSECURE with secure_getenv()
Lennart Poettering [Thu, 15 Oct 2020 08:54:48 +0000 (10:54 +0200)]
pager: lets check SYSTEMD_PAGERSECURE with secure_getenv()

I can't think of any real vulnerability about this, but it still feels
better to check a variable with "secure" in its name with
secure_getenv() rather than plain getenv().

Paranoia FTW!

(cherry picked from commit b8f736b30e20a2b44e7c34bb4e43b0d97ae77e3c)

4 years agosd-bus: break the loop in bus_ensure_running() if the bus is not connecting
Zbigniew Jędrzejewski-Szmek [Wed, 14 Oct 2020 12:03:13 +0000 (14:03 +0200)]
sd-bus: break the loop in bus_ensure_running() if the bus is not connecting

This might fix #17025:
> the call trace is
> bus_ensure_running -> sd_bus_process -> bus_process_internal -> process_closeing --> sd_bus_close
>                                                                                  |
>                                                                                  \-> process_match

We ended doing callouts to the Disconnected matches from bus_ensure_running()
and shouldn't. bus_ensure_running() should never do callouts. This change
should fix this however: once we notice that the connection is going down we
will now fail instantly with ENOTOCONN instead of calling any callbacks.

(cherry picked from commit 93a59b1ae5d3bcb0ec1488ebc13d0d1ff4d1729a)

4 years agocore: debug log about received fds
Lennart Poettering [Wed, 14 Oct 2020 14:35:37 +0000 (16:35 +0200)]
core: debug log about received fds

(cherry picked from commit 670eed4c8ca36505fc93ff140341ccb9c04510f4)

4 years agoexecute: fix single character typo
Lennart Poettering [Wed, 14 Oct 2020 14:21:04 +0000 (16:21 +0200)]
execute: fix single character typo

Corrects: c413bb28df0996be99fd6b3f2335dfe8739d62fb

Fixes: #17313
(cherry picked from commit f5fa352f1ef5a9cc05df87bc282b13a24f9d5398)

https://github.com/systemd/systemd-stable/issues/79

4 years agoman: update sd_bus_message_read_array() docs to clarify return value 0 vs. 1
Lennart Poettering [Wed, 14 Oct 2020 15:08:26 +0000 (17:08 +0200)]
man: update sd_bus_message_read_array() docs to clarify return value 0 vs. 1

(cherry picked from commit 4840807c6ddd15f093eea32acc6bb93ffac67dfe)

4 years agosd-bus: initialize return values on success in sd_bus_message_read_array()
Lennart Poettering [Wed, 14 Oct 2020 14:35:55 +0000 (16:35 +0200)]
sd-bus: initialize return values on success in sd_bus_message_read_array()

Fixes: #17346
(cherry picked from commit 6293d958a4e12269261a7b68441b1c5be71d1f02)

4 years agopager: make pager secure when under euid is changed or explicitly requested
Zbigniew Jędrzejewski-Szmek [Wed, 7 Oct 2020 09:15:05 +0000 (11:15 +0200)]
pager: make pager secure when under euid is changed or explicitly requested

The variable is renamed to SYSTEMD_PAGERSECURE (because it's not just about
less now), and we automatically enable secure mode in certain cases, but not
otherwise.

This approach is more nuanced, but should provide a better experience for
users:

- Previusly we would set LESSSECURE=1 and trust the pager to make use of
  it. But this has an effect only on less. We need to not start pagers which
  are insecure when in secure mode. In particular more is like that and is a
  very popular pager.

- We don't enable secure mode always, which means that those other pagers can
  reasonably used.

- We do the right thing by default, but the user has ultimate control by
  setting SYSTEMD_PAGERSECURE.

Fixes #5666.

v2:
- also check $PKEXEC_UID

v3:
- use 'sd_pid_get_owner_uid() != geteuid()' as the condition

(cherry picked from commit 0a42426d797406b4b01a0d9c13bb759c2629d108)

4 years agopager: set $LESSSECURE whenver we invoke a pager
Lennart Poettering [Mon, 31 Aug 2020 17:37:13 +0000 (19:37 +0200)]
pager: set $LESSSECURE whenver we invoke a pager

Some extra safety when invoked via "sudo". With this we address a
genuine design flaw of sudo, and we shouldn't need to deal with this.
But it's still a good idea to disable this surface given how exotic it
is.

Prompted by #5666

(cherry picked from commit 612ebf6c913dd0e4197c44909cb3157f5c51a2f0)

4 years agosystemctl: ignore invalid variables in import-environment
Zbigniew Jędrzejewski-Szmek [Mon, 28 Sep 2020 15:29:34 +0000 (17:29 +0200)]
systemctl: ignore invalid variables in import-environment

When doing import-environment, we shouldn't fail if some assignment is invalid.
OTOH, if the invalid assignment is specified as a positional argument, we should
keep failing.

This would also fix https://bugzilla.redhat.com/show_bug.cgi?id=1754395, by
ignoring certain variables which are not important in that scenario. It seems
like the right thing to do in general.

(cherry picked from commit a4ccce22d9552dc74b6916cc5ec57f2a0b686b4f)

4 years agoseccomp: allowlist close_range() by default in @basic-io
Lennart Poettering [Wed, 14 Oct 2020 07:40:37 +0000 (09:40 +0200)]
seccomp: allowlist close_range() by default in @basic-io

(cherry picked from commit 6ea0d25c573c6ef64f62333b7e850067a202c7ee)

4 years agoalloc-util: avoid allocating zero size memory blocks
Lennart Poettering [Wed, 14 Oct 2020 08:24:08 +0000 (10:24 +0200)]
alloc-util: avoid allocating zero size memory blocks

It's not clear what libc's make of this. We clamp to 1 byte allocations
in most cases already, let's add this for a few where this was missing.

(cherry picked from commit 562b01e99646a21ba8a0f4f52c578a38b3f7d03d)

4 years agosd-device: use trivial_hash_ops_free_free for managing match sysattrs or properties
Yu Watanabe [Tue, 13 Oct 2020 13:41:34 +0000 (22:41 +0900)]
sd-device: use trivial_hash_ops_free_free for managing match sysattrs or properties

This fixes an issue caused by eb1c1dc029c91750e6255c3fd844b4f4bf238fab.

Before the commit, multiple values can be specified for the same
sysattr or property.

Fixes #17259.

(cherry picked from commit a0887abbd8bd9f1a9a975af08e6b4a43960bb3e2)

4 years agoutil: introduce two trivial hash_ops
Yu Watanabe [Tue, 13 Oct 2020 13:40:19 +0000 (22:40 +0900)]
util: introduce two trivial hash_ops

Will be used in a later commit.

(cherry picked from commit 5e71868ced159355a25dc935b24c8e9b1d946bd7)

4 years agohashmap: introduce {hashmap,set}_put_strdup_full()
Yu Watanabe [Tue, 13 Oct 2020 13:39:02 +0000 (22:39 +0900)]
hashmap: introduce {hashmap,set}_put_strdup_full()

They can take hash_ops.

(cherry picked from commit 11e9fec2590d9726c57498d5c2ed9ea2860ad443)

4 years agotypo in systemd.network(5): IPv6PrefixDelegation=dhcpv6
Dmitry Borodaenko [Tue, 13 Oct 2020 21:35:59 +0000 (14:35 -0700)]
typo in systemd.network(5): IPv6PrefixDelegation=dhcpv6

(cherry picked from commit 5fad3913e2db5eda2339419e049af88953c17ff3)

4 years agounits: update serial-getty@.service to support 57600 baud rate
Bjørn Mork [Tue, 13 Oct 2020 15:07:07 +0000 (17:07 +0200)]
units: update serial-getty@.service to support 57600 baud rate

Fixes: #17306
(cherry picked from commit 7fe7547ba3b953c142f41a9931dba7b6ff78fe0b)

4 years agosysctl: set kernel.core_pipe_limit=16
Lennart Poettering [Mon, 12 Oct 2020 14:31:42 +0000 (16:31 +0200)]
sysctl: set kernel.core_pipe_limit=16

We need to make sure that our coredump pattern handler manages to read
process metadata from /proc/$PID/ before the kernel reaps the crashed
process. By default the kernel will reap the process as soon as it can.
By setting kernel.core_pipe_limit to a non-zero the kernel will wait for
userspace to finish before reaping.

We'll set the value to 16, which allows 16 crashes to be
processed in parallel. This matches the MaxConnections= setting in
systemd-coredump.socket.

See: #17301

(This doesn't close 17301, since we probably should also gracefully
handle if /proc/$PID/ vanished already while our coredump handler runs,
just in case people loclly set the sysctl back to zero. i.e. we should
collect what we can and rather issue an incomplete log record than
none.)

(cherry picked from commit 2a9b9323cd844baae3229e9dba67e478bee70654)

4 years agoxdg-autostart: Lower most info messages to debug level
Benjamin Berg [Mon, 12 Oct 2020 09:02:26 +0000 (11:02 +0200)]
xdg-autostart: Lower most info messages to debug level

It is expected for numerous autostart files to not be convertible to
corresponding units. The information is only useful for someone
debugging why a file might not be started, but it is not generally
useful for users in most situations.

As such, lower the warnings. Anyone wondering why an application is not
started will easily notice that the unit is not generated. From there it
will be somewhat harder to figure out why, but the overall trade-off is
still improved.

Fixes: #17305
(cherry picked from commit 47c1db6730b8a81b01e8505a648624fa6ad0bbd7)

4 years agologind: print what action is ignored
Zbigniew Jędrzejewski-Szmek [Sat, 10 Oct 2020 07:49:28 +0000 (09:49 +0200)]
logind: print what action is ignored

My logs have lines like this:
Oct 10 09:38:38 krowka systemd-logind[1889]: External (2) displays connected.
Oct 10 09:38:38 krowka systemd-logind[1889]: Refusing operation, as it is turned off.
Without some hint *what* operation is ignored, this is not very informative.

(I remember this came up before, but I don't remember why we didn't change this
log line back then...)

(cherry picked from commit bf135d82585f9a6356fa818fe4c130d3e3524918)

4 years agoresolved: don't append RFC6975 data to stub replies
Lennart Poettering [Fri, 9 Oct 2020 14:47:34 +0000 (16:47 +0200)]
resolved: don't append RFC6975 data to stub replies

We previously checked the QR bit to decide whether the RFC6975 algorithm
data in our packets. But that doesn't work in many cases, since we
initialize the QR flags along with the other flags usually only after
appending OPT (since success to do so propagates into flags). Hence,
let's add an explicit parameter that controls whether to include RFC6975
data in DNS packets, and set it to false for stub reply, and on true for
upstream queries.

Fixes: #17217
(cherry picked from commit c36d5b5be900315b113a62199274c37fe47a37cd)

4 years agoxdg-autostart: Ignore more common XDG Desktop Entry fields
Benjamin Berg [Thu, 8 Oct 2020 13:58:37 +0000 (15:58 +0200)]
xdg-autostart: Ignore more common XDG Desktop Entry fields

It makes sense to ignore all the common fields that are expected and
that we can safely ignore. Note that it is fine to ignore URL as we will
already warn about the type= being wrong in that case.

Closes: #17276
(cherry picked from commit 51ac77d58c03f337e1347263eb4995e1f9947a9d)

4 years agoxdg-autostart: Add support for Path= in XDG Desktop File
Benjamin Berg [Thu, 8 Oct 2020 13:58:08 +0000 (15:58 +0200)]
xdg-autostart: Add support for Path= in XDG Desktop File

This sets the working directory of the application.

(cherry picked from commit d5273f51a1f452575eccfb855a8dc383c8d23f3a)

4 years agomissing_syscall: fixup syscall numbers for x32 vs. amd64
Zbigniew Jędrzejewski-Szmek [Tue, 8 Dec 2020 14:11:01 +0000 (15:11 +0100)]
missing_syscall: fixup syscall numbers for x32 vs. amd64

Ported from 356e9c668732895c2887e48fa618367683dd9fff.

4 years agosd-event: check return value of syscals directly, avoid redundant variable assignment
Lennart Poettering [Thu, 8 Oct 2020 16:50:36 +0000 (18:50 +0200)]
sd-event: check return value of syscals directly, avoid redundant variable assignment

And while we are at it, fix one incorrect error propagation.

(cherry picked from commit 15c689d77f9d8d46a39be39ed5acfdaed794301c)

4 years agomissing-syscall: fix copypasta
Lennart Poettering [Thu, 8 Oct 2020 08:27:30 +0000 (10:27 +0200)]
missing-syscall: fix copypasta

As noticed by @mbiebl:

https://github.com/systemd/systemd/commit/5134e18eedc30bfe5397ed31f94903d984a60cfc#r43033443
(cherry picked from commit ba28df775d451edfcca9f996d60ed34c1dde2ac5)

4 years agobasic/missing_syscall: fix syscall numbers for mips*
Zbigniew Jędrzejewski-Szmek [Tue, 8 Dec 2020 14:03:03 +0000 (15:03 +0100)]
basic/missing_syscall: fix syscall numbers for mips*

Based on cd2065989163a5b6f71c8f1e4a8d73f1be63a52b.

4 years agopretty-print: don't abbreviate needlessly in user-facing string
Lennart Poettering [Wed, 7 Oct 2020 14:38:29 +0000 (16:38 +0200)]
pretty-print: don't abbreviate needlessly in user-facing string

(cherry picked from commit e2d839d316b006fe86b1f156d90da35fa0857bfb)

4 years agobasic: include stddef.h since we use NULL in header
Lennart Poettering [Wed, 7 Oct 2020 14:38:07 +0000 (16:38 +0200)]
basic: include stddef.h since we use NULL in header

(cherry picked from commit 0f2219bb8f19f0e3afb479e9c8f2ca6cbd1d9608)

4 years agounit: don't emit PropertiesChanged signal if adding a dependency to a unit is a no-op
Renaud Métrich [Fri, 2 Oct 2020 15:30:35 +0000 (17:30 +0200)]
unit: don't emit PropertiesChanged signal if adding a dependency to a unit is a no-op

(cherry picked from commit 5177cb0a9add4ae568cff6e6f7c2b3c77760c343)

4 years agosystemctl: drop unsused variable original_stdout_is_tty
Lennart Poettering [Wed, 7 Oct 2020 09:30:32 +0000 (11:30 +0200)]
systemctl: drop unsused variable original_stdout_is_tty

Unused since de9a8fe18e0168b65ae50b6dde2865f647fc92a2.

(cherry picked from commit b8aaceb9b599ab61843165f0c162844f5499bcb4)

4 years agosocket-proxy: close correct fd, log at right log level
Lennart Poettering [Thu, 1 Oct 2020 20:20:42 +0000 (22:20 +0200)]
socket-proxy: close correct fd, log at right log level

(cherry picked from commit 76c59537f3fef708109f90f6a728a8252d65e420)

4 years agoDocument some reasonable DNS servers in the example config file
Zbigniew Jędrzejewski-Szmek [Tue, 6 Oct 2020 11:59:25 +0000 (13:59 +0200)]
Document some reasonable DNS servers in the example config file

We have an option to set the fallback list, so we don't know what the contents
are. It may in fact be empty. Let's add some examples to make it easy for a user
stranded without any DNS to fill in something that would work. As a bonus, this
also gives names to the entries we provide by default.
(I added google and cloudflare because that's what we have currently, and quad9
because it seems to be a good privacy-concious and fast choice and was requested
in #12499. As a minimum, things we should include should be well-known global
services with a documented privacy policy and both IPv4 and IPv6 support and
decent response times.)

(cherry picked from commit 206178a9d22f5dc60f15decd8fe879326cbf4c25)

4 years agoboot/efi: Explicitly specify void in parameter list
Marco Wang [Tue, 6 Oct 2020 17:07:55 +0000 (01:07 +0800)]
boot/efi: Explicitly specify void in parameter list

Functions that accept no arguments should be
explicitly declared a void parameter in their parameter list.

Signed-off-by: Marco Wang <m.aesophor@gmail.com>
(cherry picked from commit ee85122987decae4f9f3b1dad6f7bc3b08b92526)

4 years agoudevadm: ignore -ENODEV on trigger
Yu Watanabe [Mon, 5 Oct 2020 21:39:22 +0000 (06:39 +0900)]
udevadm: ignore -ENODEV on trigger

The commit 88da55e28b467999da005591d3252a98f4436522 erroneously makes
`udevadm trigger` treat -ENODEV error critical.
This makes -ENODEV ignored again.

Fixes #17250.

(cherry picked from commit 1b97c5cba58fdd1138e7622d7edef9a48309b0e2)

4 years agobasic/virt: Detect PowerVM hypervisor
Michal Suchanek [Fri, 2 Oct 2020 09:05:23 +0000 (11:05 +0200)]
basic/virt: Detect PowerVM hypervisor

Currently systemd-detect-virt fails to detect running under PowerVM.

Add code to detect PowerVM based on code in util-linux.

Signed-off-by: Michal Suchanek <msuchanek@suse.de>
(cherry picked from commit 3224e38bb6b3287ca253cbafb460a150544d5818)

4 years agoman: reword description of KillOnlyUsers=/KillExcludeUsers=
Zbigniew Jędrzejewski-Szmek [Mon, 5 Oct 2020 12:27:04 +0000 (14:27 +0200)]
man: reword description of KillOnlyUsers=/KillExcludeUsers=

Fixes #17177.

(cherry picked from commit 41b6ae4da3d3e1360a9f78ca3e1176a3bfe2ec2d)

4 years agoman: reword the descriptions of VXLAN DestinationPort= and PortRange=
Zbigniew Jędrzejewski-Szmek [Mon, 5 Oct 2020 12:23:19 +0000 (14:23 +0200)]
man: reword the descriptions of VXLAN DestinationPort= and PortRange=

The usual: "empty string" is meaningless in this context. We are not assigning
DestinationPort="". Just say "unset".

Fixes #17240.

(cherry picked from commit e6fd398d61a9810d53a2a5a30294500718e43286)

4 years agoman: reword of fido2 key derivation
Zbigniew Jędrzejewski-Szmek [Mon, 5 Oct 2020 12:11:02 +0000 (14:11 +0200)]
man: reword of fido2 key derivation

"keyed by" is indeed a bit jargony. Say " a HMAC hash of the salt combined with
an internal secret key" instead.

For #17177.

(cherry picked from commit e0c60bf6a0065ba447b50fcb1bb171725e8bd00d)

4 years agoman: fix table alignment
Lennart Poettering [Mon, 5 Oct 2020 15:45:58 +0000 (17:45 +0200)]
man: fix table alignment

(cherry picked from commit ddd6dd9f2398c01f69acf163bfdedf161d7cea0d)

4 years agoshell-completion: add missing completions to meson.build
Lucas Werkmeister [Sun, 4 Oct 2020 13:39:24 +0000 (15:39 +0200)]
shell-completion: add missing completions to meson.build

Completions for systemd-id128 and homectl have been available for a
while, but weren’t being installed.

(cherry picked from commit 7c57a030e0d654ce0e4d557da826170fb5ac5bc2)

4 years agoseccomp-util: fix typo in help message
Samanta Navarro [Sat, 3 Oct 2020 11:56:40 +0000 (11:56 +0000)]
seccomp-util: fix typo in help message

(cherry picked from commit 7b121df640475a3c8b9891a307f562abc754293d)

4 years agocryptsetup-generator: drop unused fstat()
Zbigniew Jędrzejewski-Szmek [Thu, 24 Sep 2020 08:45:25 +0000 (10:45 +0200)]
cryptsetup-generator: drop unused fstat()

The result stopped being used in 71e4e1258436e7e81d772aed52a02bb5d9c87cb8.

(cherry picked from commit 115a7fb624091a431e834f82c0633b00598eb510)

4 years agonspawn: give better message when invoked as non-root without arguments
Zbigniew Jędrzejewski-Szmek [Wed, 23 Sep 2020 10:20:14 +0000 (12:20 +0200)]
nspawn: give better message when invoked as non-root without arguments

When invoked as non-root, we would suggest re-running as root without any
further hint. But this immediately spawns a machine from the local directory,
which can be rather surprising. So let's give a better hint.

(In general, I don't think commandline programs should do "significant" things
when invoked without any arguments. In this regard it would be better if
systemd-nspawn would not spawn a machine from the current directory if called
with no arguments and at least "-D ." would be required.)

(cherry picked from commit 38ee19c04b1a7a9f8858d791c68c8a9b711a4e3d)

4 years agobootspec: don't fail with EIO if searching for ESP and finding one without an envelop...
Lennart Poettering [Wed, 30 Sep 2020 09:04:08 +0000 (11:04 +0200)]
bootspec: don't fail with EIO if searching for ESP and finding one without an enveloping partition table

If this happens this should just mean: we couldn't find the ESP.

Fixes: #17122
(cherry picked from commit 7ea3024b508ac7166851bd8728ac31802586d614)

4 years agoman: mention that sd_bus_send() buffers locally, and sd_bus_process() is needed to...
Lennart Poettering [Wed, 23 Sep 2020 08:09:53 +0000 (10:09 +0200)]
man: mention that sd_bus_send() buffers locally, and sd_bus_process() is needed to flush it out

Prompted-by: #17128
(cherry picked from commit 533ee38b56e881a49481bdc095793c294acce121)

4 years agoresolvectl: show resolv.conf mode in resolvectl output
Lennart Poettering [Tue, 29 Sep 2020 15:28:31 +0000 (17:28 +0200)]
resolvectl: show resolv.conf mode in resolvectl output

(cherry picked from commit 147a5046aadc2909647be32194c65d67eb42d9ce)

4 years agoresolved: expose a new bus property that informs about the /etc/resolv.conf mode
Lennart Poettering [Tue, 29 Sep 2020 15:25:15 +0000 (17:25 +0200)]
resolved: expose a new bus property that informs about the /etc/resolv.conf mode

It can be one of "foreign", "missing", "stub", "static", "uplink",
depending on how /etc/resolv.conf is set up:

foreign → someone/something else manages /etc/resolv.conf,
    systemd-resolved is just the consumer

missing → /etc/resolv.conf is missing altogether

stub/static/uplink → the file is managed by resolved, with the
    well-known modes

Fixes: #17159
(cherry picked from commit 4261ab654c0df009b5a37a30593d58d47fec617f)

4 years agologinctl: add -P as short for --value --property=
Ronan Pigott [Wed, 30 Sep 2020 06:51:08 +0000 (23:51 -0700)]
loginctl: add -P as short for --value --property=

(cherry picked from commit 60b254ca1a4ac81b71dd5de8c396c663bafa64a7)

4 years agosysusers: use "!*" instead of "!!" as an invalid group password
nl6720 [Wed, 30 Sep 2020 05:09:25 +0000 (08:09 +0300)]
sysusers: use "!*" instead of "!!" as an invalid group password

This basically implements fc58c0c7bf7e4f525b916e3e5be0de2307fef04e for gshadow.
gpasswd may not have a lock/unlock that behaves the same as passwd, but
according to gshadow(5) the logic of the password field is the same.

(cherry picked from commit bbbfe49b5eb0c571c10fa7991c10bac620f3c453)

4 years agoseccomp-util: add cacheflush() syscall to @default syscall set
Lennart Poettering [Tue, 29 Sep 2020 13:59:28 +0000 (15:59 +0200)]
seccomp-util: add cacheflush() syscall to @default syscall set

This is like membarrier() I guess and basically just exposes CPU
functionality via kernel syscall on some archs. Let's whitelist it for
everyone.

Fixes: #17197
(cherry picked from commit 8e24b1d23f5fa711bfdfd38bcfef525de04cd3c1)

4 years agozsh: loginctl: complete alias 'self'
Ronan Pigott [Wed, 30 Sep 2020 07:11:48 +0000 (00:11 -0700)]
zsh: loginctl: complete alias 'self'

(cherry picked from commit 0fb8f025065ddaf3d197cce6776962ff64de5300)

4 years agopath-lookup: Correct order of XDG_CONFIG_HOME and XDG_CONFIG_DIRS
Pass Automated Testing Suite [Mon, 28 Sep 2020 15:49:55 +0000 (17:49 +0200)]
path-lookup: Correct order of XDG_CONFIG_HOME and XDG_CONFIG_DIRS

According to the XDG Base Directory Specification [1] XDG_CONFIG_HOME
should take precedence over XDG_CONFIG_DIRS.

Fixes: https://github.com/systemd/systemd/issues/16095

[1]: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html

(cherry picked from commit e3820eeaf11f3b4614cbdfbc85675bc16a486e21)

4 years agodocs: update old documentation links
nl6720 [Tue, 29 Sep 2020 13:10:08 +0000 (16:10 +0300)]
docs: update old documentation links

(cherry picked from commit f856778b9c87d2dc9a6924db0cf26374aa7235c3)

4 years agoudevadm: do not ignroe error caused by unpriviledged user invoking the command
Yu Watanabe [Tue, 29 Sep 2020 04:44:28 +0000 (13:44 +0900)]
udevadm: do not ignroe error caused by unpriviledged user invoking the command

This effectively reverts commit 67acde4869a9505f9721e31fa5167c82445e0e12.

After commits 569ad251adde02dc0915758fe027e0346e50738a and
67acde4869a9505f9721e31fa5167c82445e0e12, -EACCES errors are ignored,
and thus 'udevadm trigger' succeeds even when it is invoked by non-root
users. Moreover, on -EACCES error, log messages are shown in debug
level, so usually we see no message, and users are easily confused
why uevents for devices are not triggered.

(cherry picked from commit 88da55e28b467999da005591d3252a98f4436522)

4 years agoman: fix reference to unit file
Lennart Poettering [Mon, 28 Sep 2020 14:29:36 +0000 (16:29 +0200)]
man: fix reference to unit file

It' "systemd-tmpfiles-clean" not "systemd-tmpfiles-cleanup"

Fixes: #17171
(cherry picked from commit 6457e88902a9e2cf0b7f184a8e50a7ef666bcc78)

4 years agocore: move reset_arguments() to the end of main's finish
Anita Zhang [Thu, 17 Sep 2020 08:49:17 +0000 (01:49 -0700)]
core: move reset_arguments() to the end of main's finish

Fixes #16991

fb39af4ce42d7ef9af63009f271f404038703704 replaced `free_arguments()` with
`reset_arguments()`, which frees arg_* variables as before, but also resets all
of them to the default values. `reset_arguments()` was positioned
in such a way that it overrode some arg_* values still in use at shutdown.

To avoid further unintentional resets, I moved `reset_arguments()`
right before the return, when nothing else will be using the arg_* variables.

(cherry picked from commit 7d9eea2bd3d4f83668c7a78754d201b226acbf1e)

4 years agocore: ensure that namespace tmp directories always get the correct label
bauen1 [Fri, 25 Sep 2020 16:45:29 +0000 (18:45 +0200)]
core: ensure that namespace tmp directories always get the correct label

If a namespace with PrivateTmp=true is constructed we need to restore
the context of the namespaces /tmp directory (i.e.
/tmp/systemd-private-XXXXX/tmp) to the (default) context of /tmp .
Otherwise filetransitions might result in the namespaces tmp directory
having the wrong context.

(cherry picked from commit 19cd4e1967ddb0a576688793a050a9f01e714928)

4 years agoRemoving unused n_fields in journal-gatewayd
Samuel BF [Sun, 27 Sep 2020 20:01:44 +0000 (22:01 +0200)]
Removing unused n_fields in journal-gatewayd

(cherry picked from commit d99d1aaa21e216b2c2f520b58f847248407ba768)

4 years agoloop-util: apparently opening a loop device sometimes results in ENXIO, handle this
Lennart Poettering [Thu, 24 Sep 2020 13:08:22 +0000 (15:08 +0200)]
loop-util: apparently opening a loop device sometimes results in ENXIO, handle this

(cherry picked from commit 77ad674b51ceb598aae1adaa7abe572ad0262f39)

4 years agocryptsetup-generator: use "/proc/cmdline" as source when appropriate
Jonathan Lebon [Wed, 23 Sep 2020 19:23:58 +0000 (15:23 -0400)]
cryptsetup-generator: use "/proc/cmdline" as source when appropriate

Right now, we always say `/etc/crypttab` even if the source was fully
derived from the kargs.

Let's match what `systemd-fstab-generator` does and use `/proc/cmdline`
when that's the case.

(cherry picked from commit 62ca7d3b38dbbfbffa0aa0d3746b6be2916530b5)

4 years agotest-seccomp: accept ENOSYS from sysctl(2) too
Zbigniew Jędrzejewski-Szmek [Tue, 22 Sep 2020 17:05:17 +0000 (19:05 +0200)]
test-seccomp: accept ENOSYS from sysctl(2) too

It seems that kernel 5.9 started returning that.

(cherry picked from commit 0af05e485a3a88f454c714901eb6109307dc893e)

4 years agotest/run-integration-tests: do not run the tests if only "clean" is passed
Zbigniew Jędrzejewski-Szmek [Mon, 21 Sep 2020 22:00:59 +0000 (00:00 +0200)]
test/run-integration-tests: do not run the tests if only "clean" is passed

(cherry picked from commit abf6346c5e65ec1ab1f83841e9bd07a2e301dde8)

4 years agosd-dhcp6-client: Fix sending prefix delegation request (#17136)
mog422 [Thu, 24 Sep 2020 15:04:52 +0000 (00:04 +0900)]
sd-dhcp6-client: Fix sending prefix delegation request (#17136)

SD_DHCP6_OPTION_IA_NA does not exist in DHCP6_ADVERTISE packet if DHCP server only provides prefix delegation. So the attempt to send the DHCP6_REQUEST packet fails on r = dhcp6_option_append_ia(&opt, &optlen, &client->lease->ia); forever.

(cherry picked from commit 26a63b81322a3bd8b9fbd43f75897c391708de2c)

4 years agocatalog: add missing @ to German catalog file
Lennart Poettering [Wed, 23 Sep 2020 11:56:51 +0000 (13:56 +0200)]
catalog: add missing @ to German catalog file

(cherry picked from commit 3142135098ed625fd79966c86338e2bbc8f134b2)

4 years agomachine: fix error code propagation in two cases
Lennart Poettering [Wed, 23 Sep 2020 08:21:27 +0000 (10:21 +0200)]
machine: fix error code propagation in two cases

(cherry picked from commit d5bc4e68987a527448ee5a00cc433fc5abec4028)

4 years agoman: sd_bus_message_new: fix typo
Roy Chen (陳彥廷) [Wed, 23 Sep 2020 09:52:22 +0000 (17:52 +0800)]
man: sd_bus_message_new: fix typo

(cherry picked from commit f280aecd38bb1a62ac02fb1033644a97993860b2)

4 years agozsh: add systemd-path completions
Ronan Pigott [Wed, 23 Sep 2020 00:52:53 +0000 (17:52 -0700)]
zsh: add systemd-path completions

(cherry picked from commit cf18af825aa4a55debcf2ed88a5b930dfbc0d23f)

4 years agohomed: in images that lack mkfs.btrfs automatically fall back to ext4
Lennart Poettering [Mon, 21 Sep 2020 15:30:03 +0000 (17:30 +0200)]
homed: in images that lack mkfs.btrfs automatically fall back to ext4

It's better to tweak suboptimal defaults than to just fail with
compiled-in defaults.

(cherry picked from commit a512e330ce3eb7150c28664e17603df2ef876a2a)

4 years agohomed: show actual file system in messages about file systems
Lennart Poettering [Mon, 21 Sep 2020 15:21:12 +0000 (17:21 +0200)]
homed: show actual file system in messages about file systems

(cherry picked from commit f2ba663ea5135419a0b69d3748975a74dbb88a87)

4 years agouser-record: don't refuse login when last pw change time is in the future
Lennart Poettering [Wed, 2 Sep 2020 14:37:42 +0000 (16:37 +0200)]
user-record: don't refuse login when last pw change time is in the future

The RTC is like just off, it's a weird system state, let's continue
without requiring pw change.

(cherry picked from commit 3e0b54867e22523cffda3b80e179df89b6d81bcd)

4 years agohomed: ignore ratelimiting counters when timestamp is from future
Lennart Poettering [Wed, 2 Sep 2020 14:36:27 +0000 (16:36 +0200)]
homed: ignore ratelimiting counters when timestamp is from future

This likely indicates that the system clock is simply wrong, hence allow
access in this case.

Fixes: #15917
(cherry picked from commit 61a29a020c5c6611a22a84c1456e8da7aa656194)

4 years agohomed: don't block logins into accounts with future change time
Lennart Poettering [Wed, 2 Sep 2020 14:35:22 +0000 (16:35 +0200)]
homed: don't block logins into accounts with future change time

This might happen if the system clock is wrong, and we should allow
access in this case (though certainly log about it).

(cherry picked from commit 51a95db6dcb720608eccaac01328b66ef7cc0d30)

4 years agounits: pass CAP_SYS_RESOURCE to homed
Lennart Poettering [Fri, 18 Sep 2020 20:01:49 +0000 (22:01 +0200)]
units: pass CAP_SYS_RESOURCE to homed

The ext4 fs resize ioctl needs CAP_SYS_RESOURCE, irritatingly. Let's
grant it to homed hence.

Fixes: #15115
(cherry picked from commit c9ef77ec5ff5e7e283181e9dcfb93acfb0656ae6)

4 years agotmpfiles: properly prefix paths in debug outputs
Lennart Poettering [Tue, 28 Jul 2020 15:53:21 +0000 (17:53 +0200)]
tmpfiles: properly prefix paths in debug outputs

This is otherwise very confusing...

(cherry picked from commit b8e35011f726925d4c1640c5b721c18f7da9bd97)

4 years agounits: order systemd-user-sessions.service after home.mount
Lennart Poettering [Thu, 6 Aug 2020 21:33:29 +0000 (23:33 +0200)]
units: order systemd-user-sessions.service after home.mount

This should make /home as automount work reasonably well.

If /home is an automount this has little effect at boot, because if the
automount is not triggered it doesn't matter how the associated mount is
ordered.

It does matter at shutdown however, where home.mount is likely active
now. There the ordering means we'll end sessions first, and only then
deactivate home.mount.

Fixes: #16291
(cherry picked from commit bbac7da2b379dfe951db23278ebe8a728ecce7a5)

4 years agoUpdate DISCOVERABLE_PARTITIONS.md
Marc Kleine-Budde [Wed, 5 Aug 2020 12:10:21 +0000 (14:10 +0200)]
Update DISCOVERABLE_PARTITIONS.md

This patch fixes a typo in the link to the systemd-id128 documentation.

(cherry picked from commit 3f449f2106b2e9335d17ebac0410f6a548345c57)

4 years agodocs: spelling fixes
Joerg Behrmann [Tue, 4 Aug 2020 09:31:44 +0000 (11:31 +0200)]
docs: spelling fixes

(cherry picked from commit c90b6abc91fdf2c7d39b886581e3b277b0e6fe5b)

4 years agodhcp6: remove assertions in dhcp6_option_parse_domainname()
Beniamino Galvani [Wed, 22 Jul 2020 03:03:47 +0000 (05:03 +0200)]
dhcp6: remove assertions in dhcp6_option_parse_domainname()

Assertions are for programming errors; here the input comes directly
from the DHCP response packet.

(cherry picked from commit af710b535b4ceacd0aecec6748a4f8ee57742e99)

4 years agodoc: Put proot under "container" section
Chris Down [Mon, 3 Aug 2020 10:35:11 +0000 (11:35 +0100)]
doc: Put proot under "container" section

Missed in #15426. Otherwise, it ends up only taking the first two rows
of the table, in no section.

(cherry picked from commit 45ba6a585321cc655ce53d22d631747961330d69)

5 years agonetwork: directly compare with in_addr element for IPv4 case
Yu Watanabe [Mon, 12 Oct 2020 00:06:28 +0000 (09:06 +0900)]
network: directly compare with in_addr element for IPv4 case

When peer address is set, address_compare() (or address_equal()) mostly
does not work in link_is_static_address_configured(), as an Address object
stored in a Link does not contain peer addresses. So, we need to also
compare with in_addr element for IPv4 case.

Fixes #17304.

(Based on 9b9c5fff16784b007f6ec313adafd29f4f737ab5)

5 years agokernel-install/90-loaderentry: fix when /boot is not mountpoint v246.6
Kir Kolyshkin [Sat, 1 Aug 2020 02:24:15 +0000 (19:24 -0700)]
kernel-install/90-loaderentry: fix when /boot is not mountpoint

I happen to have a machine where /boot is not a separate mountpoint,
but rather just a directory under /. After upgrade to recent Fedora,
I found out that grub2 can't find any new kernels.

This happens because loadentry script generates kernel and initrd file
paths relative to /boot, while grub2 expects path to be relative to the
root of filesystem on which they are residing.

This commit fixes this issue by using stat's %m to find the mount point
of a partition holding the images, and using it as a prefix to be
removed from ENTRY_DIR_ABS.

Note that %m for stat requires coreutils 8.6, released in Oct 2010.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
(cherry picked from commit 1cdbff1c844ce46f1d84d8feeed426ebfd550988)

5 years agohomed: make clean that --storage=directory --image-path=/dev/some-block-device is...
Lennart Poettering [Fri, 18 Sep 2020 17:37:05 +0000 (19:37 +0200)]
homed: make clean that --storage=directory --image-path=/dev/some-block-device is not supported

The directory backend needs a file system path, and not a raw block
device. That's only supported for the LUKS2 backend.

Let's make this clearer in the man page and also generate a better error
message if attempted anyway.

Fixes: #17068
(cherry picked from commit f9d525ae558105bf7fd77ad76e4fdb135bb9f634)

5 years agohomed: make sure our worker processes finish before we exit
Lennart Poettering [Fri, 18 Sep 2020 16:53:12 +0000 (18:53 +0200)]
homed: make sure our worker processes finish before we exit

When exiting, let's explicitly wait for our worker processes to finish
first. That's useful if unmounting of /home/ is scheduled to happen
right after homed is down, as we then can be sure that the home
directories are properly unmounted and detached by the time homed is
fully terminated (otherwise it might happen that our worker gets killed
by the service manager, thus leaving the home directory and its backing
devices up/left for auto-clean which might be async).

Likely fixes #16842

(cherry picked from commit 9796a9fbad5bae4d66bb40d848f6245d1ee327d8)

5 years agonspawn: fix fd leak on failure path
Lennart Poettering [Wed, 16 Sep 2020 20:16:10 +0000 (22:16 +0200)]
nspawn: fix fd leak on failure path

(cherry picked from commit 2fef50cd9eee59cea6145639f6bd464939fac624)

5 years agonspawn: check return of setsid()
Lennart Poettering [Wed, 16 Sep 2020 20:11:48 +0000 (22:11 +0200)]
nspawn: check return of setsid()

Let's verify that everything works the way we expect it to work, hence
check setsid() return code.

(cherry picked from commit efe426624046089b74b70708e61f304f3cd414a7)

5 years agodissect: is_loop_device() returns negative on error, don't mistake that is true
Lennart Poettering [Thu, 17 Sep 2020 15:24:33 +0000 (17:24 +0200)]
dissect: is_loop_device() returns negative on error, don't mistake that is true

(cherry picked from commit 3afda7c7976c25db786948a961873fa5c2c8e0e9)

5 years agodissect: always invalidate secondary arch partitions if we found primary arch
Lennart Poettering [Thu, 17 Sep 2020 15:32:34 +0000 (17:32 +0200)]
dissect: always invalidate secondary arch partitions if we found primary arch

Let's suppress the secondary arch data, since we never ever want to
mount it if we found the primary arch.

Previously we only suppressed in the Verity case, but there's little
reason to entertain the idea of a secondary arch in non-Verity
environments either, we are not going to use them, and should not do
decryption or anything like that.

(cherry picked from commit 74cb2db9f403dfe17cabc6dac48b0f49a84eb03f)

5 years agoutil: wireguard is merged into upstream kernel
Yu Watanabe [Thu, 17 Sep 2020 05:49:47 +0000 (14:49 +0900)]
util: wireguard is merged into upstream kernel

(cherry picked from commit e29e5db7dff1442ef73cbcd0c898e11078e1042d)

5 years agorepart: don't mark image files generated with --empty=create executable
Lennart Poettering [Wed, 16 Sep 2020 15:51:25 +0000 (17:51 +0200)]
repart: don't mark image files generated with --empty=create executable

(cherry picked from commit 5332d7c6ff3c56340c7477e1e7604f61092a2868)

5 years agoman: substitute path to rc.local in the man page
Zbigniew Jędrzejewski-Szmek [Tue, 15 Sep 2020 15:56:32 +0000 (17:56 +0200)]
man: substitute path to rc.local in the man page

Different systems use different paths for it and users are confused when the
man page has a path different than the one on the local system.

https://bugzilla.redhat.com/show_bug.cgi?id=1876905
(cherry picked from commit c2ee27a5e7fa1c6a71341579baa2d941c6e3e6e6)

5 years agomeson: RC_LOCAL_SCRIPT_PATH_START to RC_LOCAL_PATH
Zbigniew Jędrzejewski-Szmek [Tue, 15 Sep 2020 15:44:26 +0000 (17:44 +0200)]
meson: RC_LOCAL_SCRIPT_PATH_START to RC_LOCAL_PATH

RC_LOCAL_SCRIPT_PATH_START and RC_LOCAL_SCRIPT_PATH_STOP were was originally
added in the conversion to meson based on the autotools name. In
44508946534eee032927c263b79464832656dd6e RC_LOCAL_SCRIPT_PATH_STOP was dropped.
We don't need to use such a long name.

(cherry picked from commit 452d2dfd52f1cc686395663a6cd4c778306bd309)

5 years agosocket-proxy: allow localhost addresses
Zbigniew Jędrzejewski-Szmek [Tue, 15 Sep 2020 12:52:47 +0000 (14:52 +0200)]
socket-proxy: allow localhost addresses

With this change, only manager_connect() in timesync.d uses AI_ADDRCONFIG. There
we are connecting to a remove server, so the flag is appropriate.

(cherry picked from commit 7e5f1d4b3fb02075762a55063edf9e510142e4c9)

5 years agosd-bus: allow localhost addresses
Zbigniew Jędrzejewski-Szmek [Tue, 15 Sep 2020 12:49:36 +0000 (14:49 +0200)]
sd-bus: allow localhost addresses

By settings AI_ADDRCONFIG in hints we cannot for example resolve "localhost"
when the local machine only has a loopback interface. This seems like an
unnecessary restriction, drop it.

Inspired by https://bugzilla.redhat.com/show_bug.cgi?id=1839007.

(cherry picked from commit d0e5db44d9e1cf61ca75c8a86ffed19cc1b7fe5f)