| Commit message (Collapse) | Author | Files | Lines |
|
|
|
Also add mac_smack_apply_at() as its a requirement for
renameat_and_apply_smack_floor_label().
|
|
|
|
|
|
|
|
No functional change, as currently the function is always called with
non-NULL argument. Just a preparation for #26048 or #25839.
|
|
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.
|
|
systemctl disable some.service fails to acquire interactive permission
because the DisableUnitFilesWithFlagsAndInstallInto method isn't permitted
|
|
|
|
Then, the two error handlings becomes consistent with the one in
execute_directories().
|
|
This is useful for debugging issues like #26474.
|
|
There is a double free of unit_name when an instance is used, causing
systemctl --user edit service@instance to abort.
|
|
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
|
|
Fixes a bug introduced by da4fd28871227d23d4719e30da03af5a71f47e5a.
|
|
|
|
|
|
Follow-up for a2b052b29f8bc141e94a4af95d1653a38a57eaeb.
|
|
|
|
|
|
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.
|
|
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)
|
|
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.
|
|
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.
|
|
|
|
|
|
Let's clean this up and export this always, so that we can later call
when we are under memory pressure.
|
|
|
|
Let's add a proper helper for querying the number of threads in a
process.
|
|
As suggested here:
https://github.com/systemd/systemd/pull/26450#pullrequestreview-1302922404
|
|
|
|
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.
|
|
|
|
(as side-effect this also tests the new systemd-notify --exec switch)
|
|
|
|
This is useful in tests, so that we can first send a READY message and
then continue doing something else without changing PID.
|
|
|
|
|
|
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.
|
|
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.
|
|
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.
|
|
Follow-up for 504d0acf61c8472bc93c2a927e858074873b2eaf.
The function may be called with non-NULL salt and salt_size == 0.
|
|
|
|
|
|
|
|
Otherwise, several error logs may not be shown.
|
|
|
|
|
|
|
|
|
|
Follow-up for a4d2461c46f40c9ae5002a2aea35b35ccb60ef9c.
|