]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
2 years agoMerge pull request #21034 from poettering/homed-password-cache-tweaks
Lennart Poettering [Mon, 18 Oct 2021 20:46:16 +0000 (22:46 +0200)] 
Merge pull request #21034 from poettering/homed-password-cache-tweaks

homed: minor tweaks to the PasswordCache logic

2 years agoMerge pull request #21028 from poettering/watchdog-fixlets
Lennart Poettering [Mon, 18 Oct 2021 20:45:44 +0000 (22:45 +0200)] 
Merge pull request #21028 from poettering/watchdog-fixlets

pid1: various small watchdog tweaks and fixes

2 years agohomework: move allocation/destruction into outer/generic scope
Lennart Poettering [Mon, 18 Oct 2021 11:59:29 +0000 (13:59 +0200)] 
homework: move allocation/destruction into outer/generic scope

Previously in most cases we'd allocate the HomeSetup context object
in generic code in homework.c. But for some cases we allocated them
instead inside the specific code in homework-{cifs,directory,luks}.c
Let's clean that up, and systematically allocate it in the outer
"entrypoint" calls in homework.c instead of the inner ones.

This doesn't change much in behaviour (i.e. it just means when something
fails we'll now clean it up one stack frame further up). But it will
allow is to more easily work with the context objects, since we'll have
them around in all stack frames.

2 years agohomework: unify code that opens the backing image file in open_image_file()
Lennart Poettering [Thu, 14 Oct 2021 13:43:08 +0000 (15:43 +0200)] 
homework: unify code that opens the backing image file in open_image_file()

Also, reuse an already opened image file if we have one.

2 years agodocs: Fix value for "processId" in HACKING doc
Daan De Meyer [Mon, 18 Oct 2021 12:29:15 +0000 (14:29 +0200)] 
docs: Fix value for "processId" in HACKING doc

This needs to be pickRemoteProcess to make sure the UI shows
the PIDs of processes in the mkosi container instead of processes
on the host system.

2 years agohomework: mae sure PasswordCache is really optional 21034/head
Lennart Poettering [Mon, 18 Oct 2021 13:31:10 +0000 (15:31 +0200)] 
homework: mae sure PasswordCache is really optional

It was supposed to be optional (i.e. there's a reason why we never
assert()ed on it), and in many codepaths it is, let's make sure it is
everywhere.

2 years agohomework: make PasswordCache const wherever we can
Lennart Poettering [Mon, 18 Oct 2021 12:58:36 +0000 (14:58 +0200)] 
homework: make PasswordCache const wherever we can

2 years agoMerge pull request #21026 from keszybz/licensing-info-for-generated-files
Luca Boccassi [Mon, 18 Oct 2021 12:08:36 +0000 (13:08 +0100)] 
Merge pull request #21026 from keszybz/licensing-info-for-generated-files

Licensing info for generated files

2 years agowatchdog: fix fd validity check 21028/head
Lennart Poettering [Mon, 18 Oct 2021 09:26:58 +0000 (11:26 +0200)] 
watchdog: fix fd validity check

2 years agowatchdog: drop unnecessary variable
Lennart Poettering [Mon, 18 Oct 2021 09:26:49 +0000 (11:26 +0200)] 
watchdog: drop unnecessary variable

2 years agowatchdog: always prefer /dev/watchdog0 over /dev/watchdog
Lennart Poettering [Mon, 18 Oct 2021 09:21:42 +0000 (11:21 +0200)] 
watchdog: always prefer /dev/watchdog0 over /dev/watchdog

2 years agowatchdog: fix error code handling
Lennart Poettering [Mon, 18 Oct 2021 09:17:11 +0000 (11:17 +0200)] 
watchdog: fix error code handling

2 years agodocs: mark spdx headers with the default license to website files 21026/head
Zbigniew Jędrzejewski-Szmek [Mon, 18 Oct 2021 06:56:45 +0000 (08:56 +0200)] 
docs: mark spdx headers with the default license to website files

Those were added in b41a3f66c97e3d861faed04b727daf929383b827 without
an explicit license, so they are under the default license. Some files
already got a header previously, so this only touches the remaining.

The same should be done for docs/_data/extra_pages.json, but it's json, and
json doesn't allow comments.

