Commit Graph

68563 Commits

Author SHA1 Message Date
Iago López Galeiras
24832d10b6 core: allow using seccomp without no_new_privs when unprivileged
Until now, using any form of seccomp while being unprivileged (User=)
resulted in systemd enabling no_new_privs.

There's no need for doing this because:

* We trust the filters we apply
* If User= is set and a process wants to apply a new seccomp filter, it
will need to set no_new_privs itself

An example of application that might want seccomp + !no_new_privs is a
program that wants to run as an unprivileged user but uses file
capabilities to start a web server on a privileged port while
benefitting from a restrictive seccomp profile.

We now keep the privileges needed to do seccomp before calling
enforce_user() and drop them after the seccomp filters are applied.

If the syscall filter doesn't allow the needed syscalls to drop the
privileges, we keep the previous behavior by enabling no_new_privs.
2023-11-07 11:31:53 +01:00
Diego Viola
b3e199cec8 TODO: fix more typos 2023-11-07 10:49:58 +01:00
Diego Viola
3a9e659a0e TODO: fix typos 2023-11-07 17:26:31 +09:00
Mike Yuan
e592bf5d11 Merge pull request #29879 from Flowdalic/cgroup-memory-peak
cgroup: add support for memory.peak
2023-11-07 09:53:57 +08:00
Luca Boccassi
58a2ab5e9d Merge pull request #29888 from mrc0mmand/network-generator
test: add a couple of tests for systemd-network-generator
2023-11-07 00:10:43 +00:00
Daan De Meyer
04a8c2ce30 kernel-install: Add --root, --image and --image-policy
Currently only supported for the "inspect" verb as "add" and "remove"
require figuring out what to do with plugins.
2023-11-06 22:29:36 +01:00
Tad Fisher
4ca7c94e16 resolve: use exact-match domain as routing domain for single-labels
With ResolveUnicastSingleLabel=yes, a scope's search domains are affixed to the
query even when a routing domain matches the single-label query name,
preventing the use of dotless single-label domains entirely.

This changes dns_scope_name_wants_search_domain() to return false when the
scope contains an exact match of the single-label name in the query, allowing
lookups for dotless domains with ResolveUnicastSingleLabel enabled.
2023-11-06 22:27:12 +01:00
Luca Boccassi
4a5bf4896f Merge pull request #29882 from keszybz/documentation-cleanup
Documentation cleanup
2023-11-06 21:24:08 +00:00
Frantisek Sumsal
4457a2e0ee test: wait for the "latest" systemd-bsod message
Let's wait for the "latest" message systemd-bsod prints to the console
to appear, otherwise we might be too fast and take a console snapshot
before it contains all the information:

