Commit Graph
55464 Commits
Author SHA1 Message Date
Yu Watanabe 9f0cf80dd0 network/netdev: introduce .iftype to netdev vtable
And disable .generate_mac flag for non-ether interfaces.
2021-11-27 06:38:26 +09:00
Yu Watanabe a67e0507c3 network: veth: use SYNTHETIC_ERRNO() macro or use real error cause 2021-11-27 06:37:58 +09:00
Luca Boccassi 0446921131 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.
2021-11-26 18:17:26 +00:00
Frantisek Sumsal 72f9e485ce 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 f201f34477.
2021-11-26 18:15:51 +00:00
Luca Boccassi 83de7427dc shell-completion: add offline/root/image to systemd-analyze 2021-11-26 18:08:59 +00:00
Luca Boccassi 13c02e7bd5 portable: move profile search helper to path-lookup
Will be used in systemd-analyze later
2021-11-26 17:50:59 +00:00
Zbigniew Jędrzejewski-Szmek 58c34be864 basic/util: rename u64log2 to log2u64
u64log2 was strangely named. We even have log2i and log2u right below
in that file.
2021-11-26 15:29:06 +01:00
Lennart Poettering e6f48be8d4 update TODO 2021-11-26 15:18:59 +01:00
Zbigniew Jędrzejewski-Szmek 1ba193d73e 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 143fadf369 (2018),
let's just drop it.
2021-11-26 14:58:44 +01:00
Zbigniew Jędrzejewski-Szmek 14337c374a basic/strv: inline variables and modernize style a bit 2021-11-26 14:52:03 +01:00
Lennart Poettering f08e143c01 update TODO 2021-11-26 14:49:25 +01:00
Lennart Poettering 195d181ca4 NEWS: start with an entry for v250 2021-11-26 14:49:25 +01:00
Yu Watanabe 9e2b7763d3 udev/net: make MACAddress= takes hardware address for infiniband 2021-11-26 21:06:24 +09:00
Yu Watanabe 613701a4e8 udev/net: introduce "struct Link" to store link attributes 2021-11-26 21:06:24 +09:00
Yu Watanabe 418c02c3f1 udev/net: rename variables 2021-11-26 21:06:24 +09:00
Yu Watanabe 36edc2c956 network: update comment
Addresses https://github.com/systemd/systemd/pull/21517#discussion_r757096584.
2021-11-26 21:05:52 +09:00
Yu Watanabe 4bd2c4e8e0 netif-util: update log message
Follow-up for 37593b7c48.
2021-11-26 21:05:52 +09:00
Zbigniew Jędrzejewski-Szmek baef2ca347 Merge pull request #21529 from keszybz/test-journal-flush-no-crash
Fix crash in test-journal-flush in CI
2021-11-26 12:28:44 +01:00
Anita Zhang ddc57d0a83 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
2021-11-26 12:27:30 +01:00
Zbigniew Jędrzejewski-Szmek 993eeea0ef Merge pull request #21501 from medhefgo/test
test: Use TEST macro
2021-11-26 12:23:18 +01:00
Yu Watanabe b707e43d33 network: json: append DNS misc settings 2021-11-26 20:20:06 +09:00
Yu Watanabe 46c31852f1 network: json: append DNSSEC negative trust anchors 2021-11-26 20:20:06 +09:00
Yu Watanabe de045939ad network: json: append domains 2021-11-26 20:20:06 +09:00
Yu Watanabe 1f65aa3a58 network: make both search_domains and route_domains allocated on DBus call 2021-11-26 20:20:06 +09:00
Yu Watanabe 0843ec6c44 network: json: append SIP server information 2021-11-26 20:20:06 +09:00
Yu Watanabe dfd0a5f127 network: json: append NTP server information 2021-11-26 20:20:06 +09:00
Yu Watanabe 2ab60af29d network: json: append DNS server information 2021-11-26 20:20:06 +09:00
Yu Watanabe 2e62139a21 network: introduce NETWORK_CONFIG_SOURCE_RUNTIME 2021-11-26 20:20:06 +09:00
Yu Watanabe 5656ff9dd1 dhcp6: make sd_dhcp6_lease_get_dns() and friends accepts NULL 2021-11-26 20:20:05 +09:00
Yu Watanabe ee5b48341e dhcp: make sd_dhcp_lease_get_servers() accepts NULL 2021-11-26 20:20:05 +09:00
Yu Watanabe 3b60ededae network: json: add several entries for wait-online 2021-11-26 20:20:00 +09:00
Zbigniew Jędrzejewski-Szmek 66a8eddd6d Merge pull request #21360 from yuwata/network-json
network: json: add more information
2021-11-26 11:04:52 +01:00
Zbigniew Jędrzejewski-Szmek b4046d5557 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.
2021-11-26 09:48:15 +01:00
Zbigniew Jędrzejewski-Szmek 0fa167cd58 test-journal-flush: allow testing against specific files
>=0 → ==0 because sd_journal_open* are documented to return 0.
2021-11-26 09:48:15 +01:00
Vito Caputo 7580b0d869 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.
2021-11-26 08:35:58 +09:00
Daan De Meyer 5ec9fbae64 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.
2021-11-25 23:38:09 +01:00
Luca Boccassi 485c9e19e7 Merge pull request #21253 from poettering/homed-auto-grow-shrink
homed: automatic grow/shrink of LUKS home dirs
2021-11-25 22:14:17 +00:00
Vito Caputo b82aca89a5 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...
2021-11-25 21:39:38 +01:00
Zbigniew Jędrzejewski-Szmek f1da1e7b5f Merge pull request #21522 from yuwata/home-fix-memleak
home: fix memleak
2021-11-25 20:22:23 +01:00
Zbigniew Jędrzejewski-Szmek 55a044dece Merge pull request #21517 from yuwata/network-long-hw-addr
network: make MACAddress= can take longer address
2021-11-25 20:21:38 +01:00
Yu Watanabe 5213507113 network,udev: make .network and .link file can match with hardware address longer or shorter than ETH_ALEN 2021-11-25 20:14:46 +01:00
Henri Chain 81e1590e2d 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
2021-11-25 20:12:59 +01:00
Daan De Meyer b41b682bd6 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.
2021-11-25 20:02:32 +01:00
Lennart Poettering 6d975fe7b3 update TODO 2021-11-25 18:28:44 +01:00
Lennart Poettering c313d04ab0 test: add test case for homed rebalancing logic 2021-11-25 18:28:44 +01:00
Lennart Poettering 6d6d4459ab homectl: add new "homectl rebalance" command
Let's add an explicit, synchronous command to request immediate rebalancing and
wait for it.
2021-11-25 18:28:44 +01:00
Lennart Poettering 4950591627 homed: add explicit API for requesting rebalancing too 2021-11-25 18:28:44 +01:00
Lennart Poettering d357b80d33 homed: add automatic grow/shrink ("rebalancing") 2021-11-25 18:28:44 +01:00
Lennart Poettering 21505c937c homectl: expose new rebalanceWeight JSON use record field 2021-11-25 18:28:44 +01:00
Lennart Poettering 9aa3e5ebdf user-record: add rebalanceWeight field 2021-11-25 18:28:44 +01:00