2 years agolicensing: add a license file for the fonts we carry
Zbigniew Jędrzejewski-Szmek [Mon, 18 Oct 2021 06:40:04 +0000 (08:40 +0200)] 
licensing: add a license file for the fonts we carry

2 years agofuzz-fido-id-desc: drop unused case file
Zbigniew Jędrzejewski-Szmek [Sun, 17 Oct 2021 18:24:10 +0000 (20:24 +0200)] 
fuzz-fido-id-desc: drop unused case file

It wasn't picked up automatically because it's not in
test/fuzz/fuzz-fido-id-desc/. But looking at the contents, it doesn't seem to
be in the expected input format either.

2 years agoTEST-06-SELINUX: add the usual spdx license header to policy files
Zbigniew Jędrzejewski-Szmek [Sun, 17 Oct 2021 18:09:09 +0000 (20:09 +0200)] 
TEST-06-SELINUX: add the usual spdx license header to policy files

2 years agogitattributes: introduce and use "generated" attribute
Zbigniew Jędrzejewski-Szmek [Sun, 17 Oct 2021 17:49:15 +0000 (19:49 +0200)] 
gitattributes: introduce and use "generated" attribute

I want to mark some files to be ignored for licensing purposes,
e.g. output from fuzzers and other samples. By using the gitattribute
machinery for this we don't need to design a custom protocol:

$ git check-attr generated test/test-sysusers/unhappy-*
test/test-sysusers/unhappy-1.expected-err: generated: set
test/test-sysusers/unhappy-1.input: generated: unspecified
test/test-sysusers/unhappy-2.expected-err: generated: set
test/test-sysusers/unhappy-2.input: generated: unspecified
test/test-sysusers/unhappy-3.expected-err: generated: set
test/test-sysusers/unhappy-3.input: generated: unspecified

2 years agogitattributes: mark more files as "binary"
Zbigniew Jędrzejewski-Szmek [Sun, 17 Oct 2021 17:44:47 +0000 (19:44 +0200)] 
gitattributes: mark more files as "binary"

This way we know that we shouldn't look for a spdx header in them.

2 years agotests: use !/usr/bin/env bash consistently
Zbigniew Jędrzejewski-Szmek [Sun, 17 Oct 2021 16:14:58 +0000 (18:14 +0200)] 
tests: use !/usr/bin/env bash consistently

This adjustment was last done in f96bc66901ecbcf7ecb280d9442fd0cc92e67186,
but it seems some files were missed and some were added later.

2 years agotests: add spdx headers to scripts and Makefiles
Zbigniew Jędrzejewski-Szmek [Sun, 17 Oct 2021 16:13:06 +0000 (18:13 +0200)] 
tests: add spdx headers to scripts and Makefiles

2 years agotests: add spdx license header to test unit/link/network/conf files
Zbigniew Jędrzejewski-Szmek [Sun, 17 Oct 2021 16:07:22 +0000 (18:07 +0200)] 
tests: add spdx license header to test unit/link/network/conf files

Those are all consumed by our parser, so they all support comments.
I was considering whether they should have a license header at all,
but in the end I decided to add it because those files are often created
by copying parts of real unit files. And if the real ones have a license,
then those might as well. It's easier to add it than to make an exception.

2 years agobpf: fix SPDX short identifier for LGPL-2.1-or-later
Zbigniew Jędrzejewski-Szmek [Sun, 17 Oct 2021 15:03:45 +0000 (17:03 +0200)] 
bpf: fix SPDX short identifier for LGPL-2.1-or-later

2 years agolicensing: add two missing spdx headers
Zbigniew Jędrzejewski-Szmek [Sun, 17 Oct 2021 07:46:19 +0000 (09:46 +0200)] 
licensing: add two missing spdx headers

Both files were developed in our tree, so they are under the default license.

2 years agogitattributes: mark fuzz inputs that are pure binary as such
Zbigniew Jędrzejewski-Szmek [Sat, 16 Oct 2021 16:19:19 +0000 (18:19 +0200)] 
gitattributes: mark fuzz inputs that are pure binary as such

We also have a bunch of files that have some bytes and a lot
of text, like the journal export format. For those, it is still quite
useful when the tools try to diff them, so let's not mark those.

