Commit Graph

72488 Commits

Author SHA1 Message Date
Luca Boccassi
d0ea800943 Merge pull request #32195 from yuwata/network-ndisc-mtu
network: several cleanups for IPv6 MTU
2024-04-10 23:12:21 +01:00
Luca Boccassi
bf5e509840 Merge pull request #32166 from yuwata/network-rfc7217-dad
network: generate another address on conflict
2024-04-10 22:59:01 +01:00
Yu Watanabe
8e91738fe9 libsystemd-network: do not trigger assertion by sd_*_is_running() with NULL
If systemd is built with developer mode, previously they trigger
hard assertions. Even built with release mode, we should not log about
that. Let's silently accept NULL and return false.

Prompted by https://github.com/systemd/systemd/pull/32166#issuecomment-2044710151.
2024-04-10 22:53:55 +01:00
Luca Boccassi
6dfaa0edaf Merge pull request #32204 from DaanDeMeyer/post-rewrite
git: Add post-rewrite hook that invokes git submodule update
2024-04-10 22:52:45 +01:00
Luca Boccassi
af60f679a3 Merge pull request #32205 from YHNdnzj/bless-boot
Minor cleanup for bless-boot
2024-04-10 22:52:11 +01:00
Mike Yuan
40611863e4 units/systemd-boot-check-no-failures.service: drop unneeded dep on shutdown.target 2024-04-10 23:40:53 +08:00
Mike Yuan
6f801feb4b bless-boot-generator: use generator_add_symlink 2024-04-10 23:40:53 +08:00
Mike Yuan
8b317c3400 core: use FOREACH_ARRAY at 3 more places 2024-04-10 23:40:53 +08:00
Ivan Kruglov
5152b8459a ASSERT_NULL/ASSERT_NOT_NULL 2024-04-10 16:57:30 +02:00
Frantisek Sumsal
0ab87ebd97 Merge pull request #32201 from aafeijoo-suse/test-minor-fixes
test: minor fixes
2024-04-10 16:54:37 +02:00
Daan De Meyer
f1e9e8041c git: Add post-rewrite hook that invokes git submodule update
git rebase does not support a --recurse-submodules switch to automatically
check out the submodules at their registered commits during or after a rebase.

Instead, let's use the post-rewrite git hook to do this ourselves.
2024-04-10 14:39:49 +02:00
Daan De Meyer
8bc9232636 Update submodules 2024-04-10 14:36:59 +02:00
Pablo Méndez Hernández
ffd0cca34a man/journald: Add missing configuration files
The man page was missing:

-  `/run/systemd/journald.conf`
-  `/usr/lib/systemd/journald.conf`

as valid configuration files.

Fixes: https://github.com/systemd/systemd/issues/32199
2024-04-10 20:15:17 +08:00
Antonio Alvarez Feijoo
2ad44c22fe tools/check-version-history: skip test if lxml is not installed
```
================================= 1070/1408 ==================================
test:         systemd:dist / check-version-history
start time:   07:55:05
duration:     0.03s
result:       exit status 1
...
----------------------------------- stderr -----------------------------------
Traceback (most recent call last):
  File "/mnt/work/systemd/upstream-fork/main/tools/check-version-history.py", line 6, in <module>
    import lxml.etree as tree
ModuleNotFoundError: No module named 'lxml'
==============================================================================
```