[   44.237788] testsuite-04.sh[1744]: + setterm --term linux --dump --file /tmp/console.dump
[   44.246089] systemd-bsod[1858]: QR code could not be printed, ignoring: Operation not supported
[   44.305692] testsuite-04.sh[1744]: + grep -aq 'The current boot has failed' /tmp/console.dump
[   44.308047] testsuite-04.sh[1744]: + grep -aq 'Service emergency message' /tmp/console.dump
[   44.311200] testsuite-04.sh[1744]: + grep -aq 'Press any key to exit' /tmp/console.dump
[   44.314359] testsuite-04.sh[1744]: + at_exit
[   44.315087] testsuite-04.sh[1744]: + local EC=1
[   44.315945] testsuite-04.sh[1744]: + [[ 1 -ne 0 ]]
[   44.316647] testsuite-04.sh[1744]: + [[ -e /tmp/console.dump ]]
[   44.318305] testsuite-04.sh[1744]: + cat /tmp/console.dump
[   44.319320] testsuite-04.sh[1871]:    The current boot has failed!
[   44.319970] testsuite-04.sh[1871]:    Service emergency message
2023-11-06 21:01:24 +00:00
Yu Watanabe
d377949085 test-network: test MultiPathRoute= via another interface
Prompted by https://github.com/systemd/systemd/pull/14194#issuecomment-1795489641.
2023-11-06 20:59:49 +00:00
Frantisek Sumsal
6bc5de53e8 test: add a couple of tests for systemd-network-generator
Only for ip= stuff, for now.
2023-11-06 21:38:14 +01:00
Luca Boccassi
8691613c68 Merge pull request #29894 from bluca/typo
udev/man typos
2023-11-06 20:29:16 +00:00
Zbigniew Jędrzejewski-Szmek
0155b0657d man/systemd-stub: split and simplify a wall'o'text paragraph 2023-11-06 20:16:34 +01:00
Zbigniew Jędrzejewski-Szmek
cae4ad367d man/networkctl,systemd-soft-reboot: capitalize and add periods
We added version information, so now each bullet point contains multiple
paragraphs, so we need proper sentences.
2023-11-06 20:16:34 +01:00
Zbigniew Jędrzejewski-Szmek
de6d05d78d man: "Documentation" is not part of the title
<ulinks> contents are used to generate a SEE ALSO section at the
bottom of a man page, so we need to include the title, without additional
words, in the content.
2023-11-06 20:16:34 +01:00
Zbigniew Jędrzejewski-Szmek
bf63dadbc6 man: more hyperlinks and other fixes
Closes https://github.com/systemd/systemd/issues/29814.
2023-11-06 20:16:34 +01:00
Zbigniew Jędrzejewski-Szmek
55e40b0be8 tree-wide: s/life-cycle/lifecycle/g 2023-11-06 20:16:34 +01:00
Zbigniew Jędrzejewski-Szmek
f04aac3d5a docs: fix title levels, remove unneded words
The title applies to the whole page, not just the first section.
And there should be just one title ('# foo') in a given document.
2023-11-06 20:16:34 +01:00
Zbigniew Jędrzejewski-Szmek
c8cd6d7bab man: use meaningful titles for <ulink>s
As pointed out in https://github.com/systemd/systemd/issues/29814, we need to
use phrases are are meaningful on their own, because the man page formatter
creates a list at the bottom. With <ulink>see docs</ulink>, we end up with:
  NOTES:
    1. see docs
       https://some.url/page
    2. see docs
       https://some.url/page2
which is not very useful :(

Also, the text inside the tag should not include punctuation.

Python helper:
  from xml_helper import xml_parse
  for p in glob.glob('../man/*.xml'):
       t = xml_parse(p)
       ulinks = t.iterfind('.//ulink')
       for ulink in ulinks:
           if ulink.text is None: continue
           text = ' '.join(ulink.text.split())
           print(f'{p}: {text}')
2023-11-06 20:16:34 +01:00
Daan De Meyer
e94f0af168 Revert "mkosi: Use cache and build subdirectories"
We're not going ahead with the corresponding change in mkosi
after all so revert the preparatory change in systemd as well.

This reverts commit f756bcdf17.
2023-11-06 20:10:34 +01:00
Luca Boccassi
93c2d8d5c4 test: fix build without SBAT_DISTRO
Follow-up for c9bebec872
2023-11-06 19:05:47 +00:00
Luca Boccassi
dfb4a66fd0 man: fix typo
allows to -> allows one to
2023-11-06 18:50:30 +00:00
Luca Boccassi
a6b8ecf304 udev: ressize -> result_size
Lintian flags it as a typo of 'resize', so rename it and make it clearer too
2023-11-06 18:48:25 +00:00
Florian Schmaus
324ec6b5d2 run: include peak memory in output
Fixes #28542.

Signed-off-by: Florian Schmaus <flo@geekplace.eu>
2023-11-06 18:10:06 +01:00
Florian Schmaus
0531bded79 core: include peak memory in unit_log_resources()
Signed-off-by: Florian Schmaus <flo@geekplace.eu>
2023-11-06 18:08:33 +01:00