summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #28053 from mrc0mmand/assorted-fixesLuca Boccassi2023-06-1622-31/+26
|\ | | | | A bunch of typo fixes and code cleanups
| * udev: use timestamp_is_set() in one more placeFrantisek Sumsal2023-06-151-1/+1
| |
| * audit-util,varlink: use IOVEC_MAKE() in a couple more placesFrantisek Sumsal2023-06-152-8/+3
| |
| * tree-wide: fix a couple of typosFrantisek Sumsal2023-06-1519-22/+22
| | | | | | | | As reported by Fossies.org.
* | find-esp: fix XBOOTLDR stx_dev_major=0 and not btrfs fixнаб2023-06-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original commit is fully correct in its analysis, description, and mechanics, but the patch changes an identical condition around line 500 (find_esp_and_warn()), instead of line 800 (find_xbootldr_and_warn()). The internal patch I distributed to testers was correct (L800), and neither the reviewers, nor me, caught that I wrote the wrong line for upstream submission. I've re-checked that this patch applied to systemd 252.11-1 fixes the issue. Keep the -ENOTTY condition for find_esp_and_warn(), since the conditions are clearly supposed to be the same and similar semantics apply. Fixes: commit ed89819f8fd7bfe99cd652082076e85e1417e4e9 ("find-esp: don't silently error bootctl install if presumed XBOOTLDR part is stx_dev_major=0 but not btrfs")
* | core: fix post-fork memory leakLuca Boccassi2023-06-161-1/+1
|/ | | | | | | Doesn't matter really, but it is caught by ASAN when things fail and there's no execve, so fix it. https://jenkins-systemd.apps.ocp.cloud.ci.centos.org/job/upstream-vagrant-archlinux-sanitizers/3245/console
* Update badge on README to refer new scorecard viewer (#28050)Joyce2023-06-151-1/+1
| | | | | * Update scorecard badge on README.md Signed-off-by: Joyce <joycebrum@google.com>
* test: set $PATH to something predictable in the ASan wrapperFrantisek Sumsal2023-06-151-0/+2
| | | | | | | This is still necessary when running with clang's ASan, as it uses an external binary to symbolize the stack traces. Follow-up to ba79e8c2ccd.
* systemctl: let's emphasize a bit that halt/poweroff/reboot/shutdown are ↵Lennart Poettering2023-06-152-7/+21
| | | | | | | | | | | | | | | | | | | compat commands Let's try to make clear that these calls really should not be extended anymore, but remain as the compat glue they are but not more. Anything new should really be added to systemctl poweroff/halt/reboot, which is actually defined and owned by us. This is added in light of a9c3cc8db02dc36d41b17d0bbf1e02500046e4ce which really shouldn't have been added I am sure. This adds two things: a note to the --help text that people use the relevant systemctl commands instead (as they are a lot more powerful, for example give you inhibitor and boot loader control, kexec, and so on). And a note to developers that they stop adding new stuff to the compat interfaces.
* update TODOLennart Poettering2023-06-151-0/+15
|
* execute: fix the condition of private mounts for user namespacingHaochen Tong2023-06-152-6/+6
| | | | Follow-up for: 6ef721cbc7dadee4ae878ecf0076d87e57233908
* kernel-install: skip to read /etc/machine-info in testYu Watanabe2023-06-152-0/+10
| | | | | | | | We do not provide any way to override /etc/machine-info. As the file is deprecated in kernel-install, let's skip to read it when we test kernel-install. Fixes #28011.
* network: make degraded-carrier bond/bridge as routable (#27776)Henrik Holst2023-06-153-9/+15
| | | | | | | | | | | | | This makes a bond or bridge interface in the degraded-carrier state but has a routable address handled as routable operational state. If the carrier is degraded but the address state is routable then the operational state should be seen as routable and not degraded because that may be the case for bonds if some of the links are down, but when that happens the bond as whole is still routable. This also makes operational state to degraded if address state is degraded even if the link state is degraded-carrier. Fixes #22713.
* Merge pull request #28038 from mrc0mmand/cleanupsLuca Boccassi2023-06-158-364/+378
|\ | | | | A couple of cleanups
| * activate: rename to socket-activateFrantisek Sumsal2023-06-142-1/+1
| | | | | | | | | | To make the naming consistent with the rest of the utils, i.e. binary name minus the systemd- prefix.
| * test: split TEST-04 into smaller chunksFrantisek Sumsal2023-06-145-349/+374
| |
| * test: exit on first failing subtestFrantisek Sumsal2023-06-141-14/+3
| | | | | | | | | | | | | | Let's take a step back and revert back to the original behavior where we exit on a first failing subtest. The current behavior makes fishing out the failing test details quite unpleasant, and in certain situations the journal may even be rotated away so we end up with no actionable logs.
* | Squashed commit of the following:Joyce Brum2023-06-141-30/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit ef2fc83647f69c172c11e0dea318bf6ecf79a4aa Author: Joyce <joycebrum@google.com> Date: Wed Jun 14 12:18:23 2023 -0300 Update scorecards.yml Signed-off-by: Joyce <joycebrum@google.com> commit c59c05c6ab156b20249e8056d8cbaafbe0c495f8 Merge: 7431a54568 f66d040d95 Author: Joyce <joycebrum@google.com> Date: Wed Jun 14 10:22:28 2023 -0300 Merge branch 'main' into fix/disable-code-scanning-alerts commit 7431a54568746a2fa4db1b23e1359984335df41e Author: Joyce <joycebrum@google.com> Date: Tue Jun 13 18:15:21 2023 -0300 Remove code scanning alerts scorecards.yml Signed-off-by: Joyce <joycebrum@google.com> Signed-off-by: Joyce Brum <joycebrum@google.com>
* | Merge pull request #28036 from medhefgo/mesonLuca Boccassi2023-06-146-10/+7
|\ \ | | | | | | meson: Minor improvements
| * | meson: Use build_tgt.name()Jan Janssen2023-06-141-2/+1
| | |
| * | meson: Use fs module in more placesJan Janssen2023-06-145-8/+6
| | |
* | | mkfs-util: Hide /proc/self/mounts before running mkfsDaan De Meyer2023-06-141-1/+9
| |/ |/| | | | | | | | | | | | | | | | | mkfs.btrfs refuses to operate on a block device with mounted partitions, even if doing so is perfectly safe. An example when this happens is when using systemd-repart with it's --image switch to add a root partition to a /usr only image. As a workaround until the issue is fixed, let's hide the information on mounted filesystems from mkfs.btrfs so it doesn't fail and formats the new filesystem as expected.
* | resolvectl: fix double free issueLennart Poettering2023-06-141-1/+1
| | | | | | | | | | | | Follow-up for: #28012 Addresses these: https://github.com/systemd/systemd/pull/28012#issuecomment-1590889386
* | bootctl: warn if the ESP random seed is stored on a world-readable dirLennart Poettering2023-06-142-3/+42
| | | | | | | | | | | | | | | | | | | | This takes heavy inspiration from @zx2c4 (Jason A. Donenfeld)'s PR #25531 but changes it considerably, but always going by fd instead of paths, and only warning about the side file itself and the ESP mount point, nothing else. This shuld be more than enough and should not be brittle against concurrent path modifications. Replaces: #25531
* | Merge pull request #27946 from keszybz/ukify-genkey-verbZbigniew Jędrzejewski-Szmek2023-06-145-101/+408
|\ \ | | | | | | Add 'genkey' verb to ukify
| * | ukify: make the certficate validity configurableZbigniew Jędrzejewski-Szmek2023-06-142-2/+21
| | | | | | | | | | | | Requested in https://github.com/systemd/systemd/pull/27946/commits/4cc743319ae378d458050d6e0cfdeaa03addd379#r1228592001
| * | man/ukify: add structure to describe verbs, document genkeyZbigniew Jędrzejewski-Szmek2023-06-141-49/+72
| | | | | | | | | | | | | | | This just adds two paragraphs of text, but moves a lot of the text one level down into a subsection.
| * | test_ukify: skip test requiring cryptographyZbigniew Jędrzejewski-Szmek2023-06-141-0/+3
| | | | | | | | | | | | | | | I'll add the dep in Fedora spec so it does get tested at least in some cases.
| * | man: add example how to configure automatic signingZbigniew Jędrzejewski-Szmek2023-06-142-0/+44
| | | | | | | | | | | | Fixes #978.
| * | test_ukify: cleanups suggested by pylintZbigniew Jędrzejewski-Szmek2023-06-141-4/+5
| | |
| * | ukify: add 'genkey' verbZbigniew Jędrzejewski-Szmek2023-06-143-6/+188
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The idea is to make it easy to generate all the signing key and certs that can be used for local signing. The verb is the modeled after 'mkosi genkey', but there are some important differences: we generate the keys to the paths where they will be read from, both pcr signing keys and the SecureBoot certificate+key. If any of the outputs exist, operation is refused. Maybe we could add a --force option in the future, but this operation should be rare, so I think it's better to refuse to overwrite anything initially. I'm only doing a token man page change here. https://github.com/systemd/systemd/pull/27621 reworks the man page, and the changes done here would conflict heavily with that work. I'll submit a follow-up patch later.
| * | ukify: move verb mangling to finalize_options()Zbigniew Jędrzejewski-Szmek2023-06-123-31/+28
| | | | | | | | | | | | | | | | | | | | | This simplifies the logic: finalize_options() is the step that does the checks and the mangling. The checks for consistency are done in more places, so we need to pass a verb (we only have 'build', but once we add other verbs, any would do).
| * | ukify: split out iteration over phase path groups and keysZbigniew Jędrzejewski-Szmek2023-06-121-7/+14
| | | | | | | | | | | | In preparation for future changes.
| * | man,test: root or hardware is not needed for ukifyZbigniew Jędrzejewski-Szmek2023-06-122-4/+4
| | |
| * | ukify: fix synopsis in --helpZbigniew Jędrzejewski-Szmek2023-06-121-1/+1
| | | | | | | | | | | | Missed in a3b227d28a823d59e3281109f5369d0f63b40f62.
| * | ukify: use pager for --helpZbigniew Jędrzejewski-Szmek2023-06-121-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | The output is now too long to fit on one page, let's use a pager automatically like in other places. The implementation is copied from mkosi, but adjusted to follow what other systemd tools do.
* | | coverage: fix build with g++Frantisek Sumsal2023-06-141-5/+13
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Guard the coverage-related shenanigans from g++ when building the one C++ unit test we have, so we don't have to make it C++ compatible: [1573/2109] Compiling C++ object test-bus-vtable-cc.p/src_libsystemd_sd-bus_test-bus-vtable-cc.cc.o FAILED: test-bus-vtable-cc.p/src_libsystemd_sd-bus_test-bus-vtable-cc.cc.o ccache c++ -Itest-bus-vtable-cc. ... -c ../src/libsystemd/sd-bus/test-bus-vtable-cc.cc In file included from <command-line>: ../src/basic/coverage.h:17:15: error: ‘_Noreturn’ does not name a type 17 | static inline _Noreturn void _coverage__exit(int status) { | ^~~~~~~~~ ../src/basic/coverage.h:46:29: error: conflicting declaration of ‘int _coverage_execveat(int, const char*, char* const*, char* const*, int)’ with ‘C’ linkage 46 | #define execveat(d,p,a,e,f) _coverage_execveat(d, p, a, e, f) | ^~~~~~~~~~~~~~~~~~ ../src/basic/coverage.h:34:19: note: previous declaration with ‘C++’ linkage 34 | static inline int _coverage_execveat( | ^~~~~~~~~~~~~~~~~~ ../src/basic/coverage.h:46:29: error: declaration of ‘int _coverage_execveat(int, const char*, char* const*, char* const*, int) noexcept’ has a different exception specifier 46 | #define execveat(d,p,a,e,f) _coverage_execveat(d, p, a, e, f) | ^~~~~~~~~~~~~~~~~~ ../src/basic/coverage.h:34:19: note: from previous declaration ‘int _coverage_execveat(int, const char*, char* const*, char* const*, int)’ 34 | static inline int _coverage_execveat( | ^~~~~~~~~~~~~~~~~~ ../src/basic/coverage.h:58:24: error: conflicting declaration of ‘int _coverage_execvpe(const char*, char* const*, char* const*)’ with ‘C’ linkage 58 | #define execvpe(f,a,e) _coverage_execvpe(f, a, e) | ^~~~~~~~~~~~~~~~~ ../src/basic/coverage.h:48:19: note: previous declaration with ‘C++’ linkage 48 | static inline int _coverage_execvpe( | ^~~~~~~~~~~~~~~~~ ../src/basic/coverage.h:58:24: error: declaration of ‘int _coverage_execvpe(const char*, char* const*, char* const*) noexcept’ has a different exception specifier 58 | #define execvpe(f,a,e) _coverage_execvpe(f, a, e) | ^~~~~~~~~~~~~~~~~ ../src/basic/coverage.h:48:19: note: from previous declaration ‘int _coverage_execvpe(const char*, char* const*, char* const*)’ 48 | static inline int _coverage_execvpe( | ^~~~~~~~~~~~~~~~~ [1582/2109] Compiling C object test-event.p/src_libsystemd_sd-event_test-event.c.o ninja: build stopped: subcommand failed.
* | sleep-config: add comment about securityChristoph Anton Mitterer2023-06-141-0/+8
| | | | | | | | | | Adds information about attacks that might become possible when the hibernate location is automatically determined.
* | Merge pull request #28032 from poettering/mumumµLennart Poettering2023-06-1434-60/+64
|\ \ | | | | | | deal with µ unicode ambiguities
| * | tree-wide: when in doubt use greek small letter mu rather than micro symbolLennart Poettering2023-06-1432-54/+54
| | | | | | | | | | | | | | | | | | | | | | | | Doesn't really matter since the two unicode symbols are supposedly equivalent, but let's better follow the unicode recommendations to prefer greek small letter mu, as per: https://www.unicode.org/reports/tr25
| * | time-util,socket: accept both kinds of unicode µ symbolsLennart Poettering2023-06-143-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apparently there are two µ symbols, accept both when parsing. One is the greek small letter mu (μ) the other is the micro sign (µ). Unicode recommendation considers both equivalent, and says use of greek small letter mu is preferred. See: https://www.unicode.org/reports/tr25 Hence accept both when parsing. Inspired by: #28029
* | | bootctl: fix docs/--help to say that "bootctl random-seed" not just ↵Lennart Poettering2023-06-142-8/+10
| | | | | | | | | | | | initializes but also refreshes ESP random seeds
* | | Merge pull request #28012 from poettering/resolvectl-dump-cacheLennart Poettering2023-06-1411-32/+345
|\ \ \ | |/ / |/| | add "resolvectl show-cache" call and IPC backend for that
| * | resolvectl: add resolvectl command for dumping cache contentsLennart Poettering2023-06-122-0/+160
| | | | | | | | | | | | | | | A wrapper around the new varlink call, showing the data either in its native JSON or in a more human readable textual form.
| * | resolved: add DNS_RESOURCE_KEY_TO_STRING() macro helperLennart Poettering2023-06-121-0/+3
| | | | | | | | | | | | | | | | | | | | | This does the usual compound init trick to get formatted strings of stuff. We should probably port various pieces of code over to using this.
| * | resolved: add dns_resource_key_from_json() helperLennart Poettering2023-06-123-29/+30
| | | | | | | | | | | | | | | | | | | | | | | | It reverse what dns_resource_key_to_json(), i.e. turns JSON data into a parsed DnsResourceKey object. Ultimately this just moves a client-side local wrapper into generic code. Nothing truly new here.
| * | resolved: add DumpCache varlink call for acquiring a complete dump of all of ↵Lennart Poettering2023-06-125-3/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | resolved's RR caches This adds a simple varlink call io.systemd.Resolve.Monitor.DumpCache to the existing io.systemd.Resolve.Monitor service. It compiles a JSON object containing the per-scope cache entries and returns it. Replaces: #20053 #19104 Fixes: #14796
| * | json: add json_dispatch_variant_noref() helperLennart Poettering2023-06-122-0/+11
| | | | | | | | | | | | | | | | | | | | | This is identical to json_dispatch_variant() but doesn't increase the ref counter of the variant. This is useful for taking JSON objects apart locally without the intention to keep any component pinned for longer than the local stack frame.
* | | Merge pull request #26728 from keszybz/meson-updateLennart Poettering2023-06-133-35/+26
|\ \ \ | | | | | | | | Meson version update
| * | | meson: bump required version to 0.56.0Yu Watanabe2023-06-122-2/+2
| | | |