summaryrefslogtreecommitdiffstats
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
| * | libsystemd: drop _public_ attribute for non-exported functionsYu Watanabe2023-04-292-24/+24
| | |
* | | stub: Relocate kernels below 4G for EFI handoverJan Janssen2023-05-011-8/+20
| | | | | | | | | | | | | | | | | | | | | Old kernels can fail to boot when they are located above the 4G boundary even if they claim to support it. Fixes: #27472
* | | boot: Fix EFI_SIZE_TO_PAGES macroJan Janssen2023-05-011-1/+1
| |/ |/|
* | sd-journal: introduce simple loop detection for entry array objectsYu Watanabe2023-05-011-7/+19
| | | | | | | | | | | | | | | | | | If .next_entry_array_offset points to one of the previous entry or the self entry, then the loop for entry array objects may run infinitely. Let's assume that the offsets of each entry array object are in increasing order, and check that in loop. Fixes #27470.
* | sd-journal: tighten variable scopeYu Watanabe2023-05-011-1/+3
| |
* | sd-journal: read entry array object againYu Watanabe2023-05-011-1/+6
| | | | | | | | | | Otherwise, the object may be invalidated by the previous call of journal_file_move_to_object().
* | sd-journal: check validity of object type more strictlyYu Watanabe2023-05-011-3/+3
| | | | | | | | | | Otherwise, the object with invalid type may pass check_object_header() when the requested type is OBJECT_UNUSED.
* | sd-journal: add _OBJECT_TYPE_INVALID as usualYu Watanabe2023-05-011-1/+2
| |
* | sd-journal: align tableYu Watanabe2023-05-011-7/+7
| |
* | sd-journal: check that the journal file is not stored in .newest_by_boot_id ↵Yu Watanabe2023-05-011-0/+2
| | | | | | | | on free
* | sd-journal: unset prioq index on failureYu Watanabe2023-05-011-1/+3
| | | | | | | | | | Otherwise, potentially, the assertion in journal_file_unlink_newest_by_bood_id() will be triggered.
* | sd-journal: fix use-after-freeYu Watanabe2023-05-011-1/+1
| | | | | | | | | | | | | | As commented in the code, we need to replace the pointer to the key, hence, hashmap_replace() must be used, instead of hashmap_update(). Fixes #27459.
* | tpm2: move openssl-required ifdef code out of policy-building functionDan Streetman2023-05-011-40/+58
| |
* | Merge pull request #27451 from yuwata/core-path-trigger-notifyLuca Boccassi2023-04-292-7/+67
|\ \ | | | | | | core/path: do not install new job in .trigger_notify()
| * | core/path: do not enqueue new job in .trigger_notify callbackYu Watanabe2023-04-292-5/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise, 1. X.path triggered X.service, and the service has waiting start job, 2. systemctl stop X.service 3. the waiting start job is cancelled to install new stop job, 4. path_trigger_notify() is called, and may reinstall new start job, 5. the stop job cannot be installed, and triggeres assertion. So, instead, let's add a defer event source, then enqueue the new start job after the stop (or any other type) job finished. Fixes https://github.com/systemd/systemd/issues/24577#issuecomment-1522628906.
| * | core/path: align tableYu Watanabe2023-04-291-2/+2
| |/
* / missing_fs: also define struct file_clone_rangeYu Watanabe2023-04-291-0/+6
|/ | | | | | Follow-up for b640e274a7c363a2b6394c9dce5671d9404d2e2a. Addresses https://github.com/systemd/systemd/commit/b640e274a7c363a2b6394c9dce5671d9404d2e2a#r110996661.
* pid1: unify implemenation of /run/ disk space safety check a bitLennart Poettering2023-04-291-16/+42
| | | | | | | | | | | | | | | | | reload/reexec currently used a separate implementation of the /run/ disk space check, different from the one used for switch-root, even though the code is mostly the same. The one difference is that the former checks are authoritative, the latter are just informational (that's because refusing a reload/reexec is relatively benign, but refusing a switch-root quite troublesome, since this code is entered when it's already "too late" to turn turn back, i.e. when the preparatory transaction to initiate the switch root are already fully executed. Let's share some code, and unify codepaths. (This is preparation for later addition of a "userspace reboot" concept) No change in behaviour, just refactoring.
* core/systemctl: when switching root default to /sysroot/Lennart Poettering2023-04-293-19/+30
| | | | | | | | | We hardcode the path the initrd uses to prepare the final mount point at so many places, let's also imply it in "systemctl switch-root" if not specified. This adds the fallback both to systemctl and to PID 1 (this is because both to — different – checks on the path).
* libsystemd: Add missing memory pressure functions to public symbolsDaan De Meyer2023-04-281-0/+4
|
* Merge pull request #27445 from poettering/reflink-fixMike Yuan2023-04-281-9/+11
|\ | | | | remove duplication reflink ioctl invocation
| * copy: shortcut reflink_range() to reflink() in some casesLennart Poettering2023-04-281-0/+6
| |
| * copy: don't call clone ioctls twiceLennart Poettering2023-04-281-9/+5
| | | | | | | | | | The btrfs name and the generic name have the same values, hence there's no point in bothering with the former.
* | systemctl: rework 'if' to 'switch' statementLennart Poettering2023-04-281-11/+17
| |
* | Merge pull request #27437 from mrc0mmand/pstoreLuca Boccassi2023-04-281-3/+6
|\ \ | |/ |/| test: add a couple of tests for systemd-pstore
| * pstore: avoid opening the dmesg.txt file if not requestedFrantisek Sumsal2023-04-281-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even with Storage=journal we would still attempt to open the final dmesg.txt file which causes a lot of noise in the journal: ``` [ 5.764111] H testsuite-82.sh[658]: + systemctl start systemd-pstore [ 5.806385] H systemd[1]: Starting modprobe@efi_pstore.service... [ 5.808656] H systemd[1]: modprobe@efi_pstore.service: Deactivated successfully. [ 5.808971] H systemd[1]: Finished modprobe@efi_pstore.service. [ 5.818845] H kernel: audit: type=1130 audit(1682630623.637:114): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=kernel msg='unit=modprobe@efi_pstore comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? termin> [ 5.818865] H kernel: audit: type=1131 audit(1682630623.637:115): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=kernel msg='unit=modprobe@efi_pstore comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? termin> [ 5.816052] H systemd[1]: Starting systemd-pstore.service... [ 5.840703] H systemd-pstore[806]: PStore dmesg-efi-168263062313014. [ 5.841239] H systemd-pstore[806]: Failed to open file /var/lib/systemd/pstore/1682630623/014/dmesg.txt: Operation not permitted [ 5.841428] H systemd-pstore[806]: PStore dmesg-efi-168263062312014. [ 5.841575] H systemd-pstore[806]: Failed to open file /var/lib/systemd/pstore/1682630623/014/dmesg.txt: Operation not permitted [ 5.841712] H systemd-pstore[806]: PStore dmesg-efi-168263062311014. [ 5.841839] H systemd-pstore[806]: Failed to open file /var/lib/systemd/pstore/1682630623/014/dmesg.txt: Operation not permitted [ 5.841989] H systemd-pstore[806]: PStore dmesg-efi-168263062310014. [ 5.842141] H systemd-pstore[806]: Failed to open file /var/lib/systemd/pstore/1682630623/014/dmesg.txt: Operation not permitted [ 5.842274] H systemd-pstore[806]: PStore dmesg-efi-168263062309014. [ 5.842423] H systemd-pstore[806]: Failed to open file /var/lib/systemd/pstore/1682630623/014/dmesg.txt: Operation not permitted [ 5.842589] H systemd-pstore[806]: PStore dmesg-efi-168263062308014. [ 5.842722] H systemd-pstore[806]: Failed to open file /var/lib/systemd/pstore/1682630623/014/dmesg.txt: Operation not permitted [ 5.842865] H systemd-pstore[806]: PStore dmesg-efi-168263062307014. [ 5.843003] H systemd-pstore[806]: Failed to open file /var/lib/systemd/pstore/1682630623/014/dmesg.txt: Operation not permitted [ 5.843153] H systemd-pstore[806]: PStore dmesg-efi-168263062306014. [ 5.843280] H systemd-pstore[806]: Failed to open file /var/lib/systemd/pstore/1682630623/014/dmesg.txt: Operation not permitted [ 5.843434] H systemd-pstore[806]: PStore dmesg-efi-168263062305014. [ 5.843570] H systemd-pstore[806]: Failed to open file /var/lib/systemd/pstore/1682630623/014/dmesg.txt: Operation not permitted [ 5.843702] H systemd-pstore[806]: PStore dmesg-efi-168263062304014. [ 5.843831] H systemd-pstore[806]: Failed to open file /var/lib/systemd/pstore/1682630623/014/dmesg.txt: Operation not permitted [ 5.843958] H systemd-pstore[806]: PStore dmesg-efi-168263062303014. [ 5.844093] H systemd-pstore[806]: Failed to open file /var/lib/systemd/pstore/1682630623/014/dmesg.txt: Operation not permitted [ 5.844250] H systemd-pstore[806]: PStore dmesg-efi-168263062302014. [ 5.844412] H systemd-pstore[806]: Failed to open file /var/lib/systemd/pstore/1682630623/014/dmesg.txt: Operation not permitted [ 5.844619] H systemd-pstore[806]: PStore dmesg-efi-168263062301014. [ 5.844781] H systemd-pstore[806]: Failed to open file /var/lib/systemd/pstore/1682630623/014/dmesg.txt: Operation not permitted [ 5.844956] H systemd-pstore[806]: PStore dmesg-efi-168263062300014. [ 5.845168] H systemd-pstore[806]: Failed to open file /var/lib/systemd/pstore/1682630623/014/dmesg.txt: Operation not permitted [ 5.851101] H systemd[1]: Finished systemd-pstore.service. ```
| * pstore: explicitly set the base when converting record IDFrantisek Sumsal2023-04-281-3/+3
| |
* | Merge pull request #27440 from yuwata/reflink-follow-upsLuca Boccassi2023-04-284-7/+7
|\ \ | | | | | | copy: follow ups for reflink()
| * | missing_fs: mention commit hash and version of ioctl commands introducedYu Watanabe2023-04-281-3/+3
| | |
| * | copy: rename reflink_full() -> reflink_range()Yu Watanabe2023-04-283-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The commit b640e274a7c363a2b6394c9dce5671d9404d2e2a introduced reflink() and reflink_full(). We usually name function xyz_full() for fully parameterized version of xyz(), and xyz() is typically a inline alias of xyz_full(). But in this case, reflink() and reflink_full() call different ioctl(). Moreover, reflink_full() does partial reflink, while reflink() does full file reflink. That's super confusing. Let's rename reflink_full() to reflink_range(), the new name is consistent with ioctl name, and should be fine.
* | | network-generator: shorten code a bitYu Watanabe2023-04-281-25/+11
| | |
* | | Merge pull request #27424 from dtardon/auto-cleanupYu Watanabe2023-04-2815-112/+106
|\ \ \ | |/ / |/| | More automatic cleanup
| * | logind-session-dbus: use _cleanup_David Tardon2023-04-282-7/+7
| | |
| * | logind-session-device: modernize session_device_free()David Tardon2023-04-282-4/+6
| | |
| * | homed-manager-bus: use _cleanup_David Tardon2023-04-281-4/+4
| | |
| * | transaction: make transaction_free() staticDavid Tardon2023-04-282-2/+1
| | | | | | | | | | | | ... as it's not needed outside transaction.c anymore.
| * | manager: use _cleanup_ in manager_propagate_reload()David Tardon2023-04-281-9/+4
| | |
| * | manager: use _cleanup_ in manager_add_job()David Tardon2023-04-281-11/+6
| | |
| * | transaction: introduce transaction_abort_and_free()David Tardon2023-04-282-0/+11
| | | | | | | | | | | | Will be used in following commits.
| * | transaction: modernize transaction_free()David Tardon2023-04-272-3/+7
| | |
| * | initctl: use _cleanup_David Tardon2023-04-271-6/+5
| | |
| * | initctl: add assertDavid Tardon2023-04-271-0/+1
| | |
| * | specifier: use _cleanup_David Tardon2023-04-271-5/+4
| | |
| * | path-util: use _cleanup_David Tardon2023-04-271-5/+3
| | |
| * | logind: rename function to avoid confusionDavid Tardon2023-04-271-5/+5
| | |
| * | logind-core: drop unneeded check for NULLDavid Tardon2023-04-271-7/+3
| | |
| * | logind-core: modernize button_free()David Tardon2023-04-272-4/+6
| | |
| * | env-util: use more _cleanup_ in replace_env_argv()David Tardon2023-04-271-5/+4
| | |
| * | env-util: use _cleanup_ in replace_env_argv()David Tardon2023-04-271-7/+3
| | |
| * | env-util: rename variableDavid Tardon2023-04-271-26/+26
| | |