]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
4 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

4 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()

4 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

4 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)

4 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

4 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

4 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

4 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.

4 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.

4 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

4 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>
4 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.

4 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)

4 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.

4 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).

4 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

4 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

4 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.

4 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

4 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

4 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

4 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.

4 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

4 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'
```

4 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

4 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

4 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()

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

4 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

4 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.

4 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.

4 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.

4 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

4 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.

4 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

4 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()

4 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.

4 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

4 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

4 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

4 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

4 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

4 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>
4 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

4 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)

4 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.

4 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.

4 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.

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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

4 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.

4 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.

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

4 years agohomework: split out password cache logic into its own .c/.h file
Lennart Poettering [Tue, 2 Nov 2021 22:03:17 +0000 (23:03 +0100)] 
homework: split out password cache logic into its own .c/.h file

Preparation for extending it further down the line.

4 years agonetwork: manage route and nexthop flags 21341/head
Yu Watanabe [Fri, 12 Nov 2021 06:26:06 +0000 (15:26 +0900)] 
network: manage route and nexthop flags

4 years agonetwork: mention that errors will be ignored
Yu Watanabe [Fri, 12 Nov 2021 05:35:32 +0000 (14:35 +0900)] 
network: mention that errors will be ignored

4 years agosd-netlink: introduce sd_rtnl_message_nexthop_get_flags()
Yu Watanabe [Fri, 12 Nov 2021 06:18:01 +0000 (15:18 +0900)] 
sd-netlink: introduce sd_rtnl_message_nexthop_get_flags()

4 years agosd-netlink: clear previous flags or state by _set_flags() or _set_state()
Yu Watanabe [Fri, 12 Nov 2021 06:16:31 +0000 (15:16 +0900)] 
sd-netlink: clear previous flags or state by _set_flags() or _set_state()

Otherwise, there is no way to reset the previous value.

4 years agoMerge pull request #21329 from poettering/homed-compress-default
Lennart Poettering [Fri, 12 Nov 2021 21:55:14 +0000 (22:55 +0100)] 
Merge pull request #21329 from poettering/homed-compress-default

homed: default to btrfs compression

4 years agoupdate TODO 21333/head
Lennart Poettering [Fri, 12 Nov 2021 17:03:45 +0000 (18:03 +0100)] 
update TODO

4 years agodoc: document the two new accessMode/fileSystemType fields
Lennart Poettering [Fri, 12 Nov 2021 17:04:03 +0000 (18:04 +0100)] 
doc: document the two new accessMode/fileSystemType fields

4 years agohomed: include actual fs type + access mode as part of "status" section of user record
Lennart Poettering [Fri, 5 Nov 2021 15:34:12 +0000 (16:34 +0100)] 
homed: include actual fs type + access mode as part of "status" section of user record

So far we have two properties for the intended fstype + access mode of
home dirs, but they might differ from what is actually used (because the
user record changed from the home dir, after it was created, or vice
versa). Let's hence add these props also to the "status" section of user
record, which report the status quo. That way we can always show the
correct, current settings.

4 years agohomed: allow querying disk free status separetely from generating JSON from it
Lennart Poettering [Sat, 30 Oct 2021 16:05:52 +0000 (18:05 +0200)] 
homed: allow querying disk free status separetely from generating JSON from it

We later want to query per-home free status for implementing automatic
grow/shrink of home directories, hence let's separate the JSON
generation from the disk free status determination.

4 years agodoc: document the new luksExtraMountOptions concept 21331/head
Lennart Poettering [Fri, 12 Nov 2021 16:48:50 +0000 (17:48 +0100)] 
doc: document the new luksExtraMountOptions concept

4 years agohomectl: make new LUKS extra mount option field settable
Lennart Poettering [Fri, 5 Nov 2021 14:41:59 +0000 (15:41 +0100)] 
homectl: make new LUKS extra mount option field settable

4 years agohomework: also add a way to configure additional mount options via a JSON user record...
Lennart Poettering [Fri, 5 Nov 2021 14:27:56 +0000 (15:27 +0100)] 
homework: also add a way to configure additional mount options via a JSON user record field

Fixes: #15120
4 years agoman: run ninja -C build update-man-rules
Lennart Poettering [Fri, 12 Nov 2021 21:21:22 +0000 (22:21 +0100)] 
man: run ninja -C build update-man-rules

4 years agohomework: add a const where appropriate
Lennart Poettering [Thu, 4 Nov 2021 21:13:55 +0000 (22:13 +0100)] 
homework: add a const where appropriate

4 years agokeyring-util: add new keyring-util.h helpers
Lennart Poettering [Tue, 2 Nov 2021 17:20:12 +0000 (18:20 +0100)] 
keyring-util: add new keyring-util.h helpers

This adds to new helpers: keyring_read() for reading a key data from a
keyring entry, and TAKE_KEY_SERIAL which is what TAKE_FD is for fds, but
for key_serial_t.

The former is immediately used by ask-password-api.c

4 years agoMerge pull request #21294 from keszybz/binfmt-misc
Lennart Poettering [Fri, 12 Nov 2021 21:14:12 +0000 (22:14 +0100)] 
Merge pull request #21294 from keszybz/binfmt-misc

Improve systemd-binfmt logging, fix exit value

4 years agohomework: turn off compression for files backing LUKS volumes
Lennart Poettering [Thu, 4 Nov 2021 20:58:22 +0000 (21:58 +0100)] 
homework: turn off compression for files backing LUKS volumes

We need random access read/write files, and compression sucks for that,
hence disable it on the underlying files.

Compression in the home directory might be desirable, but if so it
should be done *inside* the home dir fs, not on the underlying fs.

4 years agotree-wide: don't ignore return code from sd_event_source_set_enabled()
Luca Boccassi [Wed, 10 Nov 2021 23:18:06 +0000 (23:18 +0000)] 
tree-wide: don't ignore return code from sd_event_source_set_enabled()

CID#1465793
CID#1465794
CID#1465795

4 years agoMerge pull request #21320 from poettering/namespace-mkdir-umask
Lennart Poettering [Fri, 12 Nov 2021 21:12:58 +0000 (22:12 +0100)] 
Merge pull request #21320 from poettering/namespace-mkdir-umask

make pid1 namespace code independent of umask

4 years agoMerge pull request #21316 from evverx/pin-labeler
Frantisek Sumsal [Fri, 12 Nov 2021 20:51:26 +0000 (20:51 +0000)] 
Merge pull request #21316 from evverx/pin-labeler

ci: pin labeler

4 years agodocs: document new mount option env var 21329/head
Lennart Poettering [Fri, 12 Nov 2021 16:36:53 +0000 (17:36 +0100)] 
docs: document new mount option env var

4 years agohomed: add env var for overriding default mount options
Lennart Poettering [Fri, 5 Nov 2021 14:26:29 +0000 (15:26 +0100)] 
homed: add env var for overriding default mount options

This adds an esay way to override the default mount options to use for
LUKS home dirs via the env vars SYSTEMD_HOME_MOUNT_OPTIONS_EXT4,
SYSTEMD_HOME_MOUNT_OPTIONS_BTRFS, SYSTEMD_HOME_MOUNT_OPTIONS_XFS.

See: #15120

4 years agohomework: default to btrfs compression
Lennart Poettering [Fri, 5 Nov 2021 14:24:58 +0000 (15:24 +0100)] 
homework: default to btrfs compression

This follows what Fedora did with 34: enables compression by default,
lowering IO bandwidth and reducing disk space use, at the price of
slightly higher CPU use.

https://fedoraproject.org/wiki/Changes/BtrfsTransparentCompression

4 years agobinfmt: add logging information 21294/head
Zbigniew Jędrzejewski-Szmek [Wed, 10 Nov 2021 14:44:06 +0000 (15:44 +0100)] 
binfmt: add logging information

In delete_rule(), we already checked that the rule name is a valid file name
(i.e. no slashes), so we can just trivially append.

Also, let's always reject rules that we would later fail to delete. It's
probably better to avoid such confusion.

And print the operations we do with file name and line number. I hope this
helps with cases like https://github.com/systemd/systemd/pull/21178. At least
we'll know what rule failed.

$ sudo SYSTEMD_LOG_LEVEL=debug build/systemd-binfmt
Flushed all binfmt_misc rules.
Applying /etc/binfmt.d/kshcomp.conf…
/etc/binfmt.d/kshcomp.conf:1: binary format 'kshcomp' registered.

4 years agoexecute: always log a warning when setting SELinux context fails
Topi Miettinen [Thu, 11 Nov 2021 22:33:01 +0000 (00:33 +0200)] 
execute: always log a warning when setting SELinux context fails

Update also manual page to explain how the transition can still fail.

4 years agoMerge pull request #21321 from yuwata/ether-addr-fix-local
Zbigniew Jędrzejewski-Szmek [Fri, 12 Nov 2021 16:12:46 +0000 (17:12 +0100)] 
Merge pull request #21321 from yuwata/ether-addr-fix-local

ether-addr-util: fix ether_addr_is_local()

4 years agoci: run codeql-analysis daily
Evgeny Vereshchagin [Wed, 10 Nov 2021 23:02:05 +0000 (23:02 +0000)] 
ci: run codeql-analysis daily

https://github.com/github/codeql-action

Apparently to judge from a couple of warnings I haven't seen
before it's a bit different from LGTM.

4 years agoChange gendered terms to be gender-neutral (#21325)
Emily Gonyer [Fri, 12 Nov 2021 15:09:56 +0000 (10:09 -0500)] 
Change gendered terms to be gender-neutral (#21325)

Some typos are also fixed.

4 years agotests: add test case for UMask=+BindPaths= combination 21320/head
Lennart Poettering [Fri, 12 Nov 2021 12:41:59 +0000 (13:41 +0100)] 
tests: add test case for UMask=+BindPaths= combination

Inspired by the test case described in #19899

4 years agonamespace: make tmp dir handling code independent of umask too
Lennart Poettering [Fri, 12 Nov 2021 10:16:02 +0000 (11:16 +0100)] 
namespace: make tmp dir handling code independent of umask too

Let's make all code in namespace.c robust towards weird umask. This
doesn't matter too much given that the parent dirs we deal here almost
certainly exist anyway, but let's clean this up anyway and make it fully
clean.

4 years agonamespace: make whole namespace_setup() work regardless of configured umask
Lennart Poettering [Fri, 12 Nov 2021 10:11:27 +0000 (11:11 +0100)] 
namespace: make whole namespace_setup() work regardless of configured umask

Let's reset the umask during the whole namespace_setup() logic, so that
all our mkdir() + mknod() are not subjected to whatever umask might
currently be set.

This mostly moves the umask save/restore logic out of
mount_private_dev() and into the stack frame of namespace_setup() that
is further out.

Fixes #19899

4 years agonamespace: rebreak a few comments
Lennart Poettering [Fri, 12 Nov 2021 10:09:40 +0000 (11:09 +0100)] 
namespace: rebreak a few comments

4 years agoumask-util: add helper that resets umask until end of current code block
Lennart Poettering [Fri, 12 Nov 2021 10:06:46 +0000 (11:06 +0100)] 
umask-util: add helper that resets umask until end of current code block

4 years agopid1: add a manager_trigger_run_queue() helper
Lennart Poettering [Fri, 12 Nov 2021 08:43:07 +0000 (09:43 +0100)] 
pid1: add a manager_trigger_run_queue() helper

We have two different places where we re-trigger the run queue now.
let's unify it under a common function, that is part of the Manager
code.

Follow-up for #20953

4 years agotest: add tests for MAC address helper functions 21321/head
Yu Watanabe [Fri, 12 Nov 2021 10:56:14 +0000 (19:56 +0900)] 
test: add tests for MAC address helper functions

4 years agoether-addr-util: fix ether_addr_is_local() and add one more helper
Yu Watanabe [Fri, 12 Nov 2021 10:55:43 +0000 (19:55 +0900)] 
ether-addr-util: fix ether_addr_is_local() and add one more helper

Follow-up for 1f86a3fe52c71af7f46381bf45c2efe580a19dcc.

4 years agoMerge pull request #20953 from msekletar/mount-ratelimit-followup-20329
Lennart Poettering [Fri, 12 Nov 2021 08:23:47 +0000 (09:23 +0100)] 
Merge pull request #20953 from msekletar/mount-ratelimit-followup-20329

Delay running mount start jobs when we /p/s/mountinfo event source is rate limited

4 years agotest: add regression test for systemd-run --scope [--user]
Jonas Witschel [Thu, 11 Nov 2021 21:25:40 +0000 (22:25 +0100)] 
test: add regression test for systemd-run --scope [--user]

systemd-run --scope --user failed to run in system 249.6, cf. #21297. Add tests
for systemd-run --scope and systemd-run --scope --user to make sure this does
not regress again.

4 years agomacro-fundamental: fix bool → sd_bool
Lennart Poettering [Thu, 11 Nov 2021 21:02:56 +0000 (22:02 +0100)] 
macro-fundamental: fix bool → sd_bool

4 years agoMerge pull request #21285 from poettering/boot-os-rel-fix
Luca Boccassi [Thu, 11 Nov 2021 20:23:17 +0000 (20:23 +0000)] 
Merge pull request #21285 from poettering/boot-os-rel-fix

sd-boot/bootspec: os-release parsing fixes