]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
3 years agotest-network: add test case for #23197 24174/head
Yu Watanabe [Mon, 1 Aug 2022 18:43:04 +0000 (03:43 +0900)] 
test-network: add test case for #23197

3 years agonetwork: make link_may_have_ipv6ll() optionally check Multicast= setting
Yu Watanabe [Mon, 1 Aug 2022 18:33:21 +0000 (03:33 +0900)] 
network: make link_may_have_ipv6ll() optionally check Multicast= setting

Fixes the IPv6LL issue in #23197.

3 years agonetwork: fix possible NULL-pointer dereference
Yu Watanabe [Mon, 1 Aug 2022 18:32:55 +0000 (03:32 +0900)] 
network: fix possible NULL-pointer dereference

3 years agonetwork: do not try to start ipv4acd on non-supported interfaces
Yu Watanabe [Mon, 1 Aug 2022 18:04:59 +0000 (03:04 +0900)] 
network: do not try to start ipv4acd on non-supported interfaces

Fixes IPv4LL issue reported in #23197.

3 years agonetwork: split link_ipv4ll_enabled() into two
Yu Watanabe [Mon, 1 Aug 2022 18:01:49 +0000 (03:01 +0900)] 
network: split link_ipv4ll_enabled() into two

And move it from networkd-link.[ch] to relevant files.

3 years agonetwork: drop doubled semicolon
Yu Watanabe [Mon, 1 Aug 2022 17:44:37 +0000 (02:44 +0900)] 
network: drop doubled semicolon

3 years agotree-wide: fix typo
Yu Watanabe [Mon, 1 Aug 2022 17:43:38 +0000 (02:43 +0900)] 
tree-wide: fix typo

3 years agobuild(deps): bump meson from 0.62.2 to 0.63.0 in /.github/workflows
dependabot[bot] [Mon, 1 Aug 2022 09:05:55 +0000 (09:05 +0000)] 
build(deps): bump meson from 0.62.2 to 0.63.0 in /.github/workflows