2 years agohomed: replace "already_activated" boolean parameter by a flags value
Lennart Poettering [Sun, 17 Oct 2021 07:42:15 +0000 (09:42 +0200)] 
homed: replace "already_activated" boolean parameter by a flags value

This is mostly preparation for further defined flags to be added in
later PRs/commits.

No change in behaviour just the flagsification.

2 years agoMerge pull request #21013 from mxre/feature/stub-dtb
Lennart Poettering [Sun, 17 Oct 2021 09:27:03 +0000 (11:27 +0200)] 
Merge pull request #21013 from mxre/feature/stub-dtb

[sd-stub] add support for embedding devicetree

2 years agoMerge pull request #21023 from poettering/home-prepare-rename
Yu Watanabe [Sat, 16 Oct 2021 19:32:07 +0000 (04:32 +0900)] 
Merge pull request #21023 from poettering/home-prepare-rename

homed: rename some functions

2 years agohomed: rename home_setup_undo() → home_setup_done() 21023/head
Lennart Poettering [Sat, 16 Oct 2021 12:45:42 +0000 (14:45 +0200)] 
homed: rename home_setup_undo() → home_setup_done()

This function is a destructor, hence it should be named like one.

(We usually use xyz_free() for a destructor that frees the object passed
itself. xyz_unref() we typically use for destructors that are similar,
but ref counted. xyz_done() usually is used for destructors which free
the members of an object, but not the object itself – to allow stack
allocation of objects. We don't strictly follow this, but it's good to
stick to rules wherever we can.)

No actual code change, just renaming.

2 years agohomed: rename home_prepare*() → home_setup*()
Lennart Poettering [Wed, 13 Oct 2021 20:24:24 +0000 (22:24 +0200)] 
homed: rename home_prepare*() → home_setup*()

These set of functions are constructors for an object called HomeSetup,
which has a destructor home_setup_undo(), hence to be reasonably
symmetric, let's call it home_setup*() too, instead of using a new verb
"prepare" for its name.

No actual code changes, just some renaming.

2 years agopo: add a false positive to POTFILES.skip
Piotr Drąg [Sat, 16 Oct 2021 11:59:20 +0000 (13:59 +0200)] 
po: add a false positive to POTFILES.skip

2 years ago[st-stub] documenting the .dtb section 21013/head
Max Resch [Sat, 16 Oct 2021 11:26:21 +0000 (13:26 +0200)] 
[st-stub] documenting the .dtb section

2 years agohomework: reuse home_validate_update_luks() at one more place
Lennart Poettering [Wed, 13 Oct 2021 20:40:11 +0000 (22:40 +0200)] 
homework: reuse home_validate_update_luks() at one more place

We have the same code at two places, let's reuse it. Given the more
generic scope let's rename the function home_get_state() since it
retrieve the current setup state of the LUKS logic.

2 years agohomework: remove duplicate error logging when doing ext4 resizes
Lennart Poettering [Thu, 14 Oct 2021 15:23:29 +0000 (17:23 +0200)] 
homework: remove duplicate error logging when doing ext4 resizes

2 years agohomework: let's simply some code via erase_and_free()
Lennart Poettering [Fri, 15 Oct 2021 16:00:38 +0000 (18:00 +0200)] 
homework: let's simply some code via erase_and_free()

2 years agohomed,shutdown: call valgrind magic after LOOP_GET_STATUS64
Lennart Poettering [Fri, 15 Oct 2021 15:58:13 +0000 (17:58 +0200)] 
homed,shutdown: call valgrind magic after LOOP_GET_STATUS64

valgrind doesn't understand LOOP_GET_STATUS64. We already work around
this in various placed, via VALGRIND_MAKE_MEM_DEFINE(), but we forgot
three places. Let's fix that.

2 years agouserdb: fix type to pass to connect()
Yu Watanabe [Fri, 15 Oct 2021 20:04:26 +0000 (05:04 +0900)] 
userdb: fix type to pass to connect()

Fixes https://github.com/systemd/systemd/pull/20613#issuecomment-944621275.

2 years ago[sd-stub] add support for embedding devicetree
Max Resch [Fri, 15 Oct 2021 12:18:57 +0000 (14:18 +0200)] 
[sd-stub] add support for embedding devicetree

