]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
4 years agouserdbctl: make --help fit in 80 columns
Zbigniew Jędrzejewski-Szmek [Tue, 28 Apr 2020 07:13:47 +0000 (09:13 +0200)] 
userdbctl: make --help fit in 80 columns

4 years agomeson: modernize indentation
Zbigniew Jędrzejewski-Szmek [Tue, 28 Apr 2020 07:08:04 +0000 (09:08 +0200)] 
meson: modernize indentation

By using a newline after executable( and run_target(, we get less
indentation and the indentation level does not change when the returned
object is saved to a variable.

4 years agoefivars: retry open and read operations
Zbigniew Jędrzejewski-Szmek [Fri, 24 Apr 2020 08:53:46 +0000 (10:53 +0200)] 
efivars: retry open and read operations

On my laptop (Lenovo X1carbo 4th) I very occasionally see test-boot-timestamps
fail with this tb:

262/494 test-boot-timestamps                    FAIL    0.7348453998565674 s (killed by signal 6 SIGABRT)

08:12:48 SYSTEMD_LANGUAGE_FALLBACK_MAP='/home/zbyszek/src/systemd/src/locale/language-fallback-map' SYSTEMD_KBD_MODEL_MAP='/home/zbyszek/src/systemd/src/locale/kbd-model-map' PATH='/home/zbyszek/src/systemd/build:/home/zbyszek/.local/bin:/usr/lib64/qt-3.3/bin:/usr/share/Modules/bin:/usr/condabin:/usr/lib64/ccache:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/zbyszek/bin:/var/lib/snapd/snap/bin' /home/zbyszek/src/systemd/build/test-boot-timestamps
--- stderr ---
Failed to read $container of PID 1, ignoring: Permission denied
Found container virtualization none.
Failed to get SystemdOptions EFI variable, ignoring: Interrupted system call
Failed to read ACPI FPDT: Permission denied
Failed to read LoaderTimeInitUSec: Interrupted system call
Failed to read EFI loader data: Interrupted system call
Assertion 'q >= 0' failed at src/test/test-boot-timestamps.c:84, function main(). Aborting.

Normally it takes ~0.02s, but here there's a slowdown to 0.73 and things fail with EINTR.
This happens only occasionally, and I haven't been able to capture a strace.

It would be to ignore that case in test-boot-timestamps or always translate
EINTR to -ENODATA. Nevertheless, I think it's better to retry, since this gives
as more resilient behaviour and avoids a transient failure.

See
https://github.com/torvalds/linux/blob/master/fs/efivarfs/file.c#L75
and
https://github.com/torvalds/linux/commit/bef3efbeb897b56867e271cdbc5f8adaacaeb9cd.

4 years agoshell-completion/zsh: update systemd-analyze completions
Ronan Pigott [Mon, 27 Apr 2020 06:16:55 +0000 (23:16 -0700)] 
shell-completion/zsh: update systemd-analyze completions

4 years agozsh: fix disable/enable completion
Haochen Tong [Sun, 26 Apr 2020 22:30:49 +0000 (00:30 +0200)] 
zsh: fix disable/enable completion

The "preset" column introduced in
b01c1f305c044a381ad110709a62507d74bf6d86 breaks zsh completion for
systemctl disable/enable. Fix by ignoring everything after the last
space in a line.

4 years agotests: various small fixes for strict systems
Topi Miettinen [Thu, 23 Apr 2020 10:12:23 +0000 (13:12 +0300)] 
tests: various small fixes for strict systems

Don't assume that 4MB can be allocated from stack since there could be smaller
DefaultLimitSTACK= in force, so let's use malloc(). NUL terminate the huge
strings by hand, also ensure termination in test_lz4_decompress_partial() and
optimize the memset() for the string.

Some items in /proc and /etc may not be accessible to poor unprivileged users
due to e.g. SELinux, BOFH or both, so check for EACCES and EPERM.

/var/tmp may be a symlink to /tmp and then path_compare() will always fail, so
let's stick to /tmp like elsewhere.

/tmp may be mounted with noexec option and then trying to execute scripts from
there would fail.

Detect and warn if seccomp is already in use, which could make seccomp test
fail if the syscalls are already blocked.

Unset $TMPDIR so it will not break specifier tests where %T is assumed to be
/tmp and %V /var/tmp.

4 years agosd-bus: Cite sd_bus_creds_unref in sd_bus_get_name_creds docs
Daan De Meyer [Fri, 24 Apr 2020 16:45:15 +0000 (18:45 +0200)] 
sd-bus: Cite sd_bus_creds_unref in sd_bus_get_name_creds docs

4 years agotest-cgroup: skip if /sys/fs/cgroup unknown fs
Dan Streetman [Sat, 21 Mar 2020 14:59:42 +0000 (10:59 -0400)] 
test-cgroup: skip if /sys/fs/cgroup unknown fs

It's not always mounted, e.g. during the build-time tests, it's running inside
a chroot (that's how Debian/Ubuntu build packages, in chroots) so this test
always fails because /sys/fs/cgroup isn't mounted.

4 years agocgroup-util: check for SYSFS_MAGIC when detecting cgroup format
Dan Streetman [Sat, 21 Mar 2020 15:19:44 +0000 (11:19 -0400)] 
cgroup-util: check for SYSFS_MAGIC when detecting cgroup format

When nothing at all is mounted at /sys/fs/cgroup, the fs.f_type is
SYSFS_MAGIC (0x62656572) which results in the confusing debug log:

"Unknown filesystem type 62656572 mounted on /sys/fs/cgroup."

Instead, if the f_type is SYSFS_MAGIC, a more accurate message is:

"No filesystem is currently mounted on /sys/fs/cgroup."

4 years agoImprove help for clang-format
Norbert Lange [Fri, 24 Apr 2020 23:40:37 +0000 (01:40 +0200)] 
Improve help for clang-format

The comments lack the most important usecase: fixing up your commits.

4 years agoci: introduce CIFuzz
Frantisek Sumsal [Fri, 24 Apr 2020 10:00:44 +0000 (12:00 +0200)] 
ci: introduce CIFuzz

Per-PR fuzzing provided by OSS-Fuzz using GH workflows.

See: https://google.github.io/oss-fuzz/getting-started/continuous-integration/

4 years agodhcp6: make string argument to sd_dhcp6_client_set_request_mud_url() const
Thomas Haller [Fri, 24 Apr 2020 07:15:59 +0000 (09:15 +0200)] 
dhcp6: make string argument to sd_dhcp6_client_set_request_mud_url() const

4 years agoMerge pull request #15579 from DaanDeMeyer/sd-bus-get-name/owner-creds-docs
Zbigniew Jędrzejewski-Szmek [Fri, 24 Apr 2020 06:29:41 +0000 (08:29 +0200)] 
Merge pull request #15579 from DaanDeMeyer/sd-bus-get-name/owner-creds-docs

4 years agoMerge pull request #15564 from poettering/tmpfiles-no-proc
Zbigniew Jędrzejewski-Szmek [Fri, 24 Apr 2020 06:16:22 +0000 (08:16 +0200)] 
Merge pull request #15564 from poettering/tmpfiles-no-proc

util-lib: check for /proc being mounted in some really basic fs operations

4 years agosd-bus: Add sd_bus_get_name/owner_creds docs 15579/head
Daan De Meyer [Thu, 23 Apr 2020 19:21:58 +0000 (21:21 +0200)] 
sd-bus: Add sd_bus_get_name/owner_creds docs

4 years agoMerge pull request #15570 from poettering/cmsg-find
Zbigniew Jędrzejewski-Szmek [Fri, 24 Apr 2020 05:45:07 +0000 (07:45 +0200)] 
Merge pull request #15570 from poettering/cmsg-find

CMSG_FIND_DATA() and cmsg_find() work

4 years agotree-wide: use structured initialization at various places
Lennart Poettering [Fri, 17 Apr 2020 13:30:48 +0000 (15:30 +0200)] 
tree-wide: use structured initialization at various places

4 years agodhcp-server: port to recvmsg_safe()
Lennart Poettering [Thu, 23 Apr 2020 18:00:07 +0000 (20:00 +0200)] 
dhcp-server: port to recvmsg_safe()

Split out of #15457, let's see if this is the culprit of the CI failure.

4 years agoicmp6-util: port to recvmsg_safe()
Lennart Poettering [Thu, 23 Apr 2020 17:53:27 +0000 (19:53 +0200)] 
icmp6-util: port to recvmsg_safe()

Split out of #15457, let's see if this is the culprit of the CI failure.

4 years agodhcp-client: port to recvmsg_safe()
Lennart Poettering [Thu, 23 Apr 2020 17:57:53 +0000 (19:57 +0200)] 
dhcp-client: port to recvmsg_safe()

Split out of #15457, let's see if this is the culprit of the CI failure.

(also setting green label here, since @keszybz already greenlit it in that other PR)

4 years agofuzzit: make the submit phase a bit more robust
Frantisek Sumsal [Thu, 23 Apr 2020 19:24:22 +0000 (21:24 +0200)] 
fuzzit: make the submit phase a bit more robust

The submit phase of the Fuzzit Travis job has been spuriously failing
for some time with various (and usually pretty hidden) errors, like:

```
./fuzzit create job --type regression ...
2020/04/23 17:02:12 please set env variable FUZZIT_API_KEY or pass --api-key. API Key for you account: ...
```

```
./fuzzit create job --type regression ...
2020/04/23 11:36:53 Creating job...
2020/04/23 11:36:54 Uploading fuzzer...
2020/04/23 11:36:54 Job created successfully
2020/04/23 11:36:54 Get https://...&action=create: read tcp x.x.x.x:39674->x.x.x.x:443: read: connection reset by peer
```

```
./fuzzit create job --type regression ...
2020/04/22 18:09:15 Creating job...
2020/04/22 18:09:16 Uploading fuzzer...
2020/04/22 18:09:37 Job created successfully
2020/04/22 18:09:37 500 Internal Server Error
```

etc.

Let's retry each submit job up to three times to (hopefully) mitigate this.

4 years agonss-systemd: don't synthesize root/nobody when iterating
Lennart Poettering [Thu, 23 Apr 2020 07:55:06 +0000 (09:55 +0200)] 
nss-systemd: don't synthesize root/nobody when iterating

Fixes: #15160
4 years agosd-bus: Add sd_bus_message_get_creds docs
Daan De Meyer [Thu, 23 Apr 2020 19:40:52 +0000 (21:40 +0200)] 
sd-bus: Add sd_bus_message_get_creds docs

4 years agosd-bus: Add sd_bus_get_name_machine_id docs
Daan De Meyer [Thu, 23 Apr 2020 19:07:36 +0000 (21:07 +0200)] 
sd-bus: Add sd_bus_get_name_machine_id docs

4 years agosd-bus: Add sd_bus_send_to docs
Daan De Meyer [Thu, 23 Apr 2020 18:40:30 +0000 (20:40 +0200)] 
sd-bus: Add sd_bus_send_to docs

4 years agoMerge pull request #15566 from poettering/destroy-binfmt
Lennart Poettering [Thu, 23 Apr 2020 19:15:22 +0000 (21:15 +0200)] 
Merge pull request #15566 from poettering/destroy-binfmt

unregister binary formats during shutdown

4 years agohome: fix strv NUL termination
Lennart Poettering [Thu, 23 Apr 2020 11:46:10 +0000 (13:46 +0200)] 
home: fix strv NUL termination

Fixes: #15559
4 years agoMerge pull request #15569 from DaanDeMeyer/sd-bus-message-peek-type-docs
Zbigniew Jędrzejewski-Szmek [Thu, 23 Apr 2020 18:11:14 +0000 (20:11 +0200)] 
Merge pull request #15569 from DaanDeMeyer/sd-bus-message-peek-type-docs

4 years agonetworkd: don't do lldp rx nor tx on bond devices
Lennart Poettering [Thu, 23 Apr 2020 13:18:18 +0000 (15:18 +0200)] 
networkd: don't do lldp rx nor tx on bond devices

Fixes: #15146
4 years agoMerge pull request #15550 from DaanDeMeyer/sd-bus-open/close/enter/exit-container...
Zbigniew Jędrzejewski-Szmek [Thu, 23 Apr 2020 17:58:43 +0000 (19:58 +0200)] 
Merge pull request #15550 from DaanDeMeyer/sd-bus-open/close/enter/exit-container-docs

sd-bus: Add sd_bus_open/close/enter/exit_container docs

4 years agoman: add a description of handling of single-label names
Zbigniew Jędrzejewski-Szmek [Wed, 15 Apr 2020 18:10:39 +0000 (20:10 +0200)] 
man: add a description of handling of single-label names

It turns out that our man page didn't describe the handling of single-label
names almost at all. This probably adds to the confusion regarding the subject.
So let's first describe what our current implementation is doing.

Quoting https://www.iab.org/documents/correspondence-reports-documents/2013-2/iab-statement-dotless-domains-considered-harmful/:
> Applications and platforms that apply a suffix search list to a single-label
> name are in conformance with IETF standards track RFCs. Furthermore,
> applications and platforms that do not query DNS for a TLD are in conformance
> with IETF standards track recommendations

Current behaviour is in line with that recommendation.

For #13763.

4 years agoMerge pull request #15563 from keszybz/wait-callback-tweak
Lennart Poettering [Thu, 23 Apr 2020 17:50:36 +0000 (19:50 +0200)] 
Merge pull request #15563 from keszybz/wait-callback-tweak

Add NULL callback check in one more place

4 years agoMerge pull request #15561 from poettering/udev-memdup-fix
Lennart Poettering [Thu, 23 Apr 2020 17:50:12 +0000 (19:50 +0200)] 
Merge pull request #15561 from poettering/udev-memdup-fix

udev: nulstr NUL termination fix

4 years agosocket-util: introduce type-safe, dereferencing wrapper CMSG_FIND_DATA around cmsg_find() 15570/head
Lennart Poettering [Fri, 17 Apr 2020 09:52:48 +0000 (11:52 +0200)] 
socket-util: introduce type-safe, dereferencing wrapper CMSG_FIND_DATA around cmsg_find()

let's take this once step further, and add type-safety to cmsg_find(),
and imply the CMSG_DATA() macro for finding the cmsg payload.

4 years agotree-wide: use cmsg_find() helper at various places where appropriate
Lennart Poettering [Fri, 17 Apr 2020 09:52:05 +0000 (11:52 +0200)] 
tree-wide: use cmsg_find() helper at various places where appropriate

4 years agosd-bus: Add sd_bus_message_peek_type docs 15569/head
Daan De Meyer [Thu, 23 Apr 2020 17:37:21 +0000 (19:37 +0200)] 
sd-bus: Add sd_bus_message_peek_type docs

4 years agosd-bus: Add sd_bus_message_open/close/enter/exit_container docs 15550/head
Daan De Meyer [Wed, 22 Apr 2020 20:02:39 +0000 (22:02 +0200)] 
sd-bus: Add sd_bus_message_open/close/enter/exit_container docs

4 years agosd-bus: Fix typo in sd_bus_message_append_array docs
Daan De Meyer [Wed, 22 Apr 2020 20:02:17 +0000 (22:02 +0200)] 
sd-bus: Fix typo in sd_bus_message_append_array docs

4 years agoMerge pull request #15504 from poettering/cmsg-find-pure
Lennart Poettering [Thu, 23 Apr 2020 15:28:19 +0000 (17:28 +0200)] 
Merge pull request #15504 from poettering/cmsg-find-pure

just the recvmsg_safe() stuff from #15457

4 years agoman: document binfmt's new --unregister switch 15566/head
Lennart Poettering [Thu, 23 Apr 2020 14:51:37 +0000 (16:51 +0200)] 
man: document binfmt's new --unregister switch

4 years agobinfmt: also unregister binfmt entries from unit
Lennart Poettering [Thu, 23 Apr 2020 14:36:45 +0000 (16:36 +0200)] 
binfmt: also unregister binfmt entries from unit

We unregister binfmt_misc twice during shutdown with this change:

1. A previous commit added support for doing that in the final shutdown
   phase, i.e. when we do the aggressive umount loop. This is the robust
   thing to do, in case the earlier ("clean") shutdown phase didn't work
   for some reason.

2. This commit adds support for doing that when systemd-binfmt.service
   is stopped. This is a good idea so that people can order mounts
   before the service if they want to register binaries from such
   mounts, as in that case we'll undo the registration on shutdown
   again, before unmounting those mounts.

And all that, just because of that weird "F" flag the kernel introduced
that can pin files...

Fixes: #14981
4 years agobinfmt: modernize code a bit
Lennart Poettering [Thu, 23 Apr 2020 14:27:46 +0000 (16:27 +0200)] 
binfmt: modernize code a bit

Let's just copy out the bit of the string we need, and let's make sure
we refuse rules called "status" and "register", since those are special
files in binfmt_misc's file system.

4 years agoshutdown: unregister all binfmt_misc entries before entering shutdown loop
Lennart Poettering [Thu, 23 Apr 2020 14:25:53 +0000 (16:25 +0200)] 
shutdown: unregister all binfmt_misc entries before entering shutdown loop

Apparently if the new "F" flag is used they might pin files, which
blocks us from unmounting things. Let's hence clear this up explicitly.
Before entering our umount loop.

Fixes: #14981
4 years agoshared: add common helper for unregistering all binfmt entries
Lennart Poettering [Thu, 23 Apr 2020 14:36:06 +0000 (16:36 +0200)] 
shared: add common helper for unregistering all binfmt entries

4 years agoMerge pull request #15472 from keszybz/dbus-api-docs
Lennart Poettering [Thu, 23 Apr 2020 15:01:11 +0000 (17:01 +0200)] 
Merge pull request #15472 from keszybz/dbus-api-docs

A few more dbus api documentation updates

4 years agoupdate TODO
Lennart Poettering [Thu, 23 Apr 2020 14:01:46 +0000 (16:01 +0200)] 
update TODO

4 years agoshared: add NULL callback check in one more place 15563/head
Zbigniew Jędrzejewski-Szmek [Thu, 23 Apr 2020 12:53:54 +0000 (14:53 +0200)] 
shared: add NULL callback check in one more place

Follow-up for 9f65637308.

4 years agotmpfiles: if we get ENOENT when opening /proc/self/fd/, check if /proc is mounted 15564/head
Lennart Poettering [Thu, 23 Apr 2020 12:52:10 +0000 (14:52 +0200)] 
tmpfiles: if we get ENOENT when opening /proc/self/fd/, check if /proc is mounted

let's return ENOSYS in that case, to make things a bit less confusng.

Previously we'd just propagate ENOENT, which people might mistake as
applying to the object being modified rather than /proc/ just not being
there.

Let's return ENOSYS instead, i.e. an error clearly indicating that some
kernel API is not available. This hopefully should put people on a
better track.

Note that we only do the procfs check in the error path, which hopefully
means it's the less likely path.

We probably can add similar bits to more suitable codepaths dealing with
/proc/self/fd, but for now, let's pick to the ones noticed in #14745.

Fixes: #14745
4 years agostat-util: add simpler helper for checking if /proc/ is mounted
Lennart Poettering [Thu, 23 Apr 2020 12:51:08 +0000 (14:51 +0200)] 
stat-util: add simpler helper for checking if /proc/ is mounted

4 years agostat-util: no need to open a file to check fs type
Lennart Poettering [Thu, 23 Apr 2020 12:50:53 +0000 (14:50 +0200)] 
stat-util: no need to open a file to check fs type

4 years agosysusers,tmpfiles: always mention error when failing to replace specifiers
Lennart Poettering [Thu, 23 Apr 2020 12:50:07 +0000 (14:50 +0200)] 
sysusers,tmpfiles: always mention error when failing to replace specifiers

4 years agosysusers: add accidentally forgotten 'return'
Lennart Poettering [Thu, 23 Apr 2020 12:49:14 +0000 (14:49 +0200)] 
sysusers: add accidentally forgotten 'return'

4 years agocore: fix unused variable warning when !HAVE_SECCOMP
Zbigniew Jędrzejewski-Szmek [Wed, 22 Apr 2020 21:27:51 +0000 (23:27 +0200)] 
core: fix unused variable warning when !HAVE_SECCOMP

4 years agoudev: use STR_IN_SET() wher eit makes sense 15561/head
Lennart Poettering [Thu, 23 Apr 2020 11:36:36 +0000 (13:36 +0200)] 
udev: use STR_IN_SET() wher eit makes sense

4 years agoudev: prepare memory for extra NUL termination for NULSTR
Lennart Poettering [Thu, 23 Apr 2020 11:36:00 +0000 (13:36 +0200)] 
udev: prepare memory for extra NUL termination for NULSTR

Fixes: #15162
4 years agoMerge pull request #15543 from poettering/fix-ubsan-sd-bus
Lennart Poettering [Thu, 23 Apr 2020 11:39:58 +0000 (13:39 +0200)] 
Merge pull request #15543 from poettering/fix-ubsan-sd-bus

sd-bus: work around ubsan warning

4 years agoshared: Don't try calling NULL callback in bus_wait_for_units_clear
Balint Reczey [Wed, 22 Apr 2020 07:51:53 +0000 (09:51 +0200)] 
shared: Don't try calling NULL callback in bus_wait_for_units_clear

BugLink: https://bugs.launchpad.net/bugs/1870930
4 years agoMerge pull request #15544 from poettering/fix-journalctl-namespace
Lennart Poettering [Thu, 23 Apr 2020 10:19:25 +0000 (12:19 +0200)] 
Merge pull request #15544 from poettering/fix-journalctl-namespace

sd-journal: fix namespace check

4 years agoMerge pull request #15538 from poettering/nspawn-no-netns
Lennart Poettering [Thu, 23 Apr 2020 09:11:11 +0000 (11:11 +0200)] 
Merge pull request #15538 from poettering/nspawn-no-netns

nspawn: politely refuse --image= when run inside non-host netns

4 years agoMerge pull request #15527 from Werkov/mkosi-opensuse
Zbigniew Jędrzejewski-Szmek [Thu, 23 Apr 2020 09:00:02 +0000 (11:00 +0200)] 
Merge pull request #15527 from Werkov/mkosi-opensuse

Add mkosi config for openSUSE Tumbleweed

4 years agomkosi: Add openSUSE params file 15527/head
Michal Koutný [Wed, 22 Apr 2020 00:11:18 +0000 (02:11 +0200)] 
mkosi: Add openSUSE params file

The setup is meant to run against openSUSE Tumbleweed and install
minimum packages necessary for successful build and passing tests.

To speed up incremental build an external build directory is used.

4 years agorun: don't wait for start job to complete when running interactively anyway
Lennart Poettering [Wed, 22 Apr 2020 18:08:34 +0000 (20:08 +0200)] 
run: don't wait for start job to complete when running interactively anyway

Otherwise we'd not read the services input while waiting for the job to
wait, and there's no point in waiting for the job anyway if we wait for
the unit to stop ultimately.

Fixes: #15395
4 years agotree-wide: use recvmsg_safe() at various places 15504/head
Lennart Poettering [Thu, 23 Apr 2020 07:40:03 +0000 (09:40 +0200)] 
tree-wide: use recvmsg_safe() at various places

Let's be extra careful whenever we return from recvmsg() and see
MSG_CTRUNC set. This generally means we ran into a programming error, as
we didn't size the control buffer large enough. It's an error condition
we should at least log about, or propagate up. Hence do that.

This is particularly important when receiving fds, since for those the
control data can be of any size. In particular on stream sockets that's
nasty, because if we miss an fd because of control data truncation we
cannot recover, we might not even realize that we are one off.

(Also, when failing early, if there's any chance the socket might be
AF_UNIX let's close all received fds, all the time. We got this right
most of the time, but there were a few cases missing. God, UNIX is hard
to use)

4 years agosocket-util: add recvmsg_safe() wrapper that handles MSG_CTRUNC
Lennart Poettering [Fri, 17 Apr 2020 20:26:14 +0000 (22:26 +0200)] 
socket-util: add recvmsg_safe() wrapper that handles MSG_CTRUNC

4 years agotest: add a test case for #15528 15544/head
Kumar Kartikeya Dwivedi [Wed, 22 Apr 2020 17:22:40 +0000 (22:52 +0530)] 
test: add a test case for #15528

4 years agosd-journal: don't check namespaces if we have no namespace to go by
Lennart Poettering [Wed, 22 Apr 2020 17:48:48 +0000 (19:48 +0200)] 
sd-journal: don't check namespaces if we have no namespace to go by

Fixes: #15528
4 years agonspawn: refuse politely when we are run in the non-host netns in combination with... 15538/head
Lennart Poettering [Wed, 22 Apr 2020 15:12:35 +0000 (17:12 +0200)] 
nspawn: refuse politely when we are run in the non-host netns in combination with --image=

Strictly speaking this doesn't really fix #15079, but it at least means
we won't hang anymore.

Fixes: #15079
4 years agonspawn: minor simplification
Lennart Poettering [Wed, 22 Apr 2020 15:12:08 +0000 (17:12 +0200)] 
nspawn: minor simplification

4 years agoMerge pull request #15530 from ssahani/lpr-dhcpv4-option-9
Zbigniew Jędrzejewski-Szmek [Thu, 23 Apr 2020 07:10:14 +0000 (09:10 +0200)] 
Merge pull request #15530 from ssahani/lpr-dhcpv4-option-9

network: add support to DHCPv4 server/client option 9 LPR

4 years agosd-bus: Add sd_bus_message_get_error/errno docs
Daan De Meyer [Wed, 22 Apr 2020 17:25:18 +0000 (19:25 +0200)] 
sd-bus: Add sd_bus_message_get_error/errno docs

4 years agoacpi-fpdt: mark structures as packed 15543/head
Lennart Poettering [Thu, 23 Apr 2020 06:49:10 +0000 (08:49 +0200)] 
acpi-fpdt: mark structures as packed

Let's make sure the alignment doesn't matter.

4 years agosd-bus: work around ubsan warning
Lennart Poettering [Wed, 22 Apr 2020 17:32:09 +0000 (19:32 +0200)] 
sd-bus: work around ubsan warning

ubsan complains that we add an offset to a NULL ptr here in some cases.
Which isn't really a bug though, since we only use it as the end
condition for a for loop, but we can still fix it...

Fixes: #15522
4 years agosd-bus: Add sd_bus_get/set_allow_interactive_authorization docs
Daan De Meyer [Wed, 22 Apr 2020 15:49:27 +0000 (17:49 +0200)] 
sd-bus: Add sd_bus_get/set_allow_interactive_authorization docs

4 years agoMerge pull request #15546 from poettering/pid1-serialize-comand-fix
Zbigniew Jędrzejewski-Szmek [Thu, 23 Apr 2020 06:51:58 +0000 (08:51 +0200)] 
Merge pull request #15546 from poettering/pid1-serialize-comand-fix

core: make sure to restore the control command id, too

4 years agoMerge pull request #15516 from poettering/nspawn-resolv-conf
Zbigniew Jędrzejewski-Szmek [Thu, 23 Apr 2020 06:01:46 +0000 (08:01 +0200)] 
Merge pull request #15516 from poettering/nspawn-resolv-conf

beef up --resolv-conf= options of systemd-nspawn

4 years agonspawn: some minor modernizations
Lennart Poettering [Wed, 22 Apr 2020 17:06:59 +0000 (19:06 +0200)] 
nspawn: some minor modernizations

4 years agoman: Fix typo "multiplied with" -> "multiplied by"
Niklas Hambüchen [Thu, 23 Apr 2020 00:26:32 +0000 (02:26 +0200)] 
man: Fix typo "multiplied with" -> "multiplied by"

4 years agosd-bus: Add sd_bus_message_at_end docs
Daan De Meyer [Wed, 22 Apr 2020 15:24:36 +0000 (17:24 +0200)] 
sd-bus: Add sd_bus_message_at_end docs

4 years agoMerge pull request #15517 from DaanDeMeyer/sd-bus-monitor-docs
Zbigniew Jędrzejewski-Szmek [Wed, 22 Apr 2020 21:38:37 +0000 (23:38 +0200)] 
Merge pull request #15517 from DaanDeMeyer/sd-bus-monitor-docs

sd-bus: Add sd_bus_set/is_monitor docs

4 years agoMerge pull request #15507 from poettering/bus-log-api
Zbigniew Jędrzejewski-Szmek [Wed, 22 Apr 2020 21:30:09 +0000 (23:30 +0200)] 
Merge pull request #15507 from poettering/bus-log-api

add generic bus interface for setting log level that can be implemented by any daemon

4 years agocore: make sure we don't get confused when setting TERM for a tty fd
Lennart Poettering [Wed, 22 Apr 2020 19:52:22 +0000 (21:52 +0200)] 
core: make sure we don't get confused when setting TERM for a tty fd

Fixes: #15344
4 years agoman: document that VirtualEthernetExtra= has nothing to do with Bridge=
Lennart Poettering [Wed, 22 Apr 2020 14:42:38 +0000 (16:42 +0200)] 
man: document that VirtualEthernetExtra= has nothing to do with Bridge=

Fixes: #15402
4 years agocore: make sure to restore the control command id, too 15546/head
Lennart Poettering [Wed, 22 Apr 2020 18:34:02 +0000 (20:34 +0200)] 
core: make sure to restore the control command id, too

Fixes: #15356
4 years agocore: some minor clean-ups/modernizations
Lennart Poettering [Wed, 22 Apr 2020 18:33:57 +0000 (20:33 +0200)] 
core: some minor clean-ups/modernizations

4 years agoman: document the new --resolv-conf= options 15516/head
Lennart Poettering [Tue, 21 Apr 2020 16:56:30 +0000 (18:56 +0200)] 
man: document the new --resolv-conf= options

4 years agonspawn: beef up --resolve-conf= modes
Lennart Poettering [Tue, 21 Apr 2020 16:33:23 +0000 (18:33 +0200)] 
nspawn: beef up --resolve-conf= modes

Let's add flavours for copying stub/uplink resolv.conf versions.

Let's add a more brutal "replace" mode, where we'll replace any existing
destination file.

Let's also change what "auto" means: instead of copying the static file,
let's use the stub file, so that DNS search info is copied over.

Fixes: #15340
4 years agoresolve: move resolv.conf path definitions to shared header
Lennart Poettering [Tue, 21 Apr 2020 16:32:49 +0000 (18:32 +0200)] 
resolve: move resolv.conf path definitions to shared header

That way we can use it from nspawn.

4 years agonetworkctl: Add support to display LPR servers 15530/head
Susant Sahani [Wed, 22 Apr 2020 12:50:27 +0000 (14:50 +0200)] 
networkctl: Add support to display LPR servers

4 years agosd-network: Add support to retrive LPR servers
Susant Sahani [Wed, 22 Apr 2020 12:49:52 +0000 (14:49 +0200)] 
sd-network: Add support to retrive LPR servers

4 years agonetwork: Add support send and receive LPR servers
Susant Sahani [Wed, 22 Apr 2020 12:49:27 +0000 (14:49 +0200)] 
network: Add support send and receive LPR servers

4 years agosd-network: DHCPv4 Add support to send and receive LPR servers.
Susant Sahani [Wed, 22 Apr 2020 12:48:11 +0000 (14:48 +0200)] 
sd-network: DHCPv4 Add support to send and receive LPR servers.

4 years agoMerge pull request #15526 from bluca/start_stop_wait_debug
Zbigniew Jędrzejewski-Szmek [Wed, 22 Apr 2020 12:24:07 +0000 (14:24 +0200)] 
Merge pull request #15526 from bluca/start_stop_wait_debug

Add debug log when a job in the activation queue is not runnable

4 years agocore: add debug log when a job in the activation queue is not runnable 15526/head
Luca Boccassi [Tue, 21 Apr 2020 16:28:01 +0000 (17:28 +0100)] 
core: add debug log when a job in the activation queue is not runnable

When a job is skipped due its dependencies not being ready, log
a debug message saying what is holding it back.
This was very useful with transient units timing out to figure
out where the problem was.

4 years agomkosi: Unify environment for unit tests
Michal Koutný [Tue, 21 Apr 2020 23:58:44 +0000 (01:58 +0200)] 
mkosi: Unify environment for unit tests

Some testcases in test-execute rely on existence of user groups with
certain gids. However, their existence is not universally granted [1].
Although the test could be skipped in their absence and give up testing
some code paths, different approach was chosen -- create dummy groups in
the testing image.

[1] See how systemd-sysusers allocates gids (e.g.
src/test/test-uid-range.c).

4 years agotest: Simplify hostname checking
Michal Koutný [Tue, 21 Apr 2020 22:31:54 +0000 (00:31 +0200)] 
test: Simplify hostname checking

Both hostname and uname utilities boil down to uname(2) syscall. Reduce
tests dependency footprint by using uname for checking hostname too.

4 years agomkosi: Use distro-invariant rootprefix
Michal Koutný [Tue, 21 Apr 2020 16:08:23 +0000 (18:08 +0200)] 
mkosi: Use distro-invariant rootprefix

Distributions may be build with various configs, e.g. customized
rootprefix. It'd be unmaintanable to have specific mkosi.build for each
supported distro. Hence, make the build script flexible yet distro
oblivious.

4 years agoMerge pull request #15519 from DaanDeMeyer/sd-bus-message-read-strv-docs
Zbigniew Jędrzejewski-Szmek [Wed, 22 Apr 2020 07:43:54 +0000 (09:43 +0200)] 
Merge pull request #15519 from DaanDeMeyer/sd-bus-message-read-strv-docs

4 years agotest: correctly clean up test artifacts
Frantisek Sumsal [Tue, 21 Apr 2020 11:18:36 +0000 (13:18 +0200)] 
test: correctly clean up test artifacts

Remove the artifact files indicating test result (testok, failed, and
skipped) just before running the test so we always get the latest and
most relevant result instead of incorrectly consuming previous results.

Discovered in https://github.com/systemd/systemd/pull/15378#issuecomment-616801873

4 years agoutil: return the correct correct wd from inotify helpers
Balaji Punnuru [Thu, 9 Apr 2020 16:21:49 +0000 (12:21 -0400)] 
util: return the correct correct wd from inotify helpers

We need to propagate the acquired watch descriptors because our callers
are counting on them.

[Lennart: this is split out of #15381 and simplified]

4 years agocore: minor error code handling fixes
Lennart Poettering [Tue, 21 Apr 2020 15:21:38 +0000 (17:21 +0200)] 
core: minor error code handling fixes