summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | 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.
| * | | | mountpoint-util: use ERRNO_IS_xyz() at more placesLennart Poettering2024-07-011-3/+3
| | | | |
| * | | | mountpoint-util: add public helper for comparing file handlesLennart Poettering2024-07-012-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | | We already have the code, let's move it to a function of its own and export it.
| * | | | mountpoint-util: make is_name_to_handle_at_fatal_error() an exported APILennart Poettering2024-07-012-13/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And while we are at it, make it use ERRNO_IS_xyz() where appropriate. And move it up a bit, so we can use in the whole of mountpoint-util.c (which we want to later).
* | | | | mkfs-util: Simplify logicDaan De Meyer2024-07-011-8/+3
| | | | |
* | | | | units: add dep on systemd-logind.service by user@.serviceLennart Poettering2024-07-012-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Let's make sure logind is accessible by the time user@.service runs, and that logind stays around as long as it does so. Addresses an issue reported here: https://lists.freedesktop.org/archives/systemd-devel/2024-June/050468.html This addresses an issued introduced by 278e815bfa3e4c2e3914e00121c37fc844cb2025, which dropped the a dependency from user@.service systemd-user-sessions.service without replacement. While dropping that dependency does make sense, it should have been replaced with the weaker dependency on systemd-logind.service, hence fix that now. user@.service is after all a logind concept, hence logind really should be around for its lifetime. systemd-user-sessions.service is a later milestone that only really should apply to regular users (not root), hence it's too strong a requirement.
* | | | | Use read_full_file_full() in read_smbios11_field()Daan De Meyer2024-07-011-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | read_virtual_file() will only read up to page size bytes of data from /sys/firmware/dmi/entries/.../raw so let's use read_full_file_full() instead to make sure we read all data. This should be safe since smbios11 data can be considered immutable during the lifetime of the system.
* | | | | Merge pull request #33553 from poettering/list-devicesLennart Poettering2024-07-0117-31/+215
|\ \ \ \ \ | |/ / / / |/| | | | add --list-devices switch to various tools that accept block devices to list candidate devices
| * | | | storagetm: add --list-devices commandLennart Poettering2024-07-013-4/+28
| | | | |
| * | | | repart: add --list-devices switch for listing candidate block devicesLennart Poettering2024-07-013-1/+26
| | | | |
| * | | | cryptenroll: add --list-devices switch that shows candidate block devicesLennart Poettering2024-07-013-0/+23
| | | | |
| * | | | util: add generic block device listener helperLennart Poettering2024-07-013-0/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Various of our tools operate on block devices, and it's not always obvious to know which block devices are actually appropriate for use. Hence, let's add a helper that allows to list block devices, and supports some limited filtering.
| * | | | blockdev-util: add partscan check function that takes an sd_device*Lennart Poettering2024-07-016-12/+21
| | | | |
| * | | | repart: add sections to --help textLennart Poettering2024-07-011-14/+26
|/ / / /
* | | | build(deps): bump actions/checkout from 4.1.6 to 4.1.7dependabot[bot]2024-07-0112-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.6 to 4.1.7. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/a5ac7e51b41094c92402da3b24376905380afc29...692973e3d937129bcbf40652eb9f2f61becf3332) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>