2 years agoMerge pull request #20902 from tasleson/integritysetup-generator
Lennart Poettering [Fri, 15 Oct 2021 16:57:17 +0000 (18:57 +0200)] 
Merge pull request #20902 from tasleson/integritysetup-generator

Add stand-alone dm integrity support

2 years agohomework: only do image locks for regular image files
Lennart Poettering [Thu, 14 Oct 2021 13:38:03 +0000 (15:38 +0200)] 
homework: only do image locks for regular image files

If an image file is actually a block device taking a lock on it doesn't
really make sense for us: it will interfere with udev's block device
probing logic, and it's not going to propagated across the network
anyway (which is what we are after here). Hence simply don't do it.

Follow-up for 2aaf565a2da8eb0ea9adf84028c9d0ab7a90e53e

2 years agohomework: don't bother with BLKRRPART on images that aren't block devices
Lennart Poettering [Fri, 15 Oct 2021 09:23:00 +0000 (11:23 +0200)] 
homework: don't bother with BLKRRPART on images that aren't block devices

We currently call this ioctl even if we are backed by a regular file,
which is actually the common case. While this doesn't really hurt, it
does result in very confusing logs.

2 years agoAdd stand-alone dm-integrity support 20902/head
Tony Asleson [Sun, 26 Sep 2021 16:53:42 +0000 (11:53 -0500)] 
Add stand-alone dm-integrity support

This adds support for dm integrity targets and an associated
/etc/integritytab file which is required as the dm integrity device
super block doesn't include all of the required metadata to bring up
the device correctly.  See integritytab man page for details.

2 years agoMerge pull request #20983 from mxre/feature/aarch64
Lennart Poettering [Fri, 15 Oct 2021 08:26:10 +0000 (10:26 +0200)] 
Merge pull request #20983 from mxre/feature/aarch64

[sd-stub] Add support for aarch64 booting via pe-entry point

2 years agoMerge pull request #20980 from bluca/compat_readme
Zbigniew Jędrzejewski-Szmek [Fri, 15 Oct 2021 07:49:29 +0000 (09:49 +0200)] 
Merge pull request #20980 from bluca/compat_readme

docs: add guidelines w.r.t. compatibility to docs/CONTRIBUTING.md

2 years agoMerge pull request #20996 from yuwata/udevadm-trigger-debug
Zbigniew Jędrzejewski-Szmek [Fri, 15 Oct 2021 07:44:59 +0000 (09:44 +0200)] 
Merge pull request #20996 from yuwata/udevadm-trigger-debug

test: show debug and verbose message

2 years agounit: networkd does not require AF_ALG anymore
Yu Watanabe [Thu, 14 Oct 2021 21:31:21 +0000 (06:31 +0900)] 
unit: networkd does not require AF_ALG anymore

As khash is retired.

2 years agodm-verity: Remove usage of integrity
Tony Asleson [Wed, 13 Oct 2021 19:18:12 +0000 (14:18 -0500)] 
dm-verity: Remove usage of integrity

There is a difference between dm-verity and dm-integrity.  Remove
usage of integrity from verity documentation in man pages and
target files.

2 years agoMerge pull request #21001 from poettering/alloca-safe
Yu Watanabe [Thu, 14 Oct 2021 15:57:27 +0000 (00:57 +0900)] 
Merge pull request #21001 from poettering/alloca-safe

honour ALLOCA_MAX limit on all alloca() allocations, not just some

2 years agohomework: fix incorrect error variable use
Lennart Poettering [Thu, 14 Oct 2021 13:40:59 +0000 (15:40 +0200)] 
homework: fix incorrect error variable use

2 years agoMerge pull request #21006 from DaanDeMeyer/mkosi-ordering
Yu Watanabe [Thu, 14 Oct 2021 15:07:21 +0000 (00:07 +0900)] 
Merge pull request #21006 from DaanDeMeyer/mkosi-ordering

mkosi: Add number prefixes to per-distro files for easier overriding

2 years agodoc: document that alloca_safe() and friends are the APIs to use 21001/head
Lennart Poettering [Wed, 13 Oct 2021 12:19:40 +0000 (14:19 +0200)] 
doc: document that alloca_safe() and friends are the APIs to use