Bumps [meson](https://github.com/mesonbuild/meson) from 0.62.2 to 0.63.0.
- [Release notes](https://github.com/mesonbuild/meson/releases)
- [Commits](https://github.com/mesonbuild/meson/compare/0.62.2...0.63.0)

---
updated-dependencies:
- dependency-name: meson
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
3 years agobpf: set gcc std and compile flags
James Hilliard [Mon, 1 Aug 2022 01:34:11 +0000 (01:34 +0000)] 
bpf: set gcc std and compile flags

This should make gcc bpf compilation more reliable.

3 years agobuild(deps): bump github/codeql-action from 2.1.15 to 2.1.17
dependabot[bot] [Mon, 1 Aug 2022 09:05:28 +0000 (09:05 +0000)] 
build(deps): bump github/codeql-action from 2.1.15 to 2.1.17

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.1.15 to 2.1.17.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/3f62b754e23e0dd60f91b744033e1dc1654c0ec6...0c670bbf0414f39666df6ce8e718ec5662c21e03)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
3 years agobuild(deps): bump github/super-linter from 4.9.4 to 4.9.5
dependabot[bot] [Mon, 1 Aug 2022 09:05:35 +0000 (09:05 +0000)] 
build(deps): bump github/super-linter from 4.9.4 to 4.9.5

Bumps [github/super-linter](https://github.com/github/super-linter) from 4.9.4 to 4.9.5.
- [Release notes](https://github.com/github/super-linter/releases)
- [Changelog](https://github.com/github/super-linter/blob/main/docs/release-process.md)
- [Commits](https://github.com/github/super-linter/compare/a320804d310fdeb8d1a46c6c6c1e615d443b10c9...2d64ac1c067c34beaf7d24cc12733cd46236f76e)

---
updated-dependencies:
- dependency-name: github/super-linter
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
3 years agobuild(deps): bump actions/setup-node from 3.3.0 to 3.4.1
dependabot[bot] [Mon, 1 Aug 2022 09:05:24 +0000 (09:05 +0000)] 
build(deps): bump actions/setup-node from 3.3.0 to 3.4.1

Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3.3.0 to 3.4.1.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/eeb10cff27034e7acf239c5d29f62154018672fd...2fddd8803e2f5c9604345a0b591c3020ee971a93)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
3 years agogcrypt: switch to system rng before gcry_check_version (#24162)
Cristian Rodríguez [Mon, 1 Aug 2022 05:04:27 +0000 (01:04 -0400)] 
gcrypt: switch to system rng before gcry_check_version (#24162)

Current docs claim this must be done before gcry_check_version.

3 years agoAdd ACCEL_MOUNT_MATRIX for OXP Mini
Joaquín Ignacio Aramendía [Sat, 30 Jul 2022 19:56:04 +0000 (16:56 -0300)] 
Add ACCEL_MOUNT_MATRIX for OXP Mini

3 years agoMerge pull request #24090 from yuwata/test-login
Frantisek Sumsal [Sat, 30 Jul 2022 20:11:50 +0000 (20:11 +0000)] 
Merge pull request #24090 from yuwata/test-login

test: hopefully fixes race in TEST-35-LOGIN

3 years agoUpdate LINGUAS
Hugo Carvalho [Sat, 30 Jul 2022 18:12:09 +0000 (19:12 +0100)] 
Update LINGUAS

Sort language codes in alphabetical order

3 years agotest: restart logind before cleaning up sessions 24090/head
Yu Watanabe [Sat, 30 Jul 2022 14:51:25 +0000 (23:51 +0900)] 
test: restart logind before cleaning up sessions

Hopefully, fixes #24040.

3 years agotest: do not restart getty@tty2 automatically
Yu Watanabe [Sat, 30 Jul 2022 15:12:48 +0000 (00:12 +0900)] 
test: do not restart getty@tty2 automatically

3 years agotest: terminate session and user on cleanup
Yu Watanabe [Sat, 30 Jul 2022 15:11:59 +0000 (00:11 +0900)] 
test: terminate session and user on cleanup

3 years agodocs: Correct StandartOutput documentation
Max Gautier [Sat, 30 Jul 2022 06:46:27 +0000 (08:46 +0200)] 
docs: Correct StandartOutput documentation

fix #2114

3 years agoMerge pull request #24154 from yuwata/meson-fixups
Luca Boccassi [Sat, 30 Jul 2022 12:48:09 +0000 (13:48 +0100)] 
Merge pull request #24154 from yuwata/meson-fixups

meson: several fixlets

3 years agomeson: fix broken boolean kwarg 24154/head
Eli Schwartz [Wed, 27 Jul 2022 01:49:48 +0000 (21:49 -0400)] 
meson: fix broken boolean kwarg

Everywhere else that `conf.get('ENABLE_*')` is used as a boolean key for
something (for example in if statements) it always checks if == 1, but
in this one case it neglects to do so. This is important because
conf.get yields the same int that was stored, but if statements require
booleans.

So does executable's "install" kwarg, at least according to the
documentation. In actuality, it accepts all types without sanity
checking, then uses python "if bool(var)", so you can actually do
`install: 'do not'` and that's treated identical to `true`. This is a
type-checking bug which Meson will eventually fix.

muon fails on the same code, today.

3 years agomeson: strip various strings before converting them to integers
Eli Schwartz [Wed, 27 Jul 2022 01:13:55 +0000 (21:13 -0400)] 
meson: strip various strings before converting them to integers

"9\n" is not intrinsically a number, although some tools might
auto-strip strings before checking if they are a number. It's not
guaranteed, anyway.

3 years agomeson: use files in run_command with relativized path
Eli Schwartz [Wed, 27 Jul 2022 01:09:07 +0000 (21:09 -0400)] 
meson: use files in run_command with relativized path

Passing a file as a command argument in string form assumes that
run_command has the current subdir as its cwd, but Meson's documentation
*explicitly* calls this out as undefined and wrong to use.

Indeed, muon has a different implementation that uses a different cwd,
and this argument cannot be found. Instead, passing a files() object
means that it's the job of meson itself to verify the file exists, then
pass it to the run_command in some format that guarantees it is a valid
path reference.

3 years agomeson: move i18n module import to only when it is used
Eli Schwartz [Thu, 19 May 2022 10:54:40 +0000 (06:54 -0400)] 
meson: move i18n module import to only when it is used

When translations are disabled, it's not necessary to `import('i18n')`
and do nothing with it. Also, importing it is (slightly) slow as Meson
needs to load another implementation file from disk, so why bother with
that work?

More particularly, muon does not yet implement this module and fails to
setup. Since there's already an option to disable using it, it makes
sense to let that option completely skip the not-implemented
functionality and actually succeed.

3 years agomeson: fix type for many build options
Eli Schwartz [Thu, 19 May 2022 10:50:35 +0000 (06:50 -0400)] 
meson: fix type for many build options

Integers and booleans are supposed to be actual integers and booleans,
not strings describing their value, but Meson silently accepted either
one. It's still wrong to do it though, and other implementations of
Meson such as muon choke on it.

3 years agomeson: use 0 for default uids, gids, and time epoch
Yu Watanabe [Sat, 30 Jul 2022 04:44:11 +0000 (13:44 +0900)] 
meson: use 0 for default uids, gids, and time epoch

0 UID and GID are special, and should not be acceptable for the settings.
Hence, we can handle 0 as unset.

Strictly speaking, time epoch with 0 is valid, but I guess no one use
0 as a valid value.

3 years agogcrypt: prefer the OS RNG
Cristian Rodríguez [Tue, 26 Jul 2022 18:24:12 +0000 (18:24 +0000)] 
gcrypt: prefer the OS RNG

by default, gcrypt defaults to an userspace RNG, this is
the wrong thing (tm) to do on linux.

Switch to the SYSTEM rng instead.

3 years agovirt: detect KubeVirt instance
Fei Li [Fri, 17 Jun 2022 11:26:28 +0000 (19:26 +0800)] 
virt: detect KubeVirt instance

Kubevirt is currently technically based on KVM (but not xen yet[1]).
The systemd-detect-virt command, used to differentiate the current
virtualization environment, works fine on x86 relying on CPUID, while
fails to get the correct value (none instead of kvm) on aarch64.

Let's fix this by adding a new 'vendor[KubeVirt] = kvm' classification
considering the sys_vendor is always KubeVirt.

[1] https://groups.google.com/g/kubevirt-dev/c/C6cUgzTOsVg

Signed-off-by: Fei Li <lifei.shirley@bytedance.com>
3 years agojournalctl: allow statically linked build
James Hilliard [Wed, 27 Jul 2022 21:28:09 +0000 (15:28 -0600)] 
journalctl: allow statically linked build

The journalctl tool may be needed on cross compilation hosts in order
to run --update-catalog against a target rootfs.

To avoid reliability issues caused by shared linking allow journalctl
to be linked statically.

3 years agounits: Simplify container getty handling
Daan De Meyer [Tue, 19 Jul 2022 08:37:05 +0000 (10:37 +0200)] 
units: Simplify container getty handling

Let's remove the baud settings for the container getty units since
they don't have any effect there anyway. On top of that, when we're
dealing with container TTYs, we can handle all the setup involved
ourselves so let's prevent agetty/login from touching the container
tty at all.

One example where this helps is that it actually makes disabling
TTYVHangup have an effect since before, login would unconditionally
call vhangup() on the tty.

3 years agoMerge pull request #24080 from rdtscp/feature/machinectl/copy-force-flag
Daan De Meyer [Thu, 28 Jul 2022 12:15:33 +0000 (14:15 +0200)] 
Merge pull request #24080 from rdtscp/feature/machinectl/copy-force-flag

Add --force flag to machinectl copy-[to|from]

3 years agoupdate TODO
Lennart Poettering [Thu, 28 Jul 2022 09:25:26 +0000 (11:25 +0200)] 
update TODO

3 years agoMerge pull request #23875 from yuwata/resolve-mdns-fix-use-after-free
Luca Boccassi [Wed, 27 Jul 2022 21:57:31 +0000 (22:57 +0100)] 
Merge pull request #23875 from yuwata/resolve-mdns-fix-use-after-free

resolve: mdns: fix use-after-free

3 years agoUse correct option name in error message
Janis Goldschmidt [Wed, 27 Jul 2022 09:23:20 +0000 (11:23 +0200)] 
Use correct option name in error message

3 years agomachinectl: Add plumbing for a `--force` flag for file copy 24080/head
Alexander Wilson [Fri, 22 Jul 2022 11:08:11 +0000 (04:08 -0700)] 
machinectl: Add plumbing for a `--force` flag for file copy
machine: Add APIs CopyTo[Machine]WithFlags + CopyFrom[Machine]WithFlags
- Same API to those without `WithFlags` (except this can take flags)
- Initially, only a flag to allow replacing a file if it already exists

3 years agocopy: Respect COPY_REPLACE flag for copy_tree
Alexander Wilson [Fri, 22 Jul 2022 11:13:31 +0000 (04:13 -0700)] 
copy: Respect COPY_REPLACE flag for copy_tree
- Add a test that asserts that copy_tree on an existing file will fail without COPY_REPLACE
- Add a test that asserts that copy_tree with COPY_MERGE and COPY_REPLACE on an existing directory will overwrite files that already exist.

3 years agocopy.[ch]: Refactor
Alexander Wilson [Fri, 22 Jul 2022 11:15:08 +0000 (04:15 -0700)] 
copy.[ch]: Refactor
- Refactor: Move HardlinkContext to header file
- Refactor: Create `fd_copy_tree_generic` which isolates the functionality to check stat type and appropriately copy.
- Refactor: Create `fd_copy_leaf` which handles copying leaf nodes of a file tree.

3 years agostub: override StubInfo EFI variable unconditionally, since *we* own it
Lennart Poettering [Mon, 25 Jul 2022 15:40:32 +0000 (17:40 +0200)] 
stub: override StubInfo EFI variable unconditionally, since *we* own it

The other variables are owned by the boot menu (i.e. sd-boot), we only
fill those in if it didn't do so for us (to support cases where our stub
kernel is directly invoked by UEFI). But StubInfo is genuinely about the
stub, hence let's simplify things and unconditionally set it from the
stub.

3 years agoboot: introduce common shortcut exit path in pack_cpio()
Lennart Poettering [Tue, 26 Jul 2022 16:23:49 +0000 (18:23 +0200)] 
boot: introduce common shortcut exit path in pack_cpio()

THis will be useful in a later commit, when we add more stuff to the
common exit path. But even without that, it's a nice simplification,
removing redundant lines.

3 years agoportable: set PrivateTmp=yes in trusted profile too
Luca Boccassi [Tue, 26 Jul 2022 16:41:51 +0000 (17:41 +0100)] 
portable: set PrivateTmp=yes in trusted profile too

When running on images you don't want to modify the /tmp
directory even if it's writable, and often it will just
be read-only. Set PrivateTmp=yes.

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

3 years agoMerge pull request #24122 from yuwata/core-mount-bind-mount-on-nfs
Luca Boccassi [Tue, 26 Jul 2022 22:17:23 +0000 (23:17 +0100)] 
Merge pull request #24122 from yuwata/core-mount-bind-mount-on-nfs

core/mount: ignore -EACCES from mkdir_p_label() on NFS

3 years agomkosi: Update to latest commit
Daan De Meyer [Tue, 26 Jul 2022 18:40:01 +0000 (20:40 +0200)] 
mkosi: Update to latest commit

Fixes an issue with Arch builds failing by updating the archlinux
keyring package.

3 years agoefi: update measure.h comments a bit
Lennart Poettering [Mon, 25 Jul 2022 15:42:54 +0000 (17:42 +0200)] 
efi: update measure.h comments a bit

3 years agoupdate TODO
Lennart Poettering [Mon, 25 Jul 2022 15:33:53 +0000 (17:33 +0200)] 
update TODO

(this basically just copies a coment from src/boot/efi/measure.h into
the TODO)

3 years agomeson: fix math flags check
asavah [Tue, 26 Jul 2022 14:48:24 +0000 (17:48 +0300)] 
meson: fix math flags check

3 years agocore/mount: downgrade log level about several mkdir failures 24122/head
Yu Watanabe [Tue, 26 Jul 2022 14:23:01 +0000 (23:23 +0900)] 
core/mount: downgrade log level about several mkdir failures

3 years agoRevert "core/mount: fail early if directory cannot be created"
Yu Watanabe [Tue, 26 Jul 2022 14:15:01 +0000 (23:15 +0900)] 
Revert "core/mount: fail early if directory cannot be created"

This reverts commit e4de58c8231e47509ffeb3aa47620ca42f22d7f6.

If mkdir() fails and the path does exist, then the later mount
command fails anyway. Hence, it is not necessary to fail here.

Fixes #24120.

3 years agomkosi: Build against Fedora rawhide as well
Daan De Meyer [Tue, 26 Jul 2022 12:53:16 +0000 (14:53 +0200)] 
mkosi: Build against Fedora rawhide as well

3 years agohome: drop conflicted headers
Yu Watanabe [Tue, 26 Jul 2022 11:03:12 +0000 (20:03 +0900)] 
home: drop conflicted headers

Fixes #24117.

3 years agohomed: fix dbus node enumerator
Yu Watanabe [Tue, 26 Jul 2022 10:31:31 +0000 (19:31 +0900)] 
homed: fix dbus node enumerator

Fixes #24114.

3 years agoMerge pull request #23702 from igo95862/fix-object-manager-interface-in-wrong-places
Lennart Poettering [Tue, 26 Jul 2022 09:24:02 +0000 (11:24 +0200)] 
Merge pull request #23702 from igo95862/fix-object-manager-interface-in-wrong-places

Fix ObjectManager interfaces for `GetManagedObjects`, `InerfacesAdded` and `InterfacesRemoved`

3 years agoFix ObjectManager interface emitted for non-manager objects 23702/head
igo95862 [Sun, 3 Jul 2022 16:24:15 +0000 (19:24 +0300)] 
Fix ObjectManager interface emitted for non-manager objects

3 years agotest-bus-objects: Test interfaces added/removed signal interfaces
igo95862 [Sun, 3 Jul 2022 15:40:10 +0000 (18:40 +0300)] 
test-bus-objects: Test interfaces added/removed signal interfaces

`org.freedesktop.DBus.ObjectManager` should only be emitted if
object in question has ObjectManager attached.

3 years agoFix GetManagedObjects returning ObjectManager interface for non-manager objects
igo95862 [Sun, 3 Jul 2022 14:11:46 +0000 (17:11 +0300)] 
Fix GetManagedObjects returning ObjectManager interface for non-manager objects

3 years agotest-bus-objects: Test GetManagedObjects interfaces are correct
igo95862 [Fri, 10 Jun 2022 17:51:04 +0000 (20:51 +0300)] 
test-bus-objects: Test GetManagedObjects interfaces are correct

Objects without ObjectManager should not have
`org.freedesktop.DBus.ObjectManager` interface.

Object with ObjectManager should do.

Also added ASSERT_SE_NONNEG and ASSERT_NONNEG macros.

3 years agoMerge pull request #24033 from dtardon/list-automounts
Luca Boccassi [Mon, 25 Jul 2022 20:28:11 +0000 (21:28 +0100)] 
Merge pull request #24033 from dtardon/list-automounts

Add `systemctl list-automounts`

3 years agolocaled: don't fail if we cannot copy an xattr
Lennart Poettering [Mon, 25 Jul 2022 09:31:05 +0000 (11:31 +0200)] 
localed: don't fail if we cannot copy an xattr

We ignore xattr copy failures on all other cases, and we should do so
here too.

Fixes: #24106
3 years agoupdate TODO
Lennart Poettering [Mon, 25 Jul 2022 14:08:10 +0000 (16:08 +0200)] 
update TODO

3 years agoupdate TODO
Lennart Poettering [Mon, 25 Jul 2022 13:01:37 +0000 (15:01 +0200)] 
update TODO

3 years agoupdate TODO
Lennart Poettering [Mon, 25 Jul 2022 12:59:35 +0000 (14:59 +0200)] 
update TODO

3 years agoTODO: add new 'deprecations and removals' section
Lennart Poettering [Mon, 25 Jul 2022 12:55:48 +0000 (14:55 +0200)] 
TODO: add new 'deprecations and removals' section

3 years agojournal: Move more pattern matching logic into pcre2-util
Daan De Meyer [Fri, 22 Jul 2022 12:49:42 +0000 (14:49 +0200)] 
journal: Move more pattern matching logic into pcre2-util

To avoid having "#if HAVE_PCRE2" all throughout the code, let's
confine the pcre2 header specific stuff to pcre2-util.c. Instead of
exposing all the individual symbols from pcre2, let's only expose
three high level functions that do all we need:

- pcre2_pattern_compile(): Compile the regex
- pcre2_pattern_matches(): Check if the compiled regex matches a message
- pcre2_pattern_free(): Free the compiled regex

We expose the compiled pcre2 pattern (which is of type pcre2_code *) as
a void pointer to avoid having to include pcre2.h in all code where we
work with compiled pcre2 patterns. For readability, we typedef void
to pcre2_pattern and use that as the type specifier for compiled pcre2
patterns.

3 years agoshell-completion: add systemctl list-automounts 24033/head
David Tardon [Fri, 22 Jul 2022 15:07:56 +0000 (17:07 +0200)] 
shell-completion: add systemctl list-automounts

3 years agoman: document systemctl list-automounts
David Tardon [Fri, 15 Jul 2022 14:07:31 +0000 (16:07 +0200)] 
man: document systemctl list-automounts

3 years agosystemctl: add list-automounts verb
David Tardon [Fri, 15 Jul 2022 13:58:06 +0000 (15:58 +0200)] 
systemctl: add list-automounts verb

Fixes: #6056
3 years agosystemctl: simplify var. definition a bit
David Tardon [Mon, 25 Jul 2022 07:32:16 +0000 (09:32 +0200)] 
systemctl: simplify var. definition a bit

3 years agosystemctl: extract output of legend to a function
David Tardon [Mon, 25 Jul 2022 07:23:49 +0000 (09:23 +0200)] 
systemctl: extract output of legend to a function

3 years agosystemctl: drop unneeded condition
David Tardon [Mon, 25 Jul 2022 07:28:31 +0000 (09:28 +0200)] 
systemctl: drop unneeded condition

3 years agosystemctl: reduce var. scope and shorten the code a bit
David Tardon [Sat, 23 Jul 2022 15:07:52 +0000 (17:07 +0200)] 
systemctl: reduce var. scope and shorten the code a bit

3 years agoboot: a couple of tweaks recommended by Coccinelle
Frantisek Sumsal [Mon, 25 Jul 2022 07:49:39 +0000 (09:49 +0200)] 
boot: a couple of tweaks recommended by Coccinelle

3 years agosystemctl: fix type used for array sizes to size_t
Lennart Poettering [Mon, 25 Jul 2022 08:40:32 +0000 (10:40 +0200)] 
systemctl: fix type used for array sizes to size_t

We always should use size_t for sizes of arrays (and any size of memory,
in fact), unless there's a strong reason to use something else. Hence,
let's fix these cases where we sloppily used "unsigned" or "int"
instead.

No change in behaviour, this is just to make things less surprising for
the random reader.

3 years agoMerge pull request #23991 from yuwata/udev-reload
Lennart Poettering [Mon, 25 Jul 2022 09:20:08 +0000 (11:20 +0200)] 
Merge pull request #23991 from yuwata/udev-reload

udev: reload rules and builtins only when mtime of a config changed

3 years agosysctl: add --strict option to fail if sysctl does not exists
Quentin Deslandes [Fri, 22 Jul 2022 15:18:15 +0000 (17:18 +0200)] 
sysctl: add --strict option to fail if sysctl does not exists

systemd-sysctl currently fails silently under any of these conditions:
- Missing permission to write a sysctl.
- Invalid sysctl (path doesn't exists).
- Ignore failure flag ('-' in front of the sysctl name).

Because of this behaviour, configuration issues can go unnoticed as
there is no way to detect those unless going through the logs.

--strict option forces systemd-sysctl to fail if a sysctl is invalid or
if permission are insufficient. Errors on sysctl marked as "ignore
failure" will still be ignored.

3 years agoglibc: Remove #include <linux/fs.h> to resolve fsconfig_command/mount_attr conflict...
Rudi Heitbaum [Sat, 23 Jul 2022 10:38:49 +0000 (10:38 +0000)] 
glibc: Remove #include <linux/fs.h> to resolve fsconfig_command/mount_attr conflict with glibc 2.36

3 years agounit-file: avoid (null) in debugging logs
Yu Watanabe [Sat, 23 Jul 2022 03:48:35 +0000 (12:48 +0900)] 
unit-file: avoid (null) in debugging logs

The variable `inst` was set to NULL by TAKE_PTR().

This fixes the following log message:
```
systemd[1]: Unit getty@tty2.service has alias (null).
```

3 years agoMerge pull request #24020 from yuwata/network-rfkill
Yu Watanabe [Sun, 24 Jul 2022 04:01:50 +0000 (13:01 +0900)] 
Merge pull request #24020 from yuwata/network-rfkill

network: fix wlan interface handling when its RF is killed

3 years agoMerge pull request #23828 from yuwata/nfnl-cleanups
Yu Watanabe [Sun, 24 Jul 2022 04:01:28 +0000 (13:01 +0900)] 
Merge pull request #23828 from yuwata/nfnl-cleanups

sd-netlink: several cleanups for netfilter

3 years agosd-netlink: introduce sd_nfnl_{send,call}_batch() 23828/head
Yu Watanabe [Sat, 25 Jun 2022 18:52:59 +0000 (03:52 +0900)] 
sd-netlink: introduce sd_nfnl_{send,call}_batch()

This also introduces sd_nfnl_message_new() which can be also used for
non-nftables subsystems.

3 years agosd-netlink: do not compare pointer with 0
Yu Watanabe [Sat, 25 Jun 2022 06:38:06 +0000 (15:38 +0900)] 
sd-netlink: do not compare pointer with 0

3 years agofirewall-util: introduce nfnl_close_expr_container() helper function
Yu Watanabe [Wed, 15 Jun 2022 04:45:37 +0000 (13:45 +0900)] 
firewall-util: introduce nfnl_close_expr_container() helper function

And merge nfnl_add_expr_lookup_set() and nfnl_add_expr_lookup_map().

3 years agosd-netlink: merge sd_nfnl_nft_message_{new,del}_setelems_begin()
Yu Watanabe [Wed, 15 Jun 2022 04:04:46 +0000 (13:04 +0900)] 
sd-netlink: merge sd_nfnl_nft_message_{new,del}_setelems_begin()

And this makes the new merged function `sd_nfnl_nft_message_new_setelems()`
not open container, as containers should be opened and closed in the
same function in general. Otherwise, it is hard to understand which
level we are in the nested attribute tree.

3 years agosd-netlink: drop unused sd_nfnl_nft_message_del_table()
Yu Watanabe [Wed, 15 Jun 2022 03:57:41 +0000 (12:57 +0900)] 
sd-netlink: drop unused sd_nfnl_nft_message_del_table()

3 years agosd-netlink: introduce sd_netlink_message_append_container_data()
Yu Watanabe [Wed, 15 Jun 2022 04:55:20 +0000 (13:55 +0900)] 
sd-netlink: introduce sd_netlink_message_append_container_data()

3 years agosd-netlink: several cleanups for netfilter
Yu Watanabe [Tue, 14 Jun 2022 13:22:54 +0000 (22:22 +0900)] 
sd-netlink: several cleanups for netfilter

- rename family -> nfproto, and other arguments,
- check specified nfproto,
- change type of several function arguments that specify data length,
- add several assertions,
- drop unnecessary headers.

3 years agofirewall-util: drop unnecessary string attribute
Yu Watanabe [Wed, 15 Jun 2022 03:53:32 +0000 (12:53 +0900)] 
firewall-util: drop unnecessary string attribute

As `sd_netlink_message_open_container_union()` also appends the string
attribute.

3 years agofirewall-util-nft: various cleanups
Yu Watanabe [Tue, 14 Jun 2022 08:50:59 +0000 (17:50 +0900)] 
firewall-util-nft: various cleanups

- add missing assertions,
- align enum elements,
- use cleanup attribute, and so on.

3 years agotree-wide: drop unnecessary inclusion of netlink-util.h
Yu Watanabe [Tue, 14 Jun 2022 07:36:45 +0000 (16:36 +0900)] 
tree-wide: drop unnecessary inclusion of netlink-util.h

3 years agosd-netlink: move rtnl_message_type_is_*() to netlink-message-rtnl.c
Yu Watanabe [Tue, 14 Jun 2022 07:36:17 +0000 (16:36 +0900)] 
sd-netlink: move rtnl_message_type_is_*() to netlink-message-rtnl.c

3 years agonetwork: do not try to bring up wifi interface if rfkill is active 24020/head
Yu Watanabe [Thu, 14 Jul 2022 21:26:57 +0000 (06:26 +0900)] 
network: do not try to bring up wifi interface if rfkill is active

This fixes the following error:
---
systemd-networkd[465]: wlan0: Could not bring up interface: Operation not possible due to RF-kill
---

Fixes #23649.

3 years agonetwork: also assign rfkill device to Wiphy object
Yu Watanabe [Fri, 22 Jul 2022 00:46:52 +0000 (09:46 +0900)] 
network: also assign rfkill device to Wiphy object

Preparation for later commits.

3 years agonetwork: assign corresponding sd-device object to Wiphy object
Yu Watanabe [Thu, 21 Jul 2022 23:48:55 +0000 (08:48 +0900)] 
network: assign corresponding sd-device object to Wiphy object

As an analogy for Link object, let's each Wiphy object has the
corresponding sd-device object. The sd-device object will be used in
later commits.

3 years agonetwork: set wiphy name in wiphy_new()
Yu Watanabe [Sat, 23 Jul 2022 11:19:39 +0000 (20:19 +0900)] 
network: set wiphy name in wiphy_new()

Then, we can assume all Wiphy objects managed by Manager has both valid
index and name.

3 years agonetwork: add TODO about interface renaming
Yu Watanabe [Sat, 23 Jul 2022 00:11:54 +0000 (09:11 +0900)] 
network: add TODO about interface renaming

3 years agonetwork: unref sd-device object assigned to Link on remove uevent
Yu Watanabe [Sat, 23 Jul 2022 00:00:32 +0000 (09:00 +0900)] 
network: unref sd-device object assigned to Link on remove uevent

Otherwise, outdated device information may be used in a short timespan.

3 years agonetwork: introduce a tiny wrapper for manager_udev_process_link()
Yu Watanabe [Thu, 21 Jul 2022 23:32:39 +0000 (08:32 +0900)] 
network: introduce a tiny wrapper for manager_udev_process_link()

Preparation for later commits.

3 years agonetwork: rename Link.sd_device -> Link.dev
Yu Watanabe [Sat, 23 Jul 2022 11:00:44 +0000 (20:00 +0900)] 
network: rename Link.sd_device -> Link.dev

3 years agotest-network: reload udevd when .link file is copied/removed 23991/head
Yu Watanabe [Wed, 13 Jul 2022 03:29:17 +0000 (12:29 +0900)] 
test-network: reload udevd when .link file is copied/removed

3 years agoudev-builtin: logs when needs reloading
Yu Watanabe [Fri, 15 Jul 2022 03:41:26 +0000 (12:41 +0900)] 
udev-builtin: logs when needs reloading

3 years agoudev: reload rules and builtins only when mtime of a config changed
Yu Watanabe [Wed, 13 Jul 2022 02:52:37 +0000 (11:52 +0900)] 
udev: reload rules and builtins only when mtime of a config changed

This makes udevd reload rules only when the timestamp is updated,
even on SIGHUP or `udevadm control --reload`.
So, we can call `udevadm control --reload` without huge performance
penalty when no rules, .link files, and so on are changed.