Follow-up for 3691e7fce7
2024-04-10 11:10:02 +02:00
Antonio Alvarez Feijoo
866a469e5a test: add missing header to test.h
```
../src/shared/tests.h:361:28: error: implicit declaration of function ‘fork’ [-Werror=implicit-function-declaration]
  361 |                 int _pid = fork();                                                                              \
      |                            ^~~~
../src/test/test-macro.c:1114:9: note: in expansion of macro ‘ASSERT_SIGNAL’
 1114 |         ASSERT_SIGNAL(ASSERT_OK(-1), SIGABRT);
      |         ^~~~~~~~~~~~~
../src/shared/tests.h:369:25: error: implicit declaration of function ‘_exit’ [-Werror=implicit-function-declaration]
  369 |                         _exit(EXIT_SUCCESS);                                                                    \
      |                         ^~~~~
../src/test/test-macro.c:1114:9: note: in expansion of macro ‘ASSERT_SIGNAL’
 1114 |         ASSERT_SIGNAL(ASSERT_OK(-1), SIGABRT);
      |         ^~~~~~~~~~~~~
../src/shared/tests.h:369:25: warning: incompatible implicit declaration of built-in function ‘_exit’ [-Wbuiltin-declaration-mismatch]
  369 |                         _exit(EXIT_SUCCESS);                                                                    \
      |                         ^~~~~
../src/test/test-macro.c:1114:9: note: in expansion of macro ‘ASSERT_SIGNAL’
 1114 |         ASSERT_SIGNAL(ASSERT_OK(-1), SIGABRT);
      |         ^~~~~~~~~~~~~
../src/shared/tests.h:369:25: warning: incompatible implicit declaration of built-in function ‘_exit’ [-Wbuiltin-declaration-mismatch]
  369 |                         _exit(EXIT_SUCCESS);                                                                    \
      |                         ^~~~~
../src/test/test-macro.c:1115:9: note: in expansion of macro ‘ASSERT_SIGNAL’
 1115 |         ASSERT_SIGNAL(ASSERT_OK(-ENOANO), SIGABRT);
      |         ^~~~~~~~~~~~~
../src/test/test-macro.c:1119:21: error: implicit declaration of function ‘getpid’; did you mean ‘getpt’? [-Werror=implicit-function-declaration]
 1119 |         ASSERT_TRUE(getpid());
      |                     ^~~~~~
```

Follow-up for #32189
2024-04-10 11:09:52 +02:00
Lennart Poettering
5538b62f59 secure-boot: tighten enrollment logic a bit regarding file sizes
It's OK the dbx file is not loaded, but let's explicitly check for that
(i.e. if the buffer is actually non-NULL), rather than the size of the
bufer, since empty files actually do exist.

Or in other words, let's not magically suppress enrollment of empty
files, but let uefi firmware handle these on their own.

Follow-up for: 57ea8012d6
2024-04-10 16:59:37 +09:00
Lennart Poettering
6fea0f0ba0 boot: re-align table
We like our tables aligned.

(Also suppres the final two fields, which are all zeroes anyway, to
declutter a bit)
2024-04-10 16:59:37 +09:00
Lennart Poettering
3ee27b2580 resolved: dns_name_equal() can fail, handle that reasonably
Ignoring errors can be OK sometimes, but we should make this explicit.
2024-04-10 16:58:34 +09:00
Yu Watanabe
cd226becd8 Merge pull request #32189 from mrc0mmand/test-tweaks
Another batch of assorted test tweaks
2024-04-10 16:57:00 +09:00
Yu Watanabe
f8e15d6d98 Merge pull request #32191 from yuwata/network-persistent-storage-follow-ups
network: follow-ups for persistent storage
2024-04-10 16:54:39 +09:00
Lennart Poettering
475107f014 ndisc: use memzero() where appropriate 2024-04-10 16:54:20 +09:00
Lennart Poettering
e1771c8ee6 sd-journal: make sure sd_journal_add_match() also accepts SIZE_MAX as size
In many of our internal functions that take a pointer + a size we have
introduced the rule that SIZE_MAX as size means: take strlen().

sd_journal_add_match() has something similar, but the special value is
0, not SIZE_MAX. This is a bit ugly, since a zero size data block is
theoretically fine. The only reason sd_journal_add_match() gets away
with using this special value is because valid matches must consist of
at least 2 chars, hence cannot be zero.

But let's make this more robust and less surprising when compared to the
rest of our code, and *also* accept SIZE_MAX to mean strlen().

No actual code changes, just some clean-up.
2024-04-10 16:54:03 +09:00
Daan De Meyer
7072777163 core: Serialize both pid and pidfd
If we try to deserialize only a pidfd that points to a process that
has been reaped, creating the pidref object will fail, which means that
we'll try to create a pidref object from the serialized pid that comes
next. If the pid has already been reused, this will succeed and we'll
now have a pidref that points to a different process.

Let's avoid this issue by serializing both the pidfd and the pid and
creating the pidref object directly from both. This means we'll reuse
the deserialized pidfd instead of opening a new one. We'll then immediately
notice the pidfd is dead and do the appropriate follow up depending on
the unit type.
2024-04-10 09:32:04 +02:00
Yu Watanabe
a0430b0d95 test-network: add test case for ndisc MTU option 2024-04-10 12:24:33 +09:00
Yu Watanabe
8c9ef90b19 network/ndisc: set IPv6 MTU through sysctl
Closes #31496.
2024-04-10 12:22:43 +09:00