summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* add a github workflow action to make a release from tagsДамјан Георгиевски2023-04-011-0/+18
| | | | | | | | | | | | | make a github release for every tag that starts with `v*`, and a pre-release if the tag contains "-rc". on the 'systemd/systemd' repo, the "Release" will be draft, so that the release manager can fill up the notes manually. on 'systemd/systemd-stable' the release will be created immediately. info about the action used: https://github.com/softprops/action-gh-release
* Trim TODO a bitDaan De Meyer2023-03-311-34/+6
| | | | Let's drop stuff that's already implemented.
* treewide: fix unnecessary $ on arithmetic variablesDmitry V. Levin2023-04-015-7/+7
| | | | This should fix shellcheck warning SC2004.
* test: fixed negative checks in TEST-70-TPM2.OMOJOLA JOSHUA DAMILOLA2023-03-311-39/+20
| | | | Use in-line error handling rather than redirections. Follow up on #27020
* test: use setpriv instead of su for user switch from rootThomas Blume2023-03-314-8/+6
| | | | | | | | | | | | systemd-repart needs to find mkfs.ext4 for the test. This is located in the directory /usr/sbin on openSUSE Tumbleweed. But since the variable ALWAYS_SET_PATH in /etc/login.defs is set to yes, su re-initializes the $PATH variable and removes /usr/sbin. Hence, mkfs.ext4 is not found and the test fails. Using setpriv instead of su fixes this issue and is more appropriate to do the switch user task from root. [zjs: move setpriv to $BASICTOOLS and force-push to retrigger CI]
* TODO: drop items regarding swap-for-hibernate-only-useLennart Poettering2023-03-311-7/+0
| | | | | | I doubt we should bother. Swap always makes sense, and having a swap partition for hibernate only without using it all the time just makes the system worse overall.
* docs: fix coredump legacy exampleLudwig Nussel2023-03-311-1/+1
|
* Merge pull request #27080 from yuwata/rm-rfDaan De Meyer2023-03-312-29/+191
|\ | | | | rm-rf: also chmod() directory if it cannot be opened
| * Revert "Revert "test: add more testcases for rm_rf()""Yu Watanabe2023-03-311-8/+56
| | | | | | | | This reverts commit 8c81a618103cafc715e0a1a521e9f1bd34e3e207.
| * rm-rf: also chmod() directory if it cannot be openedYu Watanabe2023-03-311-21/+135
|/ | | | | | | | Otherwise, directory with zero access mode cannot be removed. This is a revised version of 808c8b25eece33c503430151641f5f77676af38c, - dropped O_NOFOLLOW from fd_reopen() - fixed error handling on opening path in rm_rf().
* core: always calculate the next restart intervalMike Yuan2023-03-314-25/+24
| | | | | | | | | | Follow-up for #26902 and #26971 Let's always calculate the next restart interval since that's more useful. For that, we add 1 to s->n_restarts unconditionally, and change RestartUSecCurrent property to RestartUSecNext.
* Merge pull request #27075 from mrc0mmand/test-tweaksLuca Boccassi2023-03-312-3/+33
|\ | | | | test: a couple of coverage-related test tweaks
| * test: make make_addresses() actually return the addressesFrantisek Sumsal2023-03-301-1/+3
| | | | | | | | | | I noticed missing coverage in the reports and turns out this has been broken since forever (i.e. 2016 - 9f7672b3bc), whoopsie.
| * coverage: add a wrapper for execveat()Frantisek Sumsal2023-03-301-2/+30
| | | | | | | | | | | | | | | | | | | | | | gcov provides wrappers for the exec*() calls but there's none for execveat(), which means we lose all coverage prior to the call. To mitigate this, let's add a simple execveat() wrapper in gcov's style[0], which dumps and resets the coverage data when needed. This applies only when we're built with -Dfexecve=true. [0] https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=libgcc/libgcov-interface.c;h=b2ee930864183b78c8826255183ca86e15e21ded;hb=HEAD
* | bootctl: clean up handling of files with no version informationZbigniew Jędrzejewski-Szmek2023-03-303-31/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | get_file_version() would return: - various negative errors if the file could not be accessed or if it was not a regular file - 0/NULL if the file was too small - -ESRCH or -EINVAL if the file did not contain the marker - -ENOMEM or permissions errors - 1 if the marker was found bootctl status iterates over /EFI/{systemd,BOOT}/*.efi and checks if the files contain a systemd-boot version tag. Resource or permission errors should be fatal, but lack of version information should be silently ignored. OTOH, when updating or installing bootloader files, the version is expected to be present. get_file_version() is changed to return -ESRCH if the version is unavailable, and other errnos for permission or resource errors. The logging is reworked to always display an error if encountered, but also to log the status at debug level what the result of the version inquiry is. This makes it figure out what is going on: /efi/EFI/systemd/systemd-bootx64.efi: EFI binary LoaderInfo marker: "systemd-boot 253-6.fc38" /efi/EFI/BOOT/BOOTfbx64.efi: EFI binary has no LoaderInfo marker. /efi/EFI/BOOT/BOOTIA32.EFI: EFI binary has no LoaderInfo marker. /efi/EFI/BOOT/BOOTX64.EFI: EFI binary LoaderInfo marker: "systemd-boot 253-6.fc38" Replaces #27034. Fixes https://github.com/NixOS/nixpkgs/issues/223579.
* | Merge pull request #27072 from bluca/man_exampleLuca Boccassi2023-03-303-24/+81
|\ \ | | | | | | man: further shorten print-unit-path example
| * | man: add example for sd_bus_call_methodLuca Boccassi2023-03-302-0/+64
| | |
| * | man: further shorten print-unit-path exampleLuca Boccassi2023-03-301-24/+17
|/ /
* | man: link up new online coredump docs from man pageLennart Poettering2023-03-311-1/+5
| |
* | Merge pull request #27074 from bluca/revert_rmLuca Boccassi2023-03-302-187/+26
|\ \ | | | | | | Revert rm-rf changes that are causing test failures
| * | Revert "rm-rf: also chmod() directory if it cannot be opened"Luca Boccassi2023-03-301-131/+18
| | | | | | | | | | | | This reverts commit 808c8b25eece33c503430151641f5f77676af38c.
| * | Revert "test: add more testcases for rm_rf()"Luca Boccassi2023-03-301-56/+8
|/ / | | | | | | This reverts commit 0278b1c80101cc0d857c1becd0c3a51b2eb14a44.
* | pid1: fully disable coredumping to $PWDZbigniew Jędrzejewski-Szmek2023-03-301-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have three states: - ENABLE_COREDUMP and systemd-coredump is installed, - ENABLE_COREDUMP but systemd-coredump is not installed, - !ENABLE_COREDUMP. In the last case we would not do any coredumping-related setup in pid1, which means that coredumps would go to to the working directory of the process, but actually limits are set to 0. This is inherited by children of pid1. As discussed extensively in https://github.com/systemd/systemd/pull/26607, this default is bad: dumps are written to arbitrary directories and not cleaned up. Nevertheless, the kernel cannot really fix it. It doesn't know where to write, and it doesn't know when that place would become available. It is only the userspace that can tell this to the kernel. So the only sensible change in the kernel would be to default to '|/bin/false', i.e. do what we do now. In the middle case, we disabled writing of coredumps via a pattern, but raise the RLIMIT_CORE. We need to raise the limit because we can't raise it later after processes have been forked off. This means we behave correctly, but allow coredumping to be enabled at a later point without a reboot. This patch makes the last case behave like the middle case. This means that even if systemd is compiled with systemd-coredump, it still does the usual setup. If users want to restore the kernel default, they need to provide two drop-in files: for sysctl.d, with 'kernel.core_pattern=core' for systemd.conf, with 'DefaultLimitCORE=0'. The general idea is that pid1 does the safe thing. A distro may want to use something different than the systemd-coredump machinery, and then that would could packaged together with the drop-ins to change the configuration. Alternative-for: #26607
* | docs: add a document with an overview over systemd's coredump handlingLennart Poettering2023-03-301-0/+147
| |
* | basic: update the Arch tuples for LoongArchXiaotian Wu2023-03-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | After this commit[1], LoongArch now uses these Multiarch specs: - Double float: loongarch64-linux-gnu - Single float: loongarch64-linux-gnuf32 - Soft float: loongarch64-linux-gnusf You can visit here[2] to view the full documentation. [1]: https://github.com/loongson/LoongArch-Documentation/commit/55dbaadaaa90b5f5d08a74d96b866af42c8c3c82 [2]: https://loongson.github.io/LoongArch-Documentation/LoongArch-toolchain-conventions-EN.html
* | Merge pull request #26883 from yuwata/rm-rfZbigniew Jędrzejewski-Szmek2023-03-302-32/+193
|\ \ | | | | | | rm-rf: also chmod directory if cannot be opened
| * | test: add more testcases for rm_rf()Yu Watanabe2023-03-251-8/+56
| | |
| * | rm-rf: also chmod() directory if it cannot be openedYu Watanabe2023-03-251-18/+131
| | | | | | | | | | | | Otherwise, directory with zero access mode cannot be removed.
| * | rm-rf: mask file mode with 07777 when passed to chmod()Yu Watanabe2023-03-251-4/+4
| | | | | | | | | | | | No functional change hopefully, just for safety.
| * | rm-rf: fix errno handlingYu Watanabe2023-03-251-4/+4
| | |
* | | tmpfiles: Try to take a BSD lock on files as wellDaan De Meyer2023-03-304-18/+27
| | | | | | | | | | | | | | | | | | Similar to what we do for directories, just before we remove a file, let's try to take a BSD lock on it. If that fails, skip removing the file.
* | | Merge pull request #27064 from DaanDeMeyer/chase-fixesDaan De Meyer2023-03-302-105/+26
|\ \ \ | | | | | | | | Chase fixes
| * | | chase: Simplify chase_and_open() and chase_and_openat()Daan De Meyer2023-03-301-14/+12
| | | | | | | | | | | | | | | | | | | | xopenat() now calls fd_reopen() if an empty path is specified, so let's make use of that to simplify the chase open helpers.
| * | | fs-util: Strip O_NOFOLLOW in xopenat() when calling fd_reopen()Daan De Meyer2023-03-301-1/+1
| | | | | | | | | | | | | | | | | | | | We definitely want to follow symlinks when calling fd_reopen() so let's strip O_NOFOLLOW when we call it from xopenat().
| * | | chase: Fix error code checkDaan De Meyer2023-03-301-2/+2
| | | |
| * | | chase: Fix formattingDaan De Meyer2023-03-301-90/+13
| | | |
* | | | Merge pull request #27063 from yuwata/chase-gracefulDaan De Meyer2023-03-301-3/+17
|\ \ \ \ | | | | | | | | | | chase: gracefully drop CHASE_AT_RESOLVE_IN_ROOT when AT_FDCWD is specified
| * | | | chase: add CHASE_AT_RESOLVE_IN_ROOT only when it is necessaryYu Watanabe2023-03-301-3/+3
| | | | |
| * | | | chase: drop CHASE_AT_RESOLVE_IN_ROOT when AT_FDCWD or root dir fd is specifiedYu Watanabe2023-03-301-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | If we get AT_FDCWD or root dir fd, we always resolve symlinks relative to the host's root. Hence, the flag is meaningless.
* | | | | Merge pull request #27041 from poettering/fdstore-dumpDaan De Meyer2023-03-3030-80/+628
|\ \ \ \ \ | | | | | | | | | | | | add ability to show contents of service fdstore + teach systemd-notify passing fds into the fdstore
| * | | | | update TODOLennart Poettering2023-03-291-4/+0
| | | | | |
| * | | | | test: add test case for fdstore dumping logic, and systemd-notify --fd=Lennart Poettering2023-03-291-0/+27
| | | | | |
| * | | | | notify: add support for sending fds with notification messagesLennart Poettering2023-03-292-4/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This exposes the fd passing we support via sd_pid_notify_with_fds() also via the command line tool systemd-notify.
| * | | | | fdset: add new fdset_consume() helperLennart Poettering2023-03-293-3/+15
| | | | | |
| * | | | | fdset: add new helper to convert an fdset to an arrayLennart Poettering2023-03-292-11/+32
| | | | | |
| * | | | | fdset: minor modernizationsLennart Poettering2023-03-291-56/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Let's use more _cleanup_ expressions. Various other modernizations. No actual code changes, except for maybe a conversion to use heap memory when generating an array of fds, instead of stack as before. Given that fdstores are typically user controlled, that should be a wise idea.
| * | | | | analyze: add new fdstore verbLennart Poettering2023-03-296-4/+169
| | | | | |
| * | | | | pid1: add DumpFileDescriptorStore() bus call that returns fdstore content infoLennart Poettering2023-03-297-0/+119
| | | | | |
| * | | | | format-table: add new cell type for displaying major/minor devnumsLennart Poettering2023-03-292-0/+38
| | | | | |
| * | | | | format-table: add inode type cell typeLennart Poettering2023-03-292-1/+14
| | | | | |