summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* load-fragment: Remove faulty assertionDaan De Meyer2024-07-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Followup for 453cb5d01e587ff6d9fa426397c0d1b858f8f832 Fixes the following assertion: """ x86 130 ~/systemd ❯❯❯ meson compile -C build ninja: Entering directory `/home/tfleig/systemd/build' [2/5] Generating export-dbus-interfaces with a custom command FAILED: interfaces /home/tfleig/systemd/tools/dbus_exporter.py interfaces /home/tfleig/systemd/build/systemd /home/tfleig/systemd/build/systemd-homed /home/tfleig/systemd/build/systemd-hostnamed /home/tfleig/systemd/build/systemd-importd /home/tfleig/systemd/build/systemd-localed /home/tfleig/systemd/build/systemd-logind /home/tfleig/systemd/build/systemd-machined /home/tfleig/systemd/build/systemd-networkd /home/tfleig/systemd/build/systemd-oomd /home/tfleig/systemd/build/systemd-portabled /home/tfleig/systemd/build/systemd-resolved /home/tfleig/systemd/build/systemd-timedated Assertion '__unique_prefix__expr_91' failed at src/core/load-fragment.c:3912, function config_parse_tasks_max(). Aborting. Traceback (most recent call last): File "/home/tfleig/systemd/tools/dbus_exporter.py", line 45, in <module> main() File "/home/tfleig/systemd/tools/dbus_exporter.py", line 42, in main extract_interfaces_xml(args.output, exe) File "/home/tfleig/systemd/tools/dbus_exporter.py", line 9, in extract_interfaces_xml proc = run( File "/usr/lib64/python3.9/subprocess.py", line 528, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '[PosixPath('/home/tfleig/systemd/build/systemd'), '--bus-introspect', 'list']' died with <Signals.SIGABRT: 6>. [4/5] Generating man/systemd.index.xml with a custom command ninja: build stopped: subcommand failed. """
* repart: Allow overriding fstype per partition designatorDaan De Meyer2024-07-034-0/+49
| | | | | | $SYSTEMD_REPART_OVERRIDE_FSTYPE is too invasive. Often you want to override the fstype only for a specific designator, so let's support that as well.
* mkosi: Copy packages to the build directory as wellDaan De Meyer2024-07-034-0/+4
| | | | | | | | | | | | | | | | | With the latest mkosi, mkosi -t none can be used to rerun the build script without messing with a previously built image. This allows one to run "mkosi -t disk -f qemu" in one terminal to build and boot an image in qemu and then run "mkosi -t none" in another terminal to rebuild the packages. If one then has "RuntimeBuildSources=yes" set in their mkosi configuration, the build directory is mounted into the virtual machine, which means that one can then run "dnf upgrade /work/build/*.rpm" from within the VM to install the new packages. This allows for quickly iterating on changes without having to rebuild the image all the time. We'll probably want to document this at some point, but let's start with making it possible by copying the built packages to the build directory.
* mkosi: Make sure we don't hide errors from git merge-baseDaan De Meyer2024-07-031-1/+6
| | | | | | | Currently if git merge-base fails we'll hide the error and exit with exit status 0. Let's make we only exit early if git merge-base exits with 1 which indicates the current commit is not on the target branch. Any other error is considered fatal.
* hwdb: Add some HP IR camerasAnton Golubev2024-07-031-0/+10
| | | | | | | | | | | | | Two very similar devices, with two functions - a regular camera and IR. The peculiarity of their infrared camera is that it uses a color image format (YUYV), although it is essentially black and white. The IR camera interface differs from the regular camera interface by name: "HP Wide Vision FHD Camera: HP W" for the regular camera and "HP Wide Vision FHD Camera: HP I" for an infrared camera Therefore, glob *I is used to separate the IR camera
* Merge pull request #33575 from YHNdnzj/soft-reboot-system-manager-onlyLuca Boccassi2024-07-033-87/+95
|\ | | | | core/dbus-manager: several cleanups, refuse SoftReboot() for user manager
| * core/main: add an assertion to ensure user managers won't initiate ↵Mike Yuan2024-07-031-8/+9
| | | | | | | | destructive/system-wide operation
| * core/manager: invoke special targets on signal only for system managerMike Yuan2024-07-031-34/+36
| |
| * core/dbus-manager: refuse SoftReboot() for user managersMike Yuan2024-07-031-0/+4
| | | | | | | | | | Otherwise, busctl --user call ... SoftReboot results in user manager broadcasting signal and initiating soft-reboot...
| * core/dbus-manager: check for runtime scope first for system-wide operationsMike Yuan2024-07-031-20/+20
| | | | | | | | | | It's pointless to do selinux or /run/ space checks for user managers.
| * core/dbus-manager: use sd_bus_error_set() rather than _setf() where appropriateMike Yuan2024-07-031-16/+16
| | | | | | | | Also, there can only be one system manager.
| * core/dbus-manager: use path_simplify_alloc() for root and init pathsMike Yuan2024-07-031-11/+11
| |
| * core/dbus-manager: use PidRef for log_caller()Mike Yuan2024-07-031-8/+9
| | | | | | | | | | This is only for logging, but since we lookup for the unit here, let's try to be accurate.
* | update TODOLennart Poettering2024-07-031-5/+4
| |
* | mkosi: update fedora commit referenceDaan De Meyer2024-07-031-1/+1
|/ | | | | | | * f9fe17dbde Use vmlinux.h from kernel-devel * 9cbad936a6 Pull in openssl-devel-engine * 8ae009f929 Only add Requires on python3-zstd on Fedora * 750e910c7c Drop BuildRequires on python3-zstd
* mkosi: Don't touch the packaging checkout if work is being doneDaan De Meyer2024-07-031-2/+9
| | | | | If work is being done in a separate branch, don't touch the packaging checkout.
* meson: Define __TARGET_ARCH macros required by bpfDaan De Meyer2024-07-031-7/+7
| | | | | | | | | These are required by the bpf_tracing.h header in libbpf, see https://github.com/libbpf/libbpf/blob/master/src/bpf_tracing.h. bpf_tracing.h does have a few fallbacks in case __TARGET_ARCH_XXX is not defined but recommends using the __TARGET_ARCH macros instead so let's do that.
* coredump: correctly take tmpfs size into account for compressionLuca Boccassi2024-07-031-8/+12
| | | | | | | | | | | | | We calculate the amount of uncompressed data we can write by taking the limits into account and halving it to ensure there's room for switching to compression on the fly when storing cores on a tmpfs (eg: due read-only rootfs). But the logic is flawed, as taking into account the size of the tmpfs storage was applied after the halving, so in practice when an uncompressed core file was larger than the tmpfs, we fill it and then fail. Rearrange the logic so that the halving is done after taking into account the tmpfs size.
* docs/CODING_STYLE: document that we nowadays prefer (const char*) for func ↵Mike Yuan2024-07-021-1/+13
| | | | | | ret type Addresses https://github.com/systemd/systemd/pull/33567#discussion_r1662818225
* Merge pull request #33577 from fbuihuu/testsuite-tweaks-for-v256-on-SUSELuca Boccassi2024-07-023-2/+8
|\ | | | | Testsuite tweaks for v256 on suse
| * test: fix TEST-74-AUX-UTILS.ssh.sh on SUSEFranck Bui2024-07-021-1/+4
| |
| * test: preserve symlink in inst_recursive()Franck Bui2024-07-021-0/+2
| | | | | | | | | | On SUSE this function is used to copy symlinks installed in *.wants/ directories.
| * test: fix TEST-24-CRYPTSETUP on SUSEFranck Bui2024-07-021-1/+1
| | | | | | | | /etc/systemd/journald.conf.d drop-in dir already exists on SUSE.
| * test: install /etc/hostsFranck Bui2024-07-021-0/+1
| | | | | | | | Needed for resolving the "localhost" hostname.
* | Merge pull request #33574 from poettering/get-efi-var-rawLennart Poettering2024-07-0212-299/+319
|\ \ | | | | | | efi: efi variable refactoring
| * | efivars: rename efivar_get_uint_string() → efivar_get_uint64_str16()Lennart Poettering2024-07-024-19/+20
| | | | | | | | | | | | | | | | | | | | | | | | Be explicit with the type, and more inline with our other code, that likes to indicate the string char width in the name. Also, switch to a fixed size type, since EFI variables should really be binary exact the same on all archs.
| * | efi: rename efivar_(set|get)() → efivar_(set|get)_str16()Lennart Poettering2024-07-025-24/+24
| | | | | | | | | | | | | | | | | | These functions after all write EFI UTF-16 strings, i.e. are relatively high-level, hence give them a specific name indicating the type, to match our other helpers that have similar type suffixes.
| * | efivars: use appropropriate uint8_t type when dealing with "raw" bytesLennart Poettering2024-07-021-3/+3
| | | | | | | | | | | | | | | We don't actually want chars here, but rather raw bytes, in particular to avoid signedness issues. Hence, let's use uint8_t here.
| * | efivars: change return parameter of efivar_get_raw() to be void**Lennart Poettering2024-07-025-10/+10
| | | | | | | | | | | | | | | | | | | | | This is the "raw", untyped version after all, hence we should return a void pointer, and let the client cast, if they know more. Replaces: #30812
| * | efi: split out efivars.[ch] from util.[ch]Lennart Poettering2024-07-0212-267/+286
|/ / | | | | | | | | | | These are quite a bunch of functions, let's give them their own file. No code changes, just some trivial refactoring.
* | mkosi: Install perfDaan De Meyer2024-07-024-0/+7
| | | | | | | | It's already installed on ubuntu via linux-tools-common.
* | update TODOLennart Poettering2024-07-021-0/+3
| |
* | test: split the resolved test suite into separate test casesDaniel Rusek2024-07-021-660/+721
| | | | | | | | | | | | Although being far from ideal and the first two test cases have to be run before the setup phase otherwise they will fail, it still makes the test suite look much better and easier to read
* | Merge pull request #33496 from YHNdnzj/fd-is-mount-symlinkLuca Boccassi2024-07-022-4/+30
|\ \ | | | | | | mountpoint-util: do not assume symlinks are not mountpoints
| * | test-mountpoint-util: add a test for bind mounted symlinksMike Yuan2024-06-271-0/+30
| | |
| * | mountpoint-util: do not assume symlinks are not mountpointsMike Yuan2024-06-271-4/+0
| | | | | | | | | | | | They very much can be with the new mount API.
* | | Merge pull request #33560 from YHNdnzj/trivial-cleanup-2Luca Boccassi2024-07-022-9/+12
|\ \ \ | | | | | | | | 2 trivial follow-ups for recent PRs
| * | | shared/condition: add missing space after 'if'Mike Yuan2024-07-011-2/+2
| | | | | | | | | | | | | | | | Follow-up for 98b1ecc9175a8bb241292f6f441a754b6759dd97
| * | | shared/mount-util: return early if param is NULLMike Yuan2024-07-011-7/+10
| | | | | | | | | | | | | | | | To make things more readable and consistent.
* | | | Merge pull request #33523 from neighbourhoodie/fix/dns-opt-extended-rcodeLuca Boccassi2024-07-022-4/+4
|\ \ \ \ | | | | | | | | | | Fix DNS OPT extended rcode parsing
| * | | | resolved: correct parsing of OPT extended RCODEsJames Coglan2024-06-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The DNS_PACKET_RCODE() function works out the full RCODE by taking the first octet from the OPT record TTL field and bitwise-OR-ing this with the basic RCODE from the packet header. This results in RCODE values being lower than they should be. For example, if the first TTL octet is 0x7a and the basic RCODE is 3, this function currently returns `0x7a | 3` = 123, rather than 0x7a3 = 1955. The first TTL octet is supposed to form the upper 8 bits of a 12-bit value, whereas the current implementation constraints the value to 8 bits and results in mis-interpreted RCODEs. This fixes things by shifting the TTL 20 places instead of 24 and masking off the low nibble that comes from the upper bits of the version octet. Note that dns_packet_append_opt() correctly converts the input RCODE into the high octet of the OPT TTL field; this problem only affects parsing of incoming packets.
| * | | | resolved: allow the full TTL to be used by OPT recordsJames Coglan2024-06-281-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Whereas RFC 1035 says the TTL field takes the "positive values of a signed 32 bit number", and RFC 2181 says "Implementations should treat TTL values received with the most significant bit set as if the entire value received was zero,", the dns_packet_read_rr() function sets rr->ttl to zero if the MSB is set. However, EDNS(0) as specified in RFC 6891 repurposes the TTL field's 4 octets to store other information, c.f.: +0 (MSB) +1 (LSB) +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 0: | EXTENDED-RCODE | VERSION | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ 2: | DO| Z | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ The first octet extends the usual 4-bit RCODE from the packet header by providing an additional 8 bits of space, extending the RCODE to 12 bits. But, our handling of the TTL field means that the high bit in the first octet is not actually usable, since setting it will mean these 4 octets are replaced with 0. This may have the effect of making us believe a server does not support DNSSEC when it actually set the DO bit in its OPT record. Here we change things so that the TTL is only set to zero for record types other than OPT.
* | | | | build(deps): bump github/codeql-action from 3.24.7 to 3.25.11dependabot[bot]2024-07-012-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.24.7 to 3.25.11. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/github/codeql-action/compare/3ab4101902695724f9365a384f86c1074d94e18c...b611370bb5703a7efb587f9d136a52ea24c5c38c) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
* | | | | mkosi: update debian commit referenceLuca Boccassi2024-07-011-1/+1
| |/ / / |/| | | | | | | | | | | | | | | | | | | * abf24e775c Add recommends on linux-sysctl-defaults * 76cb4138d2 autopkgtest: skip qemu tests on arm64 * 0935d73526 Install new systemd-import generator
* | | | Merge pull request #33475 from poettering/name-to-handle-at-fidLennart Poettering2024-07-017-34/+227
|\ \ \ \ | | | | | | | | | | teach inode_same() the concept of name_to_handle_at() FIDs to properly detect inode identities
| * | | | test: beef up test case for fid-based equality checksLennart Poettering2024-07-013-4/+63
| | | | |
| * | | | stat-util: port inode_same_at() to use FID file handle data to determine ↵Lennart Poettering2024-07-011-6/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | inode identity Let's be good boys, and use FID for this.
| * | | | mountpoint-util: clarify that EOVERFLOW is visible on nfs4/autofs mountsLennart Poettering2024-07-011-3/+3
| | | | |
| * | | | mountpoint-util: use the FID stuff for detecting the root of mountsLennart Poettering2024-07-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the unlikely event that sandboxes block statx() but let name_to_handle_at() through it's a good way to determine the root inode of the namespace, since its parent inode will have the same FID and mnt_id.
| * | | | mountpoint-util: add new helper name_to_handle_at_try_fid()Lennart Poettering2024-07-013-1/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Newer kernels support a new flag for name_to_handle_at(): AT_HANDLE_FID. This flag is supposed to return an identifier for an inode that we can use for checking inode identity. It's supposed to be a replacement for checking .st_ino which doesn't work anymore today because inode numbers are no longer unique on file systems (not on overlayfs, and not on btrfs for example). Hence, be a good citizen and add infrastructure to support AT_HANDLE_FID. Unfortunately that doesn't work for old kernels, hence add a fallback logic: if we can use the flag, use it. If we cannot use name_to_handle_at() without it, which might give us a good ID too. But of course tha tcan fail as well, which callers have to check.