2 years agoalloc-util: add strdupa_safe() + strndupa_safe() and use it everywhere
Lennart Poettering [Wed, 13 Oct 2021 10:38:37 +0000 (12:38 +0200)] 
alloc-util: add strdupa_safe() + strndupa_safe() and use it everywhere

Let's define two helpers strdupa_safe() + strndupa_safe() which do the
same as their non-safe counterparts, except that they abort if called
with allocations larger than ALLOCA_MAX.

This should ensure that all our alloca() based allocations are subject
to this limit.

afaics glibc offers three alloca() based APIs: alloca() itself,
strndupa() + strdupa(). With this we have now replacements for all of
them, that take the limit into account.

2 years agojournal: drop unnecessary +1 in newa() expression
Lennart Poettering [Wed, 13 Oct 2021 10:08:20 +0000 (12:08 +0200)] 
journal: drop unnecessary +1 in newa() expression

newa() does this internally anyway, no need to do this explicitly.

2 years agotree-wide: port all calls to alloca() to alloca_safe()
Lennart Poettering [Wed, 13 Oct 2021 10:07:52 +0000 (12:07 +0200)] 
tree-wide: port all calls to alloca() to alloca_safe()

2 years agoalloca-util: drop two unnecessary casts
Lennart Poettering [Wed, 13 Oct 2021 10:07:20 +0000 (12:07 +0200)] 
alloca-util: drop two unnecessary casts

memset() already returns void*, no need to cast it to that.

2 years agoalloc-util: introduce new helper alloca_safe()
Lennart Poettering [Wed, 13 Oct 2021 10:05:54 +0000 (12:05 +0200)] 
alloc-util: introduce new helper alloca_safe()

This is like alloca(), but does two things:

1. Verifies the allocation is smaller than ALLOCA_MAX
2. Ensures we allocate at least one byte

This was previously done manually in all invocations. This adds a handy
helper that does that implicitly.

2 years agocgroup: when checking for legacy controllers, ignore any we don't care about
Dan Streetman [Wed, 13 Oct 2021 11:43:14 +0000 (07:43 -0400)] 
cgroup: when checking for legacy controllers, ignore any we don't care about

2 years agoIgnore local files in subdirectories of mkosi.default.d/ as well 21006/head
Daan De Meyer [Thu, 14 Oct 2021 12:07:16 +0000 (14:07 +0200)] 
Ignore local files in subdirectories of mkosi.default.d/ as well

2 years agomkosi: Add number prefixes to per-distro files for easier overriding
Daan De Meyer [Thu, 14 Oct 2021 12:06:53 +0000 (14:06 +0200)] 
mkosi: Add number prefixes to per-distro files for easier overriding

This allows developers to add override files to override per-distro settings.

2 years agovirt: Support detection for ARM64 Hyper-V guests
Boqun Feng [Wed, 13 Oct 2021 03:32:09 +0000 (11:32 +0800)] 
virt: Support detection for ARM64 Hyper-V guests

The detection of Microsoft Hyper-V VMs is done by cpuid currently,
however there is no cpuid on ARM64. And since ARM64 is now a supported
architecture for Microsoft Hyper-V guests[1], then use DMI tables to
detect a Hyper-V guest, which is more generic and works for ARM64.

