]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
2 years agoMerge pull request #21275 from keszybz/makefs-quiet
Lennart Poettering [Tue, 16 Nov 2021 15:55:47 +0000 (16:55 +0100)] 
Merge pull request #21275 from keszybz/makefs-quiet

Makefs quiet output

2 years agoMerge pull request #21386 from keszybz/binfmt-later
Lennart Poettering [Tue, 16 Nov 2021 15:54:47 +0000 (16:54 +0100)] 
Merge pull request #21386 from keszybz/binfmt-later

Order binfmt.service after local-fs.target

2 years agohwdb: ieee1394-unit-function: add entry for MOTU Track 16
Takashi Sakamoto [Tue, 16 Nov 2021 08:05:07 +0000 (17:05 +0900)] 
hwdb: ieee1394-unit-function: add entry for MOTU Track 16

In Linux kernel 5.16 prepatch, MOTU Track 16 is newly supported by ALSA
firewire-motu driver.

This commit adds hwdb entry for the device.

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=411ac2982cb6

2 years agonetwork: tuntap: drop unnecessary minus
Yu Watanabe [Tue, 16 Nov 2021 07:24:35 +0000 (16:24 +0900)] 
network: tuntap: drop unnecessary minus

2 years agoMerge pull request #21383 from yuwata/network-address-scope
Lennart Poettering [Tue, 16 Nov 2021 15:53:26 +0000 (16:53 +0100)] 
Merge pull request #21383 from yuwata/network-address-scope

network: use route_scope_from_string() at one more place

2 years agoMerge pull request #21380 from poettering/homed-test-qemu
Lennart Poettering [Tue, 16 Nov 2021 15:52:57 +0000 (16:52 +0100)] 
Merge pull request #21380 from poettering/homed-test-qemu

homed: make sure homed tests actually run in qemu, too

2 years agoumount: fix log message
Lennart Poettering [Tue, 16 Nov 2021 09:09:29 +0000 (10:09 +0100)] 
umount: fix log message

The sentence wasn't correct English language, let's fix that. More
importantly: if the mount options are empty we'd display "(null)" here.
Fix that. (And they can be empty IRL, see CI results)

2 years agoman: document fs types known to makefs 21275/head
Zbigniew Jędrzejewski-Szmek [Sat, 13 Nov 2021 15:47:40 +0000 (16:47 +0100)] 
man: document fs types known to makefs

2 years agomakefs: add "support" for f2fs
Zbigniew Jędrzejewski-Szmek [Sat, 13 Nov 2021 15:40:46 +0000 (16:40 +0100)] 
makefs: add "support" for f2fs

The man page doesn't quite match what --help says, and I needed to use "-f" to
write a wiped partition. This all feels a bit experimental, but the fs has some
adherents, and we should make it easy to use.

(Also, an empty 256MB device formatted and mounted shows up as
  Filesystem      Size  Used Avail Use% Mounted on
  /dev/loop0      254M   85M  170M  34% /var/tmp/mount
which also seems a bit over the top…)

Requested in https://github.com/systemd/systemd/pull/21275#issuecomment-967928690.

2 years agomakefs: fix too-long swap labels
Zbigniew Jędrzejewski-Szmek [Fri, 12 Nov 2021 14:56:56 +0000 (15:56 +0100)] 
makefs: fix too-long swap labels

Apparently mkswap has it's own limit, and it seems to be one lower than the one
for ext2/3/4.

$ for i in ext2 ext3 ext4 btrfs xfs vfat swap minix; do
  echo $i && wipefs -q -a '/var/tmp/głąbźśńćąśððð.img'
  build/systemd-makefs $i '/var/tmp/głąbźśńćąśððð.img'
done

ext2
/var/tmp/głąbźśńćąśððð.img successfully formatted as ext2 (label "głąbźśńćą", uuid 7626bc5c-8ac4-43cf-87b7-1b2761272dd3)
ext3
/var/tmp/głąbźśńćąśððð.img successfully formatted as ext3 (label "głąbźśńćą", uuid 0da22cad-0dbf-4a7a-962d-12cd39d006b5)
ext4
/var/tmp/głąbźśńćąśððð.img successfully formatted as ext4 (label "głąbźśńćą", uuid dded267b-8955-4d19-82a5-1f231d446059)
btrfs
/var/tmp/głąbźśńćąśððð.img successfully formatted as btrfs (label "głąbźśńćąśððð.img", uuid 9e2e89f1-010d-4ab6-80f3-f9e215dbc225)
xfs
/var/tmp/głąbźśńćąśððð.img successfully formatted as xfs (label "głąbźśń", uuid 2cc937af-4c41-465c-8f52-aab2304bd860)
vfat
mkfs.fat 4.2 (2021-01-31)
/var/tmp/głąbźśńćąśððð.img successfully formatted as vfat (label "G__B_______", uuid a3a9e028)

