summaryrefslogtreecommitdiffstats
path: root/.semaphore/semaphore.yml (unfollow)
Commit message (Collapse)AuthorFilesLines
2023-02-20repart: Add ExcludeFiles= optionDaan De Meyer3-39/+126
2023-02-20smack-util: Add renameat_and_apply_smack_floor_label()Daan De Meyer2-13/+19
Also add mac_smack_apply_at() as its a requirement for renameat_and_apply_smack_floor_label().
2023-02-20tmpfile-util-label: Add fopen_temporary_at_label()Daan De Meyer2-4/+10
2023-02-20copy: Add copy_file_at()Daan De Meyer2-8/+18
2023-02-20env-file: Add write_env_file_at()Daan De Meyer2-5/+10
2023-02-20udev-node: make stack_directory_read_one() accept NULL for devnodeYu Watanabe1-2/+11
No functional change, as currently the function is always called with non-NULL argument. Just a preparation for #26048 or #25839.
2023-02-20udev-node: drop unnecessary initializationYu Watanabe1-1/+1
The priority of device node symlink can be negative. So the initialization is confusing. Fortunately, this changes no functionality, as we only compare the priorities of symlinks only when we parsed at least one device node and its priority.
2023-02-20core: permit sending augmented enable/disable methodsRonan Pigott1-0/+12
systemctl disable some.service fails to acquire interactive permission because the DisableUnitFilesWithFlagsAndInstallInto method isn't permitted
2023-02-19exec-util: use TAKE_FD()Yu Watanabe1-4/+2
2023-02-19exec-util: propagate error in wait_for_terminate_and_check()Yu Watanabe1-4/+5
Then, the two error handlings becomes consistent with the one in execute_directories().
2023-02-19process-util: show requested process name in the logYu Watanabe1-1/+1
This is useful for debugging issues like #26474.
2023-02-18systemctl: edit: fix double free of instanced nameRonan Pigott1-3/+3
There is a double free of unit_name when an instance is used, causing systemctl --user edit service@instance to abort.
2023-02-18journalctl: fix output when --lines is used with --grepMike Yuan2-2/+11
Previously, we skip the entries before arg_lines unconditionally, which doesn't behave correctly when used with --grep. After this commit, when a pattern is specified, we don't skip the entries early, but rely on the count of the lines shown to tell us when to stop. To achieve that we would have to search backwards instead. Fixes #25147
2023-02-18loop-util: fix error condition and return valueYu Watanabe1-2/+2
Fixes a bug introduced by da4fd28871227d23d4719e30da03af5a71f47e5a.
2023-02-18shared: move psi-util.[ch] to basic/ so that we can use it in sd-eventLennart Poettering4-1/+1
2023-02-18util: move mallinfo compat glue from selinux code into generic codeLennart Poettering2-21/+25
2023-02-17hashmap: fix build with valgrindYu Watanabe1-1/+1
Follow-up for a2b052b29f8bc141e94a4af95d1653a38a57eaeb.
2023-02-17Correct journal misspellWinterhuman1-1/+1
2023-02-17tests: add test for mempool logicLennart Poettering2-0/+94
2023-02-17mempool: rework mempool_cleanup() to only release freed tilesLennart Poettering4-12/+92
This substantially reworks mempool_cleanup() so that it releases pools with all freed tiles only, but keeps all pools with still-allocated tiles around. This is more correct, as the previous implementation just released all pools regardless if anything was still used or not. This would make valgrind shut up but would just hide memory leaks altogether. Moreover if called during regular runtime of a program would result in bad memory accesses all over. Hence, let's add a proper implementation and only trim pools we really know are empty. This way we can safely call these functions later, when under memory pressure, at any time.
2023-02-17mempool: make mempool_free_tile() return NULLLennart Poettering2-3/+10
To match how we usually do this current allocation code. (Also, make it accept a NULL pointer, also in order to match behaviour in the rest of our codebase)
2023-02-17mempool: introduce new helper pool_ptr()Lennart Poettering1-1/+5
This new helper returns the beginning of the usable area of the pool object. For now this is only used once, a later commit will use it more.
2023-02-17tpm2: simplify tpm2_seal() blob creationDan Streetman1-26/+14
TPM2 marshalling will never increase the total size, only possibly decrease. There is no need for checking for insufficient size if the buffer size is set to the sizeof both objects to be marshalled.
2023-02-17mempool: rename local variable to match current coding styleLennart Poettering1-4/+5
2023-02-17mempool: use size_t for all memory object sizes and countsLennart Poettering1-1/+1
2023-02-17hashmap: expose helper for releasing memory pools independently of valgrindLennart Poettering4-18/+20
Let's clean this up and export this always, so that we can later call when we are under memory pressure.
2023-02-17dissect-image: Return mount point fd if requestedDaan De Meyer13-1/+23
2023-02-17process-util: add helper get_process_threads()Lennart Poettering6-9/+86
Let's add a proper helper for querying the number of threads in a process.
2023-02-17sync-util: port fsync_directory_of_file() to fd_is_opath()Lennart Poettering1-10/+6
As suggested here: https://github.com/systemd/systemd/pull/26450#pullrequestreview-1302922404
2023-02-17socket-util: make connect_unix_path() work with a NULL pathLennart Poettering1-28/+36
2023-02-17sd-event: allocate event source objects with the actually needed sizeLennart Poettering1-9/+33
Currently we allocate fixed-size memory for event sources: the largest any of the event source type needs. Discrepancy in the sizes needed for the various event sources is quite major however: it's 144 bytes on x86_64, i.e. more than two cache lines. hence, let's be a tiny bit more careful, and allocate exactly as much as we need, but not more.
2023-02-17macro: add macro for determining size of struct with trailing unionLennart Poettering1-0/+1
2023-02-17test: add test for new "systemctl --kill-value=" functionalityLennart Poettering4-0/+54
(as side-effect this also tests the new systemd-notify --exec switch)
2023-02-17man: document new --exec switch for systemd-notifyLennart Poettering1-0/+17
2023-02-17notify: add new --exec switch for chaining other commands to systemd-notifyLennart Poettering1-3/+56
This is useful in tests, so that we can first send a READY message and then continue doing something else without changing PID.
2023-02-17strv: add strv_copy_n() helper for copying part of a n strvLennart Poettering3-3/+52
2023-02-17man: document new --kill-value= switch to systemctlLennart Poettering1-34/+41
2023-02-17systemctl: add --kill-value= argument to systemctlLennart Poettering3-11/+50
This allows accompanying a signal with a value (as supported for Linux Realtime signals). This is particularly useful as it allows us to do stuff like this: systemctl kill --kill-whom=main --kill-value=0x300 systemd-journald In order to ask journald to flush its allocation caches and compact memory.
2023-02-17pid1: add a new D-Bus method for enquing POSIX signals with values to unit ↵Lennart Poettering13-75/+168
processes This augments the existing KillUnit() + Kill() methods with QueueSignalUnit() + QueueSignal(), which are what sigqueue() is to kill(). This is useful for sending our new SIGRTMIN+18 control signals to system services.
2023-02-17test-execute: also mount tmpfs on /dev/shmYu Watanabe1-1/+1
Otherwise, if /dev/shm has a directory that cannot be accessible by unprivileged user, then we cannot pick a dynamic user, and test service may fail with unexpected error code: --- Failed to enter shared memory directory /dev/shm/systemd-watch-bind-BqAGlN: Permission denied exec-dynamicuser-supplementarygroups.service: Failed to update dynamic user credentials: Device or resource busy exec-dynamicuser-supplementarygroups.service: Failed at step USER spawning /bin/sh: Device or resource busy src/test/test-execute.c:885:test_exec_dynamicuser: exec-dynamicuser-supplementarygroups.service: can_unshare=no: exit status 217, expected 216 --- Follow-up for 4e032f654b94c2544ccf937209303766dfa66c24.
2023-02-17cryptsetup: check the existence of salt by salt_size > 0Yu Watanabe1-1/+1
Follow-up for 504d0acf61c8472bc93c2a927e858074873b2eaf. The function may be called with non-NULL salt and salt_size == 0.
2023-02-17test: add tests for xsetxattr()Yu Watanabe1-0/+47
2023-02-17test: use mkdtemp_open()Yu Watanabe1-15/+8
2023-02-17activate: use _cleanup_close_ attributeYu Watanabe1-5/+9
2023-02-17activate: use log_set_open_when_needed()Yu Watanabe1-4/+6
Otherwise, several error logs may not be shown.
2023-02-17activate: fix typoYu Watanabe1-4/+2
2023-02-17activate: use DEFINE_MAIN_FUNC() macroYu Watanabe1-14/+12
2023-02-17journalctl: fix fd leakYu Watanabe1-5/+4
2023-02-17journalctl: use DEFINE_MAIN_FUNCTION() macroYu Watanabe1-170/+110
2023-02-16xattr-util: check if fd has O_PATH and do not try setxattr() twiceYu Watanabe1-21/+16
Follow-up for a4d2461c46f40c9ae5002a2aea35b35ccb60ef9c.