]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
2 years agotest-network: add more basic tests for network json formats 21568/head
Yu Watanabe [Mon, 29 Nov 2021 23:12:28 +0000 (08:12 +0900)] 
test-network: add more basic tests for network json formats

2 years agonetwork: json: add missing initialization
Yu Watanabe [Tue, 30 Nov 2021 01:03:05 +0000 (10:03 +0900)] 
network: json: add missing initialization

Fixes CID#1466513.

2 years agojson: make JSON_BUILD_PAIR_IN_ADDR_NON_NULL or friends handle NULL gracefully
Yu Watanabe [Mon, 29 Nov 2021 23:04:54 +0000 (08:04 +0900)] 
json: make JSON_BUILD_PAIR_IN_ADDR_NON_NULL or friends handle NULL gracefully

Fixes #21567.

2 years agosystemctl: display how long a systemd service will run (#21494)
Amir Omidi [Tue, 30 Nov 2021 00:24:18 +0000 (19:24 -0500)] 
systemctl: display how long a systemd service will run (#21494)

2 years agoMerge pull request #21532 from yuwata/network-json-more
Zbigniew Jędrzejewski-Szmek [Mon, 29 Nov 2021 20:26:56 +0000 (21:26 +0100)] 
Merge pull request #21532 from yuwata/network-json-more

network: add more json entries

2 years agoMerge pull request #21541 from bluca/analyze_security_profile
Zbigniew Jędrzejewski-Szmek [Mon, 29 Nov 2021 20:23:34 +0000 (21:23 +0100)] 
Merge pull request #21541 from bluca/analyze_security_profile

analyze: add --profile switch to security verb

2 years agosd-boot: Fix assert failure in random-seed.c
Jan Janssen [Mon, 29 Nov 2021 14:42:26 +0000 (15:42 +0100)] 
sd-boot: Fix assert failure in random-seed.c

Fixes: #21556
2 years agounit: add jobs that were skipped because of ratelimit back to run_queue
Michal Sekletar [Thu, 25 Nov 2021 17:28:25 +0000 (18:28 +0100)] 
unit: add jobs that were skipped because of ratelimit back to run_queue

Assumption in edc027b was that job we first skipped because of active
ratelimit is still in run_queue. Hence we trigger the queue and dispatch
it in the next iteration. Actually we remove jobs from run_queue in
job_run_and_invalidate() before we call unit_start(). Hence if we want
to attempt to run the job again in the future we need to add it back
to run_queue.

Fixes #21458

2 years agoByte order to host before using the lifetime
Nacho Barrientos [Mon, 29 Nov 2021 13:17:55 +0000 (14:17 +0100)] 
Byte order to host before using the lifetime

I've seen this in `NetworkManager-1.34.0-0.3.el8.x86_64` (latest in CentOS
Stream 8 at the time of writing this message) which does not use the latest
Systemd but probably the code base is the same (see
https://github.com/NetworkManager/NetworkManager/commit/51f93e00a23fbd09f5ad96da6290bf4ca737d46a).

Before the patch:

```
libsystemd: eth0: DHCPv6 client: T1 expires in 34y 3w 6d 45min 31s
libsystemd: eth0: DHCPv6 client: T2 expires in 54y 5month 3w 3d 23h 20min 35s
```

After the patch:

```
libsystemd: eth0: DHCPv6 client: T1 expires in 3d 7h 58min 3s
libsystemd: eth0: DHCPv6 client: T2 expires in 5d 2h 26min 50s
```

same box (x86_64 system) and same DHCPv6 server.

This regression has likely been introduced by 8a8955507af363c31297bbc5df79852db4ad39d6.

2 years agoAdd missing greater than/less than tab on some HP
Marco Scardovi [Mon, 29 Nov 2021 08:53:56 +0000 (09:53 +0100)] 
Add missing greater than/less than tab on some HP

Some HP keyboards (like https://h30434.www3.hp.com/t5/image/serverpage/image-id/203235i01AD626584587DA1?v=v2) have <> between AltGr and left arrow. This add the fix and make it working again

2 years agoMerge pull request #21534 from yuwata/udev-accept-longer-hw-address
Zbigniew Jędrzejewski-Szmek [Mon, 29 Nov 2021 13:00:52 +0000 (14:00 +0100)] 
Merge pull request #21534 from yuwata/udev-accept-longer-hw-address

udev/net: accept longer HW address

2 years agoMerge pull request #21531 from keszybz/log2-tables
Zbigniew Jędrzejewski-Szmek [Mon, 29 Nov 2021 12:58:49 +0000 (13:58 +0100)] 
Merge pull request #21531 from keszybz/log2-tables

Optimize log2 tables

2 years agoMerge pull request #21537 from medhefgo/boot-sbat
Zbigniew Jędrzejewski-Szmek [Mon, 29 Nov 2021 10:30:25 +0000 (11:30 +0100)] 
Merge pull request #21537 from medhefgo/boot-sbat

meson: Default to sbat-distro=auto

2 years agocoredump: fix parsing metadata without access to executable
Luca Boccassi [Fri, 26 Nov 2021 02:13:57 +0000 (02:13 +0000)] 
coredump: fix parsing metadata without access to executable

This was broken in a subtle way: we'd get an ELF ref, but not the right one,
so no metadata note would be found.
Change the parsing function to return 1 when it finds something, so that
we can return early only when that happens.

2 years agomeson: upgrade warning about bad init values to an error 21531/head
Zbigniew Jędrzejewski-Szmek [Fri, 26 Nov 2021 10:52:04 +0000 (11:52 +0100)] 
meson: upgrade warning about bad init values to an error

We never expect to get this warning, it is most likely to occur if
somebody messes up enumeration values.

2 years agonetworkd: replace a table with log2 fields by a list
Zbigniew Jędrzejewski-Szmek [Fri, 26 Nov 2021 11:05:18 +0000 (12:05 +0100)] 
networkd: replace a table with log2 fields by a list

2 years agonetworkd: align table
Zbigniew Jędrzejewski-Szmek [Fri, 26 Nov 2021 11:03:44 +0000 (12:03 +0100)] 
networkd: align table

2 years agonetworkd: replace a table with log2 fields by a list
Zbigniew Jędrzejewski-Szmek [Fri, 26 Nov 2021 11:03:12 +0000 (12:03 +0100)] 
networkd: replace a table with log2 fields by a list

2 years agonetworkd: replace a table with log2 fields by a list
Zbigniew Jędrzejewski-Szmek [Fri, 26 Nov 2021 10:59:53 +0000 (11:59 +0100)] 
networkd: replace a table with log2 fields by a list

2 years agonetworkd: replace a table with log2 fields by a list
Zbigniew Jędrzejewski-Szmek [Fri, 26 Nov 2021 10:51:12 +0000 (11:51 +0100)] 
networkd: replace a table with log2 fields by a list

The code looks a bit more complicated, but the compiler generates a simpler and
more compact text.

An additional advantage is that if any of the fields were repeating or not
power-of-two, the compiler would warn about an overridden entry in the table.

2 years agobasic/util: add macro variants of log2 functions
Zbigniew Jędrzejewski-Szmek [Fri, 26 Nov 2021 10:46:54 +0000 (11:46 +0100)] 
basic/util: add macro variants of log2 functions

The macro variants can be used in static initializers.

The same guard against calling __builtin_clz(0) is added as for
__builtin_clzll(0), since that's undefined behaviour too. Our code
wouldn't call it, but this avoids a potential pitfall with the macro.
All variants map 0→0. Otherwise we'd often have to handle 0 specially
in callers.

__builtin_clz takes unsigned as the argument, so there's no LOG2I macro.

2 years agopam_systemd: Check also abstract socket for X11
Topi Miettinen [Fri, 26 Nov 2021 14:34:48 +0000 (16:34 +0200)] 
pam_systemd: Check also abstract socket for X11

It seems that `pam_systemd` was the only thing left that wanted to use sockets
in file system path `/tmp/.X11-unix/X*`. X11 apps actually prefer using the
abstract socket version.

This allows running Xserver with `-nolisten tcp -nolisten unix`, which makes
the server only listen to an abstract socket.

Also in my setup, Xserver is running as a separate system service instead of
starting from display manager service, and now `PrivateTmp=yes` can be used for
both. The file system of the display manager service is inherited by user apps
and now their `/tmp` will be separate from `/tmp` of PID1 namespace as well as
`/tmp` of Xserver.

2 years agomeson: Rename compile_args to efi_cfalgs 21537/head
Jan Janssen [Fri, 26 Nov 2021 13:13:56 +0000 (14:13 +0100)] 
meson: Rename compile_args to efi_cfalgs

compile_args sounds like it could be used for other targets besides
efi binaries. This also keeps the name in line with efi_ldflags.

2 years agomeson: Default to sbat-distro=auto
Jan Janssen [Fri, 26 Nov 2021 13:00:02 +0000 (14:00 +0100)] 
meson: Default to sbat-distro=auto

Any recent shim will refuse starting an image that does not have an sbat section
and will do so with a generic "Security Violation" message. And it is very easy
to forget passing -Dsbat-distro=auto to meson when creating a fresh build dir.

Adding sbat info when shim is not used or secure boot is disabled does not hurt
anyone, so default to auto. This still ensures to not add auto-detected info in
case we are cross building.

2 years agoMerge pull request #21549 from yuwata/network-netdev-mac-address-none
Luca Boccassi [Sun, 28 Nov 2021 12:36:35 +0000 (12:36 +0000)] 
Merge pull request #21549 from yuwata/network-netdev-mac-address-none

network: netdev: make MACAddress= take 'none'

2 years agonetwork/netdev: generate persistent MAC address for batadv and bridge 21549/head
Yu Watanabe [Mon, 8 Nov 2021 02:36:09 +0000 (11:36 +0900)] 
network/netdev: generate persistent MAC address for batadv and bridge

This mostly reverts 489f01f806f865eabb55458c98182b06a6c53a62 and
deb2cfa4c6885d448eb1f17e5ef1b139106b7e86.

As now MACAddress=none is supported. So, users can still disable MAC
address assignment.

2 years agonetwork/netdev: make MACAddress= take 'none' to suppress generating persistent hardwa...
Yu Watanabe [Sun, 28 Nov 2021 02:51:08 +0000 (11:51 +0900)] 
network/netdev: make MACAddress= take 'none' to suppress generating persistent hardware address

This is mostly equivalent to .link file's MACAddressPolicy=none.

2 years agonetwork/netdev: move config_parse_netdev_kind() at the end
Yu Watanabe [Sun, 28 Nov 2021 02:23:42 +0000 (11:23 +0900)] 
network/netdev: move config_parse_netdev_kind() at the end

2 years agonamespace: allow ProcSubset=pid with some ProtectKernel options
Topi Miettinen [Sat, 27 Nov 2021 10:51:39 +0000 (12:51 +0200)] 
namespace: allow ProcSubset=pid with some ProtectKernel options

In case `/proc` is successfully mounted with pid tree subset only due to
`ProcSubset=pid`, the protective mounts for `ProtectKernelTunables=yes` and
`ProtectKernelLogs=yes` to non-pid `/proc` paths are failing because the paths
don't exist. But the pid only option may have failed gracefully (for example
because of ancient kernel), so let's try the mounts but it's not fatal if they
don't succeed.

2 years agoMerge pull request #21535 from yuwata/network-netdev-verify-mac
Luca Boccassi [Sat, 27 Nov 2021 13:48:56 +0000 (13:48 +0000)] 
Merge pull request #21535 from yuwata/network-netdev-verify-mac

network/netdev: verify MAC address

2 years agonetwork: route: route->link may be NULL
Yu Watanabe [Sat, 27 Nov 2021 12:01:27 +0000 (21:01 +0900)] 
network: route: route->link may be NULL

Fixes #21544.

2 years agodocs: fix descriptions in discoverable partitions
Alyssa Ross [Sat, 27 Nov 2021 12:10:38 +0000 (12:10 +0000)] 
docs: fix descriptions in discoverable partitions

00db9a114e ("docs: generate table from header using a script") got the
descriptions for the partition types mixed up.  After that change, the
spec claimed, for example, that the /usr partition should contain
"dm-verity integrity hash data for the matching root partition", and
that the /usr verity partition should be of type "Any native, optionally
in LUKS".  This made the spec an extremely confusing read before I
figured out what must have happened!

I've gone through the table as it existed prior to 00db9a114e, and moved
the descriptions around in the script that generates the table until
they matched up with what they used to be.  Then I regenerated the
table from the fixed script.

2 years agoMerge pull request #21533 from yuwata/network-trivial-follow-ups
Yu Watanabe [Fri, 26 Nov 2021 21:42:19 +0000 (06:42 +0900)] 
Merge pull request #21533 from yuwata/network-trivial-follow-ups

network: trivial follow-ups

2 years agoMerge pull request #21530 from keszybz/strv-cleanup
Yu Watanabe [Fri, 26 Nov 2021 21:41:56 +0000 (06:41 +0900)] 
Merge pull request #21530 from keszybz/strv-cleanup

Modernize style and drop strv_free_free

2 years agonetwork/netdev: verify specified MAC address 21535/head
Yu Watanabe [Mon, 8 Nov 2021 03:41:47 +0000 (12:41 +0900)] 
network/netdev: verify specified MAC address

Drop multicast bit and set local bit of the specified MAC address.

This also makes failure in generating persistent MAC address
non-critical.

2 years agonetwork/netdev: use "struct hw_addr_data" to store MAC address
Yu Watanabe [Sun, 7 Nov 2021 02:23:14 +0000 (11:23 +0900)] 
network/netdev: use "struct hw_addr_data" to store MAC address

2 years agonetwork/netdev: introduce .iftype to netdev vtable
Yu Watanabe [Sun, 7 Nov 2021 07:27:33 +0000 (16:27 +0900)] 
network/netdev: introduce .iftype to netdev vtable

And disable .generate_mac flag for non-ether interfaces.

2 years agonetwork: veth: use SYNTHETIC_ERRNO() macro or use real error cause
Yu Watanabe [Thu, 25 Nov 2021 11:59:48 +0000 (20:59 +0900)] 
network: veth: use SYNTHETIC_ERRNO() macro or use real error cause

2 years agoanalyze: add --profile switch to security verb 21541/head
Luca Boccassi [Fri, 26 Nov 2021 15:46:40 +0000 (15:46 +0000)] 
analyze: add --profile switch to security verb

Allows to pass a portable profile when doing offline analysis of
units. Especially useful for analyzing portable images, since a
lot of the security-relevant settings in those cases come from
the profiles, but they are not shipped in the portable images.

2 years agotest: create a dummy LSan suppression file in the minimal image
Frantisek Sumsal [Fri, 26 Nov 2021 15:21:51 +0000 (16:21 +0100)] 
test: create a dummy LSan suppression file in the minimal image

otherwise gcc's ASan complains (unlike clang's) when the image is used -
e.g. in TEST-29 or TEST-50.

```
[   17.328705] testsuite-29.sh[361]: + portablectl --profile=trusted attach --now --runtime /usr/share/minimal_0.raw app0
...
[   20.978649] systemd[1]: Starting app0-foo.service...
[   21.104844] kernel: loop0: detected capacity change from 0 to 24960
[   20.999559] systemd[1]: Starting app0.service...
[   21.126022] kernel: loop1: detected capacity change from 0 to 24960
...
[   21.861087] cat[422]: AddressSanitizer: failed to read suppressions file '/systemd-lsan.supp'
[   21.868634] cat[421]: AddressSanitizer: failed to read suppressions file '/systemd-lsan.supp'
[   21.877941] systemd[1]: app0.service: Control process exited, code=exited, status=1/FAILURE
[   21.878836] systemd[1]: app0.service: Failed with result 'exit-code'.
[   21.905712] systemd[1]: Failed to start app0.service.
```

Follow-up to f201f3447796a5424372d32b338bc3b907516c28.

2 years agoshell-completion: add offline/root/image to systemd-analyze
Luca Boccassi [Fri, 26 Nov 2021 18:07:37 +0000 (18:07 +0000)] 
shell-completion: add offline/root/image to systemd-analyze

2 years agoportable: move profile search helper to path-lookup
Luca Boccassi [Fri, 26 Nov 2021 17:50:34 +0000 (17:50 +0000)] 
portable: move profile search helper to path-lookup

Will be used in systemd-analyze later

2 years agobasic/util: rename u64log2 to log2u64
Zbigniew Jędrzejewski-Szmek [Fri, 26 Nov 2021 10:40:17 +0000 (11:40 +0100)] 
basic/util: rename u64log2 to log2u64

u64log2 was strangely named. We even have log2i and log2u right below
in that file.

2 years agoupdate TODO
Lennart Poettering [Fri, 26 Nov 2021 14:18:59 +0000 (15:18 +0100)] 
update TODO

2 years agobasic/strv: drop strv_free_free 21530/head
Zbigniew Jędrzejewski-Szmek [Fri, 26 Nov 2021 09:02:44 +0000 (10:02 +0100)] 
basic/strv: drop strv_free_free

I think the function name is confusing: we generally say "free_free" when
both keys and values are freed in a hash map, but here the type is an
array of strvs, so the name should be something like strv_array_free.

The function is unused since 143fadf369a18449464956206226761e49be1928 (2018),
let's just drop it.

2 years agobasic/strv: inline variables and modernize style a bit
Zbigniew Jędrzejewski-Szmek [Fri, 26 Nov 2021 08:47:44 +0000 (09:47 +0100)] 
basic/strv: inline variables and modernize style a bit

2 years agoupdate TODO
Lennart Poettering [Fri, 26 Nov 2021 13:49:19 +0000 (14:49 +0100)] 
update TODO

2 years agoNEWS: start with an entry for v250
Lennart Poettering [Fri, 26 Nov 2021 08:06:23 +0000 (09:06 +0100)] 
NEWS: start with an entry for v250

2 years agoudev/net: make MACAddress= takes hardware address for infiniband 21534/head
Yu Watanabe [Sat, 6 Nov 2021 01:58:31 +0000 (10:58 +0900)] 
udev/net: make MACAddress= takes hardware address for infiniband

2 years agoudev/net: introduce "struct Link" to store link attributes
Yu Watanabe [Fri, 5 Nov 2021 01:13:56 +0000 (10:13 +0900)] 
udev/net: introduce "struct Link" to store link attributes

2 years agoudev/net: rename variables
Yu Watanabe [Fri, 5 Nov 2021 00:06:05 +0000 (09:06 +0900)] 
udev/net: rename variables

2 years agonetwork: update comment 21533/head
Yu Watanabe [Fri, 26 Nov 2021 12:01:30 +0000 (21:01 +0900)] 
network: update comment

Addresses https://github.com/systemd/systemd/pull/21517#discussion_r757096584.

2 years agonetif-util: update log message
Yu Watanabe [Fri, 26 Nov 2021 12:00:18 +0000 (21:00 +0900)] 
netif-util: update log message

Follow-up for 37593b7c488f7b957936500158f200af16534c6b.

2 years agoMerge pull request #21529 from keszybz/test-journal-flush-no-crash
Zbigniew Jędrzejewski-Szmek [Fri, 26 Nov 2021 11:28:44 +0000 (12:28 +0100)] 
Merge pull request #21529 from keszybz/test-journal-flush-no-crash

Fix crash in test-journal-flush in CI

2 years agotest: make test-55-oomd less flaky
Anita Zhang [Wed, 24 Nov 2021 09:02:22 +0000 (01:02 -0800)] 
test: make test-55-oomd less flaky

Make oomctl a bit less likely to race with systemd-oomd receiving the
managed oom cgroup info by checking oomctl output in a loop with
timeout.

Fixes #21146

2 years agoMerge pull request #21501 from medhefgo/test
Zbigniew Jędrzejewski-Szmek [Fri, 26 Nov 2021 11:23:18 +0000 (12:23 +0100)] 
Merge pull request #21501 from medhefgo/test

test: Use TEST macro

2 years agonetwork: json: append DNS misc settings 21532/head
Yu Watanabe [Fri, 26 Nov 2021 10:57:51 +0000 (19:57 +0900)] 
network: json: append DNS misc settings

2 years agonetwork: json: append DNSSEC negative trust anchors
Yu Watanabe [Fri, 26 Nov 2021 10:44:22 +0000 (19:44 +0900)] 
network: json: append DNSSEC negative trust anchors

2 years agonetwork: json: append domains
Yu Watanabe [Fri, 26 Nov 2021 08:34:56 +0000 (17:34 +0900)] 
network: json: append domains

2 years agonetwork: make both search_domains and route_domains allocated on DBus call
Yu Watanabe [Fri, 26 Nov 2021 08:03:11 +0000 (17:03 +0900)] 
network: make both search_domains and route_domains allocated on DBus call

2 years agonetwork: json: append SIP server information
Yu Watanabe [Fri, 26 Nov 2021 07:43:38 +0000 (16:43 +0900)] 
network: json: append SIP server information

2 years agonetwork: json: append NTP server information
Yu Watanabe [Fri, 26 Nov 2021 07:22:12 +0000 (16:22 +0900)] 
network: json: append NTP server information

2 years agonetwork: json: append DNS server information
Yu Watanabe [Thu, 25 Nov 2021 17:12:08 +0000 (02:12 +0900)] 
network: json: append DNS server information

2 years agonetwork: introduce NETWORK_CONFIG_SOURCE_RUNTIME
Yu Watanabe [Thu, 25 Nov 2021 16:49:50 +0000 (01:49 +0900)] 
network: introduce NETWORK_CONFIG_SOURCE_RUNTIME

2 years agodhcp6: make sd_dhcp6_lease_get_dns() and friends accepts NULL
Yu Watanabe [Thu, 25 Nov 2021 16:12:14 +0000 (01:12 +0900)] 
dhcp6: make sd_dhcp6_lease_get_dns() and friends accepts NULL

2 years agodhcp: make sd_dhcp_lease_get_servers() accepts NULL
Yu Watanabe [Thu, 25 Nov 2021 16:08:53 +0000 (01:08 +0900)] 
dhcp: make sd_dhcp_lease_get_servers() accepts NULL

2 years agonetwork: json: add several entries for wait-online
Yu Watanabe [Thu, 25 Nov 2021 15:56:34 +0000 (00:56 +0900)] 
network: json: add several entries for wait-online

2 years agoMerge pull request #21360 from yuwata/network-json
Zbigniew Jędrzejewski-Szmek [Fri, 26 Nov 2021 10:04:52 +0000 (11:04 +0100)] 
Merge pull request #21360 from yuwata/network-json

network: json: add more information

2 years agotest-journal-flush: do not croak on corrupted input files 21529/head
Zbigniew Jędrzejewski-Szmek [Fri, 26 Nov 2021 08:46:02 +0000 (09:46 +0100)] 
test-journal-flush: do not croak on corrupted input files

We would fail if the input file was corrupted:
build/test-journal-flush ./system@0005b7dac334f805-0021aca076ae5c5e.journal\~
journal_file_copy_entry failed: Bad message
Assertion 'r >= 0' failed at src/libsystemd/sd-journal/test-journal-flush.c:55, function main(). Aborting.
[1]    619472 IOT instruction (core dumped)  build/test-journal-flush ./system@0005b7dac334f805-0021aca076ae5c5e.journal\~

Let's skip some "reasonable" errors.

Fixes #17963.

2 years agotest-journal-flush: allow testing against specific files
Zbigniew Jędrzejewski-Szmek [Fri, 26 Nov 2021 08:40:51 +0000 (09:40 +0100)] 
test-journal-flush: allow testing against specific files

>=0 → ==0 because sd_journal_open* are documented to return 0.

2 years agommap-cache: embed MMapCache.contexts[]
Vito Caputo [Thu, 25 Nov 2021 18:39:34 +0000 (10:39 -0800)] 
mmap-cache: embed MMapCache.contexts[]

Code simplification; no idea why the Context structs were being
heap-allocated piecemeal.  There aren't many and they're small,
and made even smaller with this commit.

This also gets rid of the Context.cache backreference by just
accompanying the Context* with MMapCache* to the few private
Context* operations, resolving the context ID to a Context* at
the single public entrypoint: mmap_cache_fd_get(), which asserts
on the value being within bounds.  The Context.id member and
checks are also removed, as there's far less opportunity for
these things to become inconsistent now.

Of course this drops all context_{add,free}() related code,
making for a tasty diffstat.

2 years agojournal: Deduplicate entry items before they are stored in the entry object
Daan De Meyer [Fri, 12 Nov 2021 14:32:40 +0000 (14:32 +0000)] 
journal: Deduplicate entry items before they are stored in the entry object

If the iovec contains the same data more than once, we'll end up with
duplicate offsets in the items array. Let's make sure we remove any
duplicates before we store the items in an entry object.

2 years agoMerge pull request #21253 from poettering/homed-auto-grow-shrink
Luca Boccassi [Thu, 25 Nov 2021 22:14:17 +0000 (22:14 +0000)] 
Merge pull request #21253 from poettering/homed-auto-grow-shrink

homed: automatic grow/shrink of LUKS home dirs

2 years agommap-cache: LIST_REMOVE() *after* w->unused_prev
Vito Caputo [Thu, 25 Nov 2021 15:05:06 +0000 (07:05 -0800)] 
mmap-cache: LIST_REMOVE() *after* w->unused_prev

The LIST_REMOVE() macro always assigns NULL to w->unused_prev,
meaning every time this window was in last_unused, the remainder
of the unused list was lost to the ether.

Turns out there's been a memory leak in journald after all, this
code has been there since at least 2013...

2 years agoMerge pull request #21522 from yuwata/home-fix-memleak
Zbigniew Jędrzejewski-Szmek [Thu, 25 Nov 2021 19:22:23 +0000 (20:22 +0100)] 
Merge pull request #21522 from yuwata/home-fix-memleak

home: fix memleak

2 years agoMerge pull request #21517 from yuwata/network-long-hw-addr
Zbigniew Jędrzejewski-Szmek [Thu, 25 Nov 2021 19:21:38 +0000 (20:21 +0100)] 
Merge pull request #21517 from yuwata/network-long-hw-addr

network: make MACAddress= can take longer address

2 years agonetwork,udev: make .network and .link file can match with hardware address longer...
Yu Watanabe [Thu, 4 Nov 2021 17:59:11 +0000 (02:59 +0900)] 
network,udev: make .network and .link file can match with hardware address longer or shorter than ETH_ALEN

2 years agoTry to fix exittype test flakyness
Henri Chain [Tue, 23 Nov 2021 15:47:18 +0000 (16:47 +0100)] 
Try to fix exittype test flakyness

The test was changed at @bluca 's request to avoid sleeps,
but the change insufficient to avoid all races.
The kill command is now run from the script itself to avoid using
ExecStartPost

2 years agojournal: Remove entry seqnum revert logic
Daan De Meyer [Fri, 12 Nov 2021 14:29:02 +0000 (14:29 +0000)] 
journal: Remove entry seqnum revert logic

This actually causes mismatches between the header tail entry seqnum
and the last entry seqnum since when we revert the header seqnum, we
don't remove the entry object we added. If adding the entry object
itself fails, we don't need to revert the seqnum since it's never
incremented so let's remove this logic alltogether.

2 years agoupdate TODO 21253/head
Lennart Poettering [Fri, 29 Oct 2021 07:56:22 +0000 (09:56 +0200)] 
update TODO

2 years agotest: add test case for homed rebalancing logic
Lennart Poettering [Thu, 25 Nov 2021 09:48:52 +0000 (10:48 +0100)] 
test: add test case for homed rebalancing logic

2 years agohomectl: add new "homectl rebalance" command
Lennart Poettering [Thu, 4 Nov 2021 16:38:13 +0000 (17:38 +0100)] 
homectl: add new "homectl rebalance" command

Let's add an explicit, synchronous command to request immediate rebalancing and
wait for it.

2 years agohomed: add explicit API for requesting rebalancing too
Lennart Poettering [Thu, 4 Nov 2021 15:32:05 +0000 (16:32 +0100)] 
homed: add explicit API for requesting rebalancing too

2 years agohomed: add automatic grow/shrink ("rebalancing")
Lennart Poettering [Tue, 2 Nov 2021 22:11:59 +0000 (23:11 +0100)] 
homed: add automatic grow/shrink ("rebalancing")

2 years agohomectl: expose new rebalanceWeight JSON use record field
Lennart Poettering [Thu, 4 Nov 2021 17:12:13 +0000 (18:12 +0100)] 
homectl: expose new rebalanceWeight JSON use record field

2 years agouser-record: add rebalanceWeight field
Lennart Poettering [Tue, 2 Nov 2021 22:09:31 +0000 (23:09 +0100)] 
user-record: add rebalanceWeight field

2 years agotest: don't provide password to deactivation
Lennart Poettering [Thu, 25 Nov 2021 09:58:50 +0000 (10:58 +0100)] 
test: don't provide password to deactivation

deactivation of home areas should work without any password being
supplied. Let's hence not supply it, to ensure things work correctly.

2 years agohomed: support LogControl1 D-Bus API too, and make use of it
Lennart Poettering [Thu, 25 Nov 2021 13:32:19 +0000 (14:32 +0100)] 
homed: support LogControl1 D-Bus API too, and make use of it

All our D-Bus services support the LogControl1 API, but homed didn't so
far. Fix that, and make use of it in the test case, to make debugging it
easier.

2 years agoMerge pull request #21487 from DaanDeMeyer/dissect-image-other-arch
Lennart Poettering [Thu, 25 Nov 2021 16:36:57 +0000 (17:36 +0100)] 
Merge pull request #21487 from DaanDeMeyer/dissect-image-other-arch

Allow dissect_image() to dissect images from architectures other than the native one

2 years agohomework: fix memleak 21522/head
Yu Watanabe [Thu, 25 Nov 2021 15:14:29 +0000 (00:14 +0900)] 
homework: fix memleak

Fixes #21521.

2 years agohomework: drop unnecessary initialization
Yu Watanabe [Thu, 25 Nov 2021 15:09:30 +0000 (00:09 +0900)] 
homework: drop unnecessary initialization

2 years agotest: Use TEST macro in more cases 21501/head
Jan Janssen [Wed, 24 Nov 2021 11:11:17 +0000 (12:11 +0100)] 
test: Use TEST macro in more cases

This converts to TEST macro in less trivial cases. This is mostly
due to having an intro or outro before/after the actual tests.

Some notable changes:
 - add a "test" to make sure the hashmap and ordered_hashmap tests
   from different compilation units are actually run in test-hashmap.c
 - make root arg a global var in test-install-root.c
 - slightly rework an EFI specific test in test-proc-cmdline.c
 - usage of saved_argv/saved_argc in test-process-util.c
 - splitting test-rlimit-util.c into several tests
 - moving the hwdb open check into intro in test-sd-hwdb.c
 - condense several "tests" into one in test-udev-util.c

2 years agotest: Use TEST macro
Jan Janssen [Wed, 24 Nov 2021 11:00:02 +0000 (12:00 +0100)] 
test: Use TEST macro

This converts to TEST macro where it is trivial.

Some additional notable changes:
 - simplify HAVE_LIBIDN #ifdef in test-dns-domain.c
 - use saved_argc/saved_argv in test-copy.c, test-path-util.c,
   test-tmpfiles.c and test-unit-file.c

2 years agotest-time-util: Properly restore TZ variable
Jan Janssen [Wed, 24 Nov 2021 17:45:16 +0000 (18:45 +0100)] 
test-time-util: Properly restore TZ variable

The test fails to call tzset() after unsetting TZ variable, which
could break other tests. Also, let's be nicer and actually restore
the TZ to its original value.

2 years agotest: Slightly rework DEFINE_TEST_MAIN macros
Jan Janssen [Tue, 23 Nov 2021 12:40:27 +0000 (13:40 +0100)] 
test: Slightly rework DEFINE_TEST_MAIN macros

- A lot of tests want a different log level
- Provides saved_argc/saved_argv to tests
- Separate intro/outro is more flexible

2 years agotest-network: add basic tests of json output 21360/head
Yu Watanabe [Tue, 16 Nov 2021 15:27:16 +0000 (00:27 +0900)] 
test-network: add basic tests of json output

2 years agonetwork: json: add more link information
Yu Watanabe [Sun, 14 Nov 2021 09:11:27 +0000 (18:11 +0900)] 
network: json: add more link information

2 years agonetwork: introduce link_flags_to_string_alloc() and kernel_operstate_to_string()
Yu Watanabe [Sun, 14 Nov 2021 09:36:42 +0000 (18:36 +0900)] 
network: introduce link_flags_to_string_alloc() and kernel_operstate_to_string()

2 years agonetwork: json: append routing policy rule information
Yu Watanabe [Sun, 14 Nov 2021 06:05:55 +0000 (15:05 +0900)] 
network: json: append routing policy rule information

2 years agonetwork: routing policy rule: introduce fr_act_type_full_to_string()
Yu Watanabe [Sun, 14 Nov 2021 08:36:33 +0000 (17:36 +0900)] 
network: routing policy rule: introduce fr_act_type_full_to_string()