swap
...
LABEL=głąbźśńć, UUID=0ab787aa-37a6-4b32-978b-d71efc6e6098
/var/tmp/głąbźśńćąśððð.img successfully formatted as swap (label "głąbźśńć", uuid 0ab787aa-37a6-4b32-978b-d71efc6e6098)

minix
...
/var/tmp/głąbźśńćąśððð.img successfully formatted as minix (no label or uuid specified)

2 years agomakefs: fix too-long ext2/3/4 labels
Zbigniew Jędrzejewski-Szmek [Fri, 12 Nov 2021 13:22:58 +0000 (14:22 +0100)] 
makefs: fix too-long ext2/3/4 labels

2 years agomakefs: fix label for vfat filesystems
Zbigniew Jędrzejewski-Szmek [Tue, 9 Nov 2021 07:52:19 +0000 (08:52 +0100)] 
makefs: fix label for vfat filesystems

I was testing with a "test1.img" and mkfs.vfat rejects "TEST1.IMG" with the
error "Labels with characters *?.,;:/\|+=<>[]" are not allowed". So let's
replace those characters with "_".

2 years agobasic/utf8: add function to convert to ASCII
Zbigniew Jędrzejewski-Szmek [Fri, 12 Nov 2021 09:27:13 +0000 (10:27 +0100)] 
basic/utf8: add function to convert to ASCII

The conversion must be lossy because ASCII doesn't have enough chars.

2 years agotest: make homed test run in qemu 21380/head
Lennart Poettering [Mon, 15 Nov 2021 15:21:37 +0000 (16:21 +0100)] 
test: make homed test run in qemu

2 years agohomed: wait for luks devices to go away
Lennart Poettering [Mon, 15 Nov 2021 16:55:47 +0000 (17:55 +0100)] 
homed: wait for luks devices to go away

Let's make sure LUKS volumes are really definitely gone before we retun
in the deactivation logic.

2 years agoMerge pull request #21373 from poettering/filesystems-more-groups
Zbigniew Jędrzejewski-Szmek [Tue, 16 Nov 2021 09:27:21 +0000 (10:27 +0100)] 
Merge pull request #21373 from poettering/filesystems-more-groups

some file system tables/magic love

2 years agounits: delay binfmt processing until after local-fs.target 21386/head
Zbigniew Jędrzejewski-Szmek [Tue, 16 Nov 2021 08:19:07 +0000 (09:19 +0100)] 
units: delay binfmt processing until after local-fs.target

Users may use rules that refer to binaries e.g. in /opt or /usr/local,
and those directories may be separate mount points. We don't need the
binfmt rules in early boot, so let's delay the service so that we can
rely on the full local filesystem being visible.

Fixes #21178.

2 years agoman: add markup
Zbigniew Jędrzejewski-Szmek [Tue, 16 Nov 2021 08:15:29 +0000 (09:15 +0100)] 
man: add markup

2 years agobasic/errno-util: adjust indentation
Zbigniew Jędrzejewski-Szmek [Tue, 16 Nov 2021 08:08:12 +0000 (09:08 +0100)] 
basic/errno-util: adjust indentation

It was bothering me that this backslash wasn't aligned with the
ones below.

2 years agodocs: mention RET_NERRNO() in CODING_STYLE.md
Lennart Poettering [Mon, 15 Nov 2021 08:32:41 +0000 (09:32 +0100)] 
docs: mention RET_NERRNO() in CODING_STYLE.md

2 years agotree-wide: use new RET_NERRNO() helper at various places
Lennart Poettering [Sun, 14 Nov 2021 21:40:49 +0000 (22:40 +0100)] 
tree-wide: use new RET_NERRNO() helper at various places