[1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7aff79e297ee1aa0126924921fd87a4ae59d2467

2 years agoMerge pull request #21002 from poettering/watchdog-off
Luca Boccassi [Wed, 13 Oct 2021 19:03:06 +0000 (20:03 +0100)] 
Merge pull request #21002 from poettering/watchdog-off

minor tweaks to watchdog configuration logic

2 years ago[sd-stub] Add support for aarch64 booting via pe-entry point 20983/head
Max Resch [Mon, 11 Oct 2021 13:15:30 +0000 (15:15 +0200)] 
[sd-stub] Add support for aarch64 booting via pe-entry point

2 years agoman: document new systemd.watchdog_sec= kernel cmdline option 21002/head
Lennart Poettering [Wed, 13 Oct 2021 11:07:50 +0000 (13:07 +0200)] 
man: document new systemd.watchdog_sec= kernel cmdline option

Follow-up for: b3aa73e4de614c06c4a27e5635967a0392654fbc

2 years agoman: document new "off" setting for systemd-system.conf watchdog settings
Lennart Poettering [Wed, 13 Oct 2021 11:07:27 +0000 (13:07 +0200)] 
man: document new "off" setting for systemd-system.conf watchdog settings

2 years agocore: allow "off" as special watchdog time to be specified
Lennart Poettering [Wed, 13 Oct 2021 11:06:03 +0000 (13:06 +0200)] 
core: allow "off" as special watchdog time to be specified

Right now we already understand "default" as special string for enabling
the watchdog but not reconfiguring its timeout (it is internally mapped
to USEC_MAX). To be systematic this adds "off" as special string for
disabling the watchdog logic (it is internally mapped to 0, which is how
this behaviour was previously requested).

2 years agoMerge pull request #20787 from fbuihuu/watchdog-more-rework
Lennart Poettering [Wed, 13 Oct 2021 10:56:44 +0000 (12:56 +0200)] 
Merge pull request #20787 from fbuihuu/watchdog-more-rework

Watchdog more rework

2 years agocore/bpf-firewall: add missing oom check
Yu Watanabe [Wed, 13 Oct 2021 04:05:17 +0000 (13:05 +0900)] 
core/bpf-firewall: add missing oom check

Fixes CID#1464627.

2 years agowatchdog: rename special string "infinity" taken by the watchdog timeout options... 20787/head
Franck Bui [Fri, 1 Oct 2021 08:42:11 +0000 (10:42 +0200)] 
watchdog: rename special string "infinity" taken by the watchdog timeout options to "default"

2 years agowatchdog: handle timeout programming errors more safely
Franck Bui [Mon, 27 Sep 2021 08:51:28 +0000 (10:51 +0200)] 
watchdog: handle timeout programming errors more safely

If an error happened while the timeout value was being programmed, the error
was ignored and the watchdog module used the new timeout value whereas the
watchdog device was left with the previous one.

Now in cases of error, the device is now disabled and closed if it wasn't
opened already otherwise the previous timeout value is kept so the device is
still pinged at correct intervals.

2 years agocore: introduce systemd.watchdog_sec=<sec> option
Franck Bui [Fri, 17 Sep 2021 09:11:14 +0000 (11:11 +0200)] 
core: introduce systemd.watchdog_sec=<sec> option

2 years agowatchdog: update the documentation
Franck Bui [Mon, 27 Sep 2021 08:16:09 +0000 (10:16 +0200)] 
watchdog: update the documentation

While at it, split the watchdog section into a few paragraphs to make it easier
to read as it becomes lengthy.

2 years agowatchdog: passing 0 to watchdog_setup now closes the watchdog
Franck Bui [Fri, 17 Sep 2021 13:16:38 +0000 (15:16 +0200)] 
watchdog: passing 0 to watchdog_setup now closes the watchdog

Passing 0 meant "disable the watchdog although still kept it opened". However
this case didn't seem to be useful especially since PID1 closes the device if
it is passed the nul timeout.

Hence let's change the meaning of watchdog_setup(0) to match PID1's behavior
which allows to simplify the code a bit.

Hence this patch also drops enable_watchdog().

2 years agowatchdog: pass USEC_INFINITY to watchdog_setup() to reuse the programmed timeout...
Franck Bui [Fri, 17 Sep 2021 08:34:35 +0000 (10:34 +0200)] 
watchdog: pass USEC_INFINITY to watchdog_setup() to reuse the programmed timeout value

This patch changes the meaning of USEC_INFINITY value for the watchdog
module.

Previously passing this value was a NOP. It now has a special meaning: it
requests the watchdog module to read the programmed timeout value and reuse it
for pinging the device.

This is mostly useful when the watchdog is started by the firmware and there's
no way to reconfigure the timeout with a different value
afterwards. "RuntimeWatchdogSec=infinity" in system.conf can now be used rather
than putting an arbitrary value that PID1 will fail to set (even if it still
felt back to the programmed timeout).

Please note that "infinity" is not supposed to restore the default value of the
firmware. If the value is changed after booting then "infinity" would simply
reuse the current programmed value. IOW it's a NOP unless the watchdog was
previously closed and in that case it will be reopened and the last programmed
value reused.

2 years agowatchdog: configuring a timeout value might not be supported by the HW
Franck Bui [Thu, 16 Sep 2021 16:46:04 +0000 (18:46 +0200)] 
watchdog: configuring a timeout value might not be supported by the HW

In that case we should hanlde this case more gracefully by reusing the
programmed value.

Fixes: #20683
2 years agowatchdog: minor optimization in watchdog_setup()
Franck Bui [Fri, 17 Sep 2021 07:21:18 +0000 (09:21 +0200)] 
watchdog: minor optimization in watchdog_setup()

2 years agowatchdog: cleanup: create an helper for each ioctl
Franck Bui [Thu, 16 Sep 2021 14:19:05 +0000 (16:19 +0200)] 
watchdog: cleanup: create an helper for each ioctl

No functional changes.

2 years agoMerge pull request #20987 from yuwata/sd-dhcp6-enum-cleanups
Zbigniew Jędrzejewski-Szmek [Wed, 13 Oct 2021 06:25:37 +0000 (08:25 +0200)] 
Merge pull request #20987 from yuwata/sd-dhcp6-enum-cleanups

sd-dhcp6-client: enum cleanups

2 years agotest: show debug and verbose message 20996/head
Yu Watanabe [Wed, 13 Oct 2021 03:58:24 +0000 (12:58 +0900)] 
test: show debug and verbose message

2 years agosd-device-monitor: update log message to clarify the error will be ignored
Yu Watanabe [Wed, 13 Oct 2021 03:57:40 +0000 (12:57 +0900)] 
sd-device-monitor: update log message to clarify the error will be ignored

2 years agocgroup: check if any controller is in use as v1
Dan Streetman [Tue, 5 Oct 2021 12:49:21 +0000 (08:49 -0400)] 
cgroup: check if any controller is in use as v1

Check if any cgroup controller is currently being used as v1, and if so don't
use cgroup unified mode. This is only checked when there is no cgroup already
mounted, and is most useful when running in a container where the host is using
a legacy or hybrid cgroup, since we can't (fully) use unified cgroup, as the
host kernel has the cgroup controllers in use by v1.

This shouldn't be needed if the container manager has pre-mounted cgroups
appropriately based on the host system cgroup setup, but we can't rely
on that always being the case.

2 years agocore: serialize device cgroup bpf progs across daemon-reload/reexec
Anita Zhang [Mon, 11 Oct 2021 07:25:20 +0000 (00:25 -0700)] 
core: serialize device cgroup bpf progs across daemon-reload/reexec

Follows what was done in b57d75232615f98aefcf41cb145ec2ea3262857d and
adds a test that verifies the device BPF program is not detached during
reload/reexec.

2 years agoMerge pull request #20992 from keszybz/fix-two-outputs
Yu Watanabe [Wed, 13 Oct 2021 02:12:26 +0000 (11:12 +0900)] 
Merge pull request #20992 from keszybz/fix-two-outputs

Fix two outputs

2 years agosd-dhcp6-client: max_retransmit_time must be positive 20987/head
Yu Watanabe [Tue, 12 Oct 2021 09:50:34 +0000 (18:50 +0900)] 
sd-dhcp6-client: max_retransmit_time must be positive

Found by LGTM.com analysis.

2 years agosd-dhcp6-client: introduce dhcp6_option_can_request()
Yu Watanabe [Tue, 12 Oct 2021 06:51:09 +0000 (15:51 +0900)] 
sd-dhcp6-client: introduce dhcp6_option_can_request()

2 years agocoredumpctl: stop truncating information about coredump 20992/head
Zbigniew Jędrzejewski-Szmek [Tue, 12 Oct 2021 17:46:25 +0000 (19:46 +0200)] 
coredumpctl: stop truncating information about coredump

With the changes to limit that print 'Found module …' over and over, we were
hitting the journal field message limit, effectively truncating the info output.

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

2 years agonetwork: do not request RAPID_COMMIT option
Yu Watanabe [Tue, 12 Oct 2021 11:46:18 +0000 (20:46 +0900)] 
network: do not request RAPID_COMMIT option

The option must not be included in OPTION_REQUEST option.
See the "Client ORO" field in
https://www.iana.org/assignments/dhcpv6-parameters/dhcpv6-parameters.xhtml#dhcpv6-parameters-2

This deprecates RapidCommit= setting. Note that sd-dhcp6-client always
sets the RAPID_COMMIT option in the solicit message.

2 years agosystemd-machine-id-setup(1): "machine[d] ID" typo
наб [Tue, 12 Oct 2021 16:52:33 +0000 (18:52 +0200)] 
systemd-machine-id-setup(1): "machine[d] ID" typo

2 years agomove mfree to macro-fundamentals.h
Max Resch [Mon, 11 Oct 2021 23:26:00 +0000 (01:26 +0200)] 
move mfree to macro-fundamentals.h

2 years agoshared/dissect-image: reword debug message
Zbigniew Jędrzejewski-Szmek [Tue, 5 Oct 2021 17:56:46 +0000 (19:56 +0200)] 
shared/dissect-image: reword debug message

I read the message and initially thought that there's some bug in time
subtraction. Let's make it clear that the message is about what we'll
do in the future, and not a report on how we waited up until now.

2 years agosd-dhcp6-client: add missing options
Yu Watanabe [Mon, 11 Oct 2021 21:56:04 +0000 (06:56 +0900)] 
sd-dhcp6-client: add missing options

2 years agosd-dhcp6-client: add missing parenthesis
Yu Watanabe [Mon, 11 Oct 2021 21:07:47 +0000 (06:07 +0900)] 
sd-dhcp6-client: add missing parenthesis

2 years agosd-dhcp6-client: add missing message types
Yu Watanabe [Mon, 11 Oct 2021 20:20:59 +0000 (05:20 +0900)] 
sd-dhcp6-client: add missing message types

This also changes the prefix: DHCP6_ -> DHCP6_MESSAGE_.

2 years agosd-dhcp6-client: name one more enum
Yu Watanabe [Mon, 11 Oct 2021 20:45:23 +0000 (05:45 +0900)] 
sd-dhcp6-client: name one more enum

2 years agosd-dhcp6-client: typedef several enums
Yu Watanabe [Mon, 11 Oct 2021 20:43:04 +0000 (05:43 +0900)] 
sd-dhcp6-client: typedef several enums

Also introduces _MAX and _INVALID for several enums.

2 years agocore: remove refcount for bpf program
alexlzhu [Wed, 18 Aug 2021 23:01:05 +0000 (16:01 -0700)] 
core: remove refcount for bpf program

Currently ref count of bpf-program is kept in user space. However, the
kernel already implements its own ref count. Thus the ref count we keep for
bpf-program is redundant.

This PR removes ref count for bpf program as part of a task to simplify
bpf-program and remove redundancies, which will make the switch to
code-compiled BPF programs easier.

Part of #19270

2 years agonetwork: dhcp6-pd: also assign addresses in IA_PD prefixes on uplink interface
Yu Watanabe [Sun, 10 Oct 2021 14:16:09 +0000 (23:16 +0900)] 
network: dhcp6-pd: also assign addresses in IA_PD prefixes on uplink interface

Closes #20808.

2 years agodocs: add guidelines w.r.t. compatibility to docs/CONTRIBUTING.md 20980/head
Luca Boccassi [Mon, 11 Oct 2021 11:16:44 +0000 (12:16 +0100)] 
docs: add guidelines w.r.t. compatibility to docs/CONTRIBUTING.md

2 years agoLICENSES/README.md: remove reference to non-existing files
Luca Boccassi [Mon, 11 Oct 2021 11:18:02 +0000 (12:18 +0100)] 
LICENSES/README.md: remove reference to non-existing files

All example code was relicensed

2 years agoMerge pull request #20853 from yuwata/network-radv-set-default-timeouts
Zbigniew Jędrzejewski-Szmek [Tue, 12 Oct 2021 08:49:03 +0000 (10:49 +0200)] 
Merge pull request #20853 from yuwata/network-radv-set-default-timeouts

network: RADV: set default timeouts

2 years agosd-boot: Move security and console control protocol to missing_efi.h
Jan Janssen [Thu, 30 Sep 2021 09:12:21 +0000 (11:12 +0200)] 
sd-boot: Move security and console control protocol to missing_efi.h

This also fixes a broken #ifdefs in the header itself.

2 years agosd-boot: Use _cleanup_ in more places
Jan Janssen [Mon, 27 Sep 2021 11:07:16 +0000 (13:07 +0200)] 
sd-boot: Use _cleanup_ in more places