2 years agomacro: add new helper RET_NERRNO()
Lennart Poettering [Sun, 14 Nov 2021 21:31:27 +0000 (22:31 +0100)] 
macro: add new helper RET_NERRNO()

This new helper converts libc style syscall return values into
systemd-kernel (actually: kernel style) negative errno values.

It's implemented as macro-like inline function, and propagates return
values >= 0 as themselves and returns -errno for negative error returns.

THis is supposed to be little more than syntactic sugar so that we can
reduce a lot of (short, but still) boilerplate code whever we convert
libc style error handling into our own.

As discussed here:

https://github.com/systemd/systemd/pull/21326#discussion_r748413537

2 years agocgroup-util: laccess() returns negative errno already
Lennart Poettering [Sun, 14 Nov 2021 21:30:57 +0000 (22:30 +0100)] 
cgroup-util: laccess() returns negative errno already

2 years agonetwork: address: explicitly mention that the address is localhost 21383/head
Yu Watanabe [Tue, 16 Nov 2021 06:16:14 +0000 (15:16 +0900)] 
network: address: explicitly mention that the address is localhost

2 years agonetwork: address: use route_scope_from_string()
Yu Watanabe [Tue, 16 Nov 2021 06:11:15 +0000 (15:11 +0900)] 
network: address: use route_scope_from_string()

2 years agounits: relax sandbox so that uidmap stuff can work
Lennart Poettering [Mon, 15 Nov 2021 15:21:59 +0000 (16:21 +0100)] 
units: relax sandbox so that uidmap stuff can work

The uidmap suff requires additional caps and userns to work in some
cases. Allow it.

Follow-up for: 1147c538bbb6a2d3d5ba2e40f1437bcbeb22b33e

2 years agohomed: reset HomeSetup.undo_dm field when deactivating home dir the official way
Lennart Poettering [Mon, 15 Nov 2021 20:40:04 +0000 (21:40 +0100)] 
homed: reset HomeSetup.undo_dm field when deactivating home dir the official way

There are two ways to deactivate a home dir: the official way if someone
calls "homectl deactivate" or something similar. Or the
error-case/side-effect code path, where we unwind exactly what we
already set up.

The .undo_dm field is supposed to tell us whether we shall still detach
the DM device. We forgot to update it in the official code path. Add
that. (We did it correctly in the error case codepath already).

(The issue is minor: if we forget to reset it in the clean code path,
then we'll try to unmount again what is already unmounted in the error
code paths, but since we ignore errors there — to not "stack" errors –
we never noticed and there's no bad effect of it)

2 years agoMerge pull request #21377 from poettering/slow-math
Yu Watanabe [Tue, 16 Nov 2021 01:33:48 +0000 (10:33 +0900)] 
Merge pull request #21377 from poettering/slow-math

meson: stop using -ffast-math

2 years agoMerge pull request #21344 from yuwata/network-ignore-carrier-loss-timespan
Yu Watanabe [Tue, 16 Nov 2021 01:27:01 +0000 (10:27 +0900)] 
Merge pull request #21344 from yuwata/network-ignore-carrier-loss-timespan

network: make IgnoreCarrierLoss= also take a timespan

2 years agoMerge pull request #21235 from bacher09/slava/supress_ifgroup
Yu Watanabe [Tue, 16 Nov 2021 01:25:33 +0000 (10:25 +0900)] 
Merge pull request #21235 from bacher09/slava/supress_ifgroup

Add suppress_ifgroup option in routing policy

2 years agofilesystems: apparently f2fs is als reasonably common 21373/head
Lennart Poettering [Mon, 15 Nov 2021 21:54:15 +0000 (22:54 +0100)] 
filesystems: apparently f2fs is als reasonably common

As suggested:

https://github.com/systemd/systemd/pull/21373#discussion_r749523677

2 years agofilesystems: add ntfs/ntfs3 magic and add it current version to group
Lennart Poettering [Mon, 15 Nov 2021 21:53:25 +0000 (22:53 +0100)] 
filesystems: add ntfs/ntfs3 magic and add it current version to group

As suggested:

https://github.com/systemd/systemd/pull/21373#discussion_r749523677

2 years agofilesystems: add comments to gperf file anomalies
Lennart Poettering [Mon, 15 Nov 2021 13:14:54 +0000 (14:14 +0100)] 
filesystems: add comments to gperf file anomalies

Some file systems have non-unique names or non-unique magics. Let's add
some comments explaining that.

2 years agofilesystems: fix magic of "smb3" fs
Lennart Poettering [Mon, 15 Nov 2021 13:15:40 +0000 (14:15 +0100)] 
filesystems: fix magic of "smb3" fs

smb3 is an alias for modern CIFS, not the old SMB fs (see kmod alias list, i.e. modinfo fs-smb3).

(the old smbfs has long been removed from the kernel actually, it's dead
and obsolete)

2 years agofilesystems: list rpc_pipefs as auxiliary kernel API VFS
Lennart Poettering [Mon, 15 Nov 2021 13:10:50 +0000 (14:10 +0100)] 
filesystems: list rpc_pipefs as auxiliary kernel API VFS

2 years agofilesystems: list orangefs as network fs
Lennart Poettering [Mon, 15 Nov 2021 13:10:04 +0000 (14:10 +0100)] 
filesystems: list orangefs as network fs

it's the new name or pvfs2, hence we might as well list it, given we
list that already.

2 years agodevtmpfs is a primary API fs
Lennart Poettering [Mon, 15 Nov 2021 13:09:09 +0000 (14:09 +0100)] 
devtmpfs is a primary API fs

2 years agoanalyze: don't list filesystems among ungrouped that are aliases
Lennart Poettering [Mon, 15 Nov 2021 13:05:31 +0000 (14:05 +0100)] 
analyze: don't list filesystems among ungrouped that are aliases

There are a bunch of filesystems that actually are just aliases for
other filesystems. So far we listed them as "ungrouped", suggesting they
should be added to some file system group. But that's not really
something needed, since they are after all not file systems in their own
right, but aliases only (and usually legacy at that).

hence, let's hide them from display (but debug log about them)

2 years agohomed: replace home-grown fs magic translation with fs_type_to_string()
Lennart Poettering [Mon, 15 Nov 2021 10:25:34 +0000 (11:25 +0100)] 
homed: replace home-grown fs magic translation with fs_type_to_string()

2 years agofilesystems: add three more file system types
Lennart Poettering [Mon, 15 Nov 2021 10:24:14 +0000 (11:24 +0100)] 
filesystems: add three more file system types

devtmpfs and cpuset are not actual filesystems of their own. cpuset used
to be but is now an alias for cgroupsfs. devtmpfs is the same as tmpfs
as its just a "named superblock", i.e. a specific instance of tmpfs, but
not a file system of its own.

2 years agoanalyze: show fs magic info in 'systemd-analyze filesystem'
Lennart Poettering [Mon, 15 Nov 2021 10:23:26 +0000 (11:23 +0100)] 
analyze: show fs magic info in 'systemd-analyze filesystem'

Let's show this information, since its quite useful. Moreover it allows
us to highlight file system aliases.

2 years agofilesystems: add internal APIs to convert fs magic to name
Lennart Poettering [Mon, 15 Nov 2021 10:22:43 +0000 (11:22 +0100)] 
filesystems: add internal APIs to convert fs magic to name

We previously had tooling for the opposite direction, let's complete the
work.

2 years agomountpoint-util: sort list of read-only fs again
Lennart Poettering [Fri, 12 Nov 2021 22:30:38 +0000 (23:30 +0100)] 
mountpoint-util: sort list of read-only fs again

2 years agofilesystems: add group for "application" file system
Lennart Poettering [Fri, 12 Nov 2021 22:30:59 +0000 (23:30 +0100)] 
filesystems: add group for "application" file system

This group shall cover file systems whose job is to make stuff that
isn't actually storing anything in itself, and isn't just an API file
system, but allows exposing stuff with special semantics in the VFS.

2 years agofilesystems: add binfmt_misc to auxiliary API VFS group
Lennart Poettering [Fri, 12 Nov 2021 22:31:03 +0000 (23:31 +0100)] 
filesystems: add binfmt_misc to auxiliary API VFS group

2 years agofilesystems: add ceph to network file systems group
Lennart Poettering [Fri, 12 Nov 2021 22:27:59 +0000 (23:27 +0100)] 
filesystems: add ceph to network file systems group

2 years agofilesystems: slightly update common block device groups
Lennart Poettering [Fri, 12 Nov 2021 22:09:45 +0000 (23:09 +0100)] 
filesystems: slightly update common block device groups

2 years agofilesystems: add two new filesystem groups
Lennart Poettering [Fri, 12 Nov 2021 22:08:25 +0000 (23:08 +0100)] 
filesystems: add two new filesystem groups

1. @anonymous → for file systems that aren't real file systems but
   simply the backing for sockets, pipes and other "anonymous" fds.

2. @security → for the various MAC security file systems.

2 years agotest-json: add test that makes sure floats are somewhat reasonably implemented 21377/head
Lennart Poettering [Mon, 15 Nov 2021 21:21:51 +0000 (22:21 +0100)] 
test-json: add test that makes sure floats are somewhat reasonably implemented

Test that we don't loose accuracy without bounds for extreme values, and
validate that nan/inf/-inf actually get converted to null properly.

2 years agomeson: drop -ffast-math
Lennart Poettering [Mon, 15 Nov 2021 16:55:59 +0000 (17:55 +0100)] 
meson: drop -ffast-math

After reading https://simonbyrne.github.io/notes/fastmath/ I think we
should drop -ffast-math. The JSON code actually looks for NaN, so the
fact it becomes unreliable kinda sucks.

Moreover, we don't do any number crunching. We use floating point fields
only sporadical for trivial math. Hence the optimization is entirely
unnecessary.

2 years agoci: pin mkosi to SHAs as well
Evgeny Vereshchagin [Mon, 15 Nov 2021 02:56:35 +0000 (02:56 +0000)] 
ci: pin mkosi to SHAs as well

2 years agobuild(deps): bump github/super-linter from 4.8.1 to 4.8.3
dependabot[bot] [Mon, 15 Nov 2021 17:34:21 +0000 (17:34 +0000)] 
build(deps): bump github/super-linter from 4.8.1 to 4.8.3

Bumps [github/super-linter](https://github.com/github/super-linter) from 4.8.1 to 4.8.3.
- [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/fd9c4286d3de3fdd9258a395570cae287f13f974...7d5dc989c55aaba9d3b7194a7496cdfaa4866af3)

---
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>
2 years agonetwork: make IgnoreCarrierLoss= also take timespan 21344/head
Yu Watanabe [Sat, 13 Nov 2021 01:50:03 +0000 (10:50 +0900)] 
network: make IgnoreCarrierLoss= also take timespan

Fixes #18738 and #20887.

Replaces #18746.

2 years agohomework: rework how we disassemble a home dir in home_deactivate()
Lennart Poettering [Fri, 29 Oct 2021 07:44:31 +0000 (09:44 +0200)] 
homework: rework how we disassemble a home dir in home_deactivate()

Let's first move the home dir to a new mount point that is only visible
in our own private namespace. Then, do FITRIM and stuff there, so that
we know the regular userspace can't interfere with that, and we know
that the home fs is not used anymore.

(This will become even more important once we add auto-grow/auto-shrink
for home dirs)

2 years agonetwork: Add SuppressInterfaceGroup= into routing policy 21235/head
Slava Bacherikov [Thu, 4 Nov 2021 16:54:49 +0000 (18:54 +0200)] 
network: Add SuppressInterfaceGroup= into routing policy

This adds SuppressInterfaceGroup= option in the [RoutingPolicyRule] section
which has the same semantics as suppress_ifgroup in `ip rule` command.

2 years agonetwork: change link group type to int32
Slava Bacherikov [Sat, 13 Nov 2021 12:43:04 +0000 (14:43 +0200)] 
network: change link group type to int32

Both linux kernel kernel and iproute2 uses int32 type for a link group
attribute and -1 has a special meaning, so setting it to 4294967295
would make it -1 in the linux kernel (and ip link cmd).

2 years agoMerge pull request #21277 from yuwata/permanent-hw-addr
Luca Boccassi [Mon, 15 Nov 2021 10:57:30 +0000 (10:57 +0000)] 
Merge pull request #21277 from yuwata/permanent-hw-addr

network, udev: several improvement of permanent hardware address handling

2 years agohwdb: Add Kensington Expert Mouse Wireless Trackball
Taiki Sugawara [Sun, 14 Nov 2021 07:49:14 +0000 (16:49 +0900)] 
hwdb: Add Kensington Expert Mouse Wireless Trackball

2 years agoresolve: do not clear DNS servers or friends on link which is not managed by networkd
Yu Watanabe [Sun, 14 Nov 2021 06:46:47 +0000 (15:46 +0900)] 
resolve: do not clear DNS servers or friends on link which is not managed by networkd

When networkd detects an unmanaged link, then the state is changed in
the following order:
pending -> initialized -> unmanaged

The "initialized" state was added by bd08ce56156751d58584a44e766ef61340cdae2d.

2 years agoMerge pull request #21359 from yuwata/network-split-route
Yu Watanabe [Sun, 14 Nov 2021 23:17:07 +0000 (08:17 +0900)] 
Merge pull request #21359 from yuwata/network-split-route

network: log route or nexthop flags

2 years agoMerge pull request #21346 from yuwata/network-token-prefixstable
Yu Watanabe [Sun, 14 Nov 2021 23:16:48 +0000 (08:16 +0900)] 
Merge pull request #21346 from yuwata/network-token-prefixstable

network: extend Token=prefixstable setting

2 years agoMerge pull request #21366 from evverx/ci-follow-ups-3
Evgeny Vereshchagin [Sun, 14 Nov 2021 21:02:21 +0000 (00:02 +0300)] 
Merge pull request #21366 from evverx/ci-follow-ups-3

ci: LGPLv2+ify dependapot config and codeql action and tighten codeql and labeler even more

2 years agoci: tighten codeql and labeler even more 21366/head
Evgeny Vereshchagin [Sun, 14 Nov 2021 09:41:42 +0000 (09:41 +0000)] 
ci: tighten codeql and labeler even more

by moving the read permissions to the top level and
granting additional permissions to the specific jobs.
It should help to prevent new jobs that could be added
there eventually from having write access to resources they
most likely would never need.

2 years agoci: pin the codeql action to SHAs
Evgeny Vereshchagin [Sat, 13 Nov 2021 21:22:09 +0000 (21:22 +0000)] 
ci: pin the codeql action to SHAs

It's a follow-up to https://github.com/systemd/systemd/pull/21316.

Judging by https://github.com/evverx/systemd/pull/36, Dependabot
supports their release cycle

2 years agoci: mimic the "restricted" mode
Evgeny Vereshchagin [Sat, 13 Nov 2021 22:34:04 +0000 (22:34 +0000)] 
ci: mimic the "restricted" mode

Judging by https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token
it should be enough to grant the "read contents" permission to
most of our actions. The "read metadata" permission is set impliciclty
somewhere and can't be set via the "permissions" setting:
```
The workflow is not valid. .github/workflows/linter.yml (Line: 14, Col: 3): Unexpected value 'metadata'
```

2 years agoci: LGPLv2+ify dependapot config and codeql action
Evgeny Vereshchagin [Sun, 14 Nov 2021 09:37:54 +0000 (09:37 +0000)] 
ci: LGPLv2+ify dependapot config and codeql action

2 years agonetwork: include route or nexthop flags in the debug logs 21359/head
Yu Watanabe [Sun, 14 Nov 2021 05:40:41 +0000 (14:40 +0900)] 
network: include route or nexthop flags in the debug logs

2 years agonetwork: introduce route_flags_to_string_alloc()
Yu Watanabe [Fri, 12 Nov 2021 05:29:12 +0000 (14:29 +0900)] 
network: introduce route_flags_to_string_alloc()

2 years agonetwork: split networkd-route.[ch]
Yu Watanabe [Thu, 11 Nov 2021 04:16:46 +0000 (13:16 +0900)] 
network: split networkd-route.[ch]

2 years agoMerge pull request #21355 from bluca/coverity
Yu Watanabe [Sun, 14 Nov 2021 05:18:08 +0000 (14:18 +0900)] 
Merge pull request #21355 from bluca/coverity

Coverity and CodeQL fixes

2 years agomeson: drop mode setting on systemd-update-helper
Zbigniew Jędrzejewski-Szmek [Sat, 13 Nov 2021 16:28:38 +0000 (17:28 +0100)] 
meson: drop mode setting on systemd-update-helper

With a6d1760024d0884efb343e1c739f303619f7c8b9, this shouldn't be
necessary anymore.

2 years agomeson: Use fs module
Jan Janssen [Sat, 13 Nov 2021 16:01:16 +0000 (17:01 +0100)] 
meson: Use fs module

Turns out that meson provides a fs module since 0.53.0, making it unnecessary
to call out to test.

2 years agoseccomp: move mprotect to @default
Zbigniew Jędrzejewski-Szmek [Sat, 13 Nov 2021 15:08:25 +0000 (16:08 +0100)] 
seccomp: move mprotect to @default

With glibc-2.34.9000-17.fc36.x86_64, dynamically programs newly fail in early
init with a restrictive syscall filter that does not include @system-service.
I think this is caused by 2dd87703d4386f2776c5b5f375a494c91d7f9fe4:

Author: Florian Weimer <fweimer@redhat.com>
Date:   Mon May 10 10:31:41 2021 +0200

    nptl: Move changing of stack permissions into ld.so

    All the stack lists are now in _rtld_global, so it is possible
    to change stack permissions directly from there, instead of
    calling into libpthread to do the change.

It seems that this call will now be very widely used, so let's just move it to
default to avoid too many failures.

2 years agotest-network: add testcases for Token=prefixstable with UUID 21346/head
Yu Watanabe [Sat, 13 Nov 2021 06:52:03 +0000 (15:52 +0900)] 
test-network: add testcases for Token=prefixstable with UUID

2 years agonetwork: make Token=prefixstable optionally take secret key
Yu Watanabe [Sat, 13 Nov 2021 04:13:48 +0000 (13:13 +0900)] 
network: make Token=prefixstable optionally take secret key

Closes #21345.

2 years agonetwork: do not recall link_handle_bound_by_list() or so when the interface is reconf...
Yu Watanabe [Sun, 14 Nov 2021 02:51:58 +0000 (11:51 +0900)] 
network: do not recall link_handle_bound_by_list() or so when the interface is reconfigured

2 years agoevent-util: introduce event_reset_time_relative()
Yu Watanabe [Sat, 13 Nov 2021 01:33:08 +0000 (10:33 +0900)] 
event-util: introduce event_reset_time_relative()

2 years agoman: fix indentation
Yu Watanabe [Sat, 13 Nov 2021 06:29:26 +0000 (15:29 +0900)] 
man: fix indentation

Also use variablelist tag for listing Token= options.

2 years agotest-strxcpyx: check result of snprintf 21355/head
Luca Boccassi [Sun, 14 Nov 2021 01:28:42 +0000 (01:28 +0000)] 
test-strxcpyx: check result of snprintf

2 years agoci: tighten several GHActions a bit more
Evgeny Vereshchagin [Sat, 13 Nov 2021 14:40:20 +0000 (14:40 +0000)] 
ci: tighten several GHActions a bit more

with https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#permissions

2 years agosd-event: one more assert when turning off an event source
Luca Boccassi [Sat, 13 Nov 2021 19:11:28 +0000 (19:11 +0000)] 
sd-event: one more assert when turning off an event source

CID#1465866

2 years agojournal-remote: more handling of sd_event_source_set_enabled failures
Luca Boccassi [Sat, 13 Nov 2021 19:07:59 +0000 (19:07 +0000)] 
journal-remote: more handling of sd_event_source_set_enabled failures

But avoid clobbering the return value if it works

CID#1465793
CID#1465794

2 years agoMerge pull request #21341 from yuwata/network-route-flags
Luca Boccassi [Sat, 13 Nov 2021 18:43:50 +0000 (18:43 +0000)] 
Merge pull request #21341 from yuwata/network-route-flags

network: manage route and nexthop flags

2 years agobuild(deps): bump actions/checkout from 2 to 2.4.0
dependabot[bot] [Sat, 13 Nov 2021 09:36:24 +0000 (09:36 +0000)] 
build(deps): bump actions/checkout from 2 to 2.4.0

Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 2.4.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...ec3a7ce113134d7a93b817d10a8272cb61118579)

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

Signed-off-by: dependabot[bot] <support@github.com>
2 years agoMerge pull request #21342 from evverx/dependabot-error
Frantisek Sumsal [Sat, 13 Nov 2021 09:35:51 +0000 (09:35 +0000)] 
Merge pull request #21342 from evverx/dependabot-error

ci: try to fix a Dependabot error

2 years agoMerge pull request #21337 from poettering/uid-alloc-range-split
Lennart Poettering [Sat, 13 Nov 2021 07:13:44 +0000 (08:13 +0100)] 
Merge pull request #21337 from poettering/uid-alloc-range-split

split out UID allocation range stuff from user-record.c/h (i.e. login.defs parsing)

2 years agotest: rename test-user-record → test-uid-alloc-range 21337/head
Lennart Poettering [Fri, 12 Nov 2021 18:36:40 +0000 (19:36 +0100)] 
test: rename test-user-record → test-uid-alloc-range

It doesn't actually test any of the JSON stuff, hence name it
test-uid-alloc-range, since it tests the stuff from uid-alloc-range.

2 years agouid-alloc-range: maintain only a single default alloc range structure
Lennart Poettering [Fri, 12 Nov 2021 17:57:14 +0000 (18:57 +0100)] 
uid-alloc-range: maintain only a single default alloc range structure

Either way we need these four values, let's simplify the code by keeping
only one const struct of this around.

2 years agoshared: split out UID allocation range stuff from user-record.h
Lennart Poettering [Fri, 12 Nov 2021 17:50:44 +0000 (18:50 +0100)] 
shared: split out UID allocation range stuff from user-record.h

user-record.[ch] are about the UserRecord JSON stuff, and the UID
allocation range stuff (i.e. login.defs handling) is a very different
thing, and complex enough on its own, let's give it its own c/h files.

No code changes, just some splitting out of code.

2 years agohomework: sync dir after moving file in, not before
Lennart Poettering [Thu, 4 Nov 2021 22:29:12 +0000 (23:29 +0100)] 
homework: sync dir after moving file in, not before

2 years agoMerge pull request #21333 from poettering/homed-report-fs-and-access-mode
Lennart Poettering [Sat, 13 Nov 2021 07:04:33 +0000 (08:04 +0100)] 
Merge pull request #21333 from poettering/homed-report-fs-and-access-mode

homed: report actual home dir access mode and fs type in effect

2 years agoMerge pull request #21331 from poettering/luks-extra-mount-options
Lennart Poettering [Sat, 13 Nov 2021 07:03:55 +0000 (08:03 +0100)] 
Merge pull request #21331 from poettering/luks-extra-mount-options

homed: allow per-user additional LUKS mount options

2 years agotest: Create convenience macros to declare tests
Jan Janssen [Fri, 12 Nov 2021 09:54:44 +0000 (10:54 +0100)] 
test: Create convenience macros to declare tests

2 years agoci: run the unit_tests and mkosi jobs on stable branches as well
Frantisek Sumsal [Fri, 12 Nov 2021 16:37:15 +0000 (17:37 +0100)] 
ci: run the unit_tests and mkosi jobs on stable branches as well

To provide more coverage for the systemd-stable repo.

See: https://github.com/systemd/systemd-stable/issues/24

2 years agoudev/net: read hardware address from netlink message 21277/head
Yu Watanabe [Thu, 4 Nov 2021 17:29:34 +0000 (02:29 +0900)] 
udev/net: read hardware address from netlink message

2 years agonetworkctl: read permanent hardware address from netlink message
Yu Watanabe [Thu, 4 Nov 2021 17:31:36 +0000 (02:31 +0900)] 
networkctl: read permanent hardware address from netlink message

2 years agonetwork: also logs iftype, kind, and permanent hardware address
Yu Watanabe [Sun, 7 Nov 2021 03:18:08 +0000 (12:18 +0900)] 
network: also logs iftype, kind, and permanent hardware address

2 years agonetwork: read permanent hardware address from netlink message
Yu Watanabe [Thu, 4 Nov 2021 17:18:01 +0000 (02:18 +0900)] 
network: read permanent hardware address from netlink message

The attribute was introduced by f74877a5457d34d604dba6dbbb13c4c05bac8b93 (v5.6),
so, fallback to ethtool if failed.

2 years agoethtool-util: introduce ethtool_get_permanent_hw_addr()
Yu Watanabe [Thu, 4 Nov 2021 17:13:37 +0000 (02:13 +0900)] 
ethtool-util: introduce ethtool_get_permanent_hw_addr()

And replaces all ethtool_get_permanent_macaddr() with it.

2 years agonetworkctl: introduce dump_hw_address()
Yu Watanabe [Fri, 12 Nov 2021 23:45:28 +0000 (08:45 +0900)] 
networkctl: introduce dump_hw_address()