| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
This is preparation for #28891, which adds a bunch more helpers around
"struct iovec", at which point this really deserves its own .c/.h file.
The idea is that we sooner or later can consider "struct iovec" as an
entirely generic mechanism to reference some binary blob, and is the
go-to type for this purpose whenever we need one.
|
|
|
|
|
|
| |
Before the split, it made sense to assert, as checks were on setup.
But now these come from deserialization, and the fuzzer hits the
asserts, so simply return an error instead.
|
|
|
|
|
|
|
|
|
|
| |
We have a test where we compare the results from nftw() and our own
resurce_dit_at(). nftw() skips a dangling symlink when running under mkosi and
the test fails. I don't understand why nftw() does that, but in our code we
don't need to test and care about the details of nftw(), which we don't use,
outside of the one test, so let's just skip symlinks in the test.
Closes #29603.
|
|\
| |
| | |
test: slightly improve sd-executor's coverage
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
As reproducing it is actually pretty easy, with the benefit of hindsight:
~# systemd-run -P -p MountImages="/this/should/definitely/not/exist.img:/run/img2\:3:nosuid" false
Running as unit: run-u42.service
free(): double free detected in tcache 2
|
| |
| |
| |
| | |
To give the fuzzer a nice head start.
|
| |
| |
| |
| | |
That way compiler can put it in an immutable section
|
|\ \
| | |
| | | |
mount tunnel: use PidRef
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
Follow-ups for recent changes to core/
|
| | | |
| | | |
| | | |
| | | | |
Follow-up for becdfcb9f1cb555c50dcfe51894cb0b155f7f01e
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
These calls can fail not only due to OOM.
|
| |/ / |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
With coverage builds we disable Protect{Home,System}= via a service.d
dropin in /etc, which has, unfortunately, higher priority than our
transient systemd-run stuff. Let's just skip the affected tests in that
case instead of making the test setup even more complicated.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
As requested in https://github.com/systemd/systemd/pull/27867#pullrequestreview-1567161854.
/dev/console, /dev/tty0, and /dev/ttyN are "different" device nodes
that may point to a single underlying device. We want to use a single
lock so that we don't get a race if different writers are using a different
device path, so let's just always lock around /dev/console.
This effectively makes the locking less granular.
Fixup for a0043bfa51281c2374878e2a98cf2a3ee10fd92c.
Fixes https://github.com/systemd/systemd/issues/28721.
Maybe fixes https://github.com/systemd/systemd/issues/28778 and
https://github.com/systemd/systemd/issues/28634.
|
| | |
| | |
| | |
| | |
| | | |
Also, run the coredump forwarding test only if user xattrs are
supported.
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When building with mkosi I would get the following:
[1/477] Generating version.h with a custom command
fatal: detected dubious ownership in repository at '/work/src'
To add an exception for this directory, call:
git config --global --add safe.directory /work/src
and then the tag would be generated as 'v254-'. This is obviously some problem
with the setup, but we should handle this gracefully. Let's fall back to 'v254'
instead.
In the case where we have a repo but no tags, use --dirty=^ too, as in the case
with tags.
I tested four cases:
- normal checkout
- checkout with .git removed
- checkout with .git chowned to root
- checkout wiht all tags removed
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This list is owned by ExecContext, which is cleaned up when sd-executor
fails, but it is also cleaned up when namespace setup exits, so we get
a double free.
Fixes https://github.com/systemd/systemd/issues/29610
Follow-up for bb5232b6a3
|
|\ \
| | |
| | | |
efi: drop duplicate initialization to 0
|
| | |
| | |
| | |
| | | |
Keeping this separate to make it easy to revert if it's ever needed again.
|
| | |
| | |
| | |
| | |
| | | |
In all three cases we immediately overwrite the whole field anyway,
so the call to memzero is not needed.
|
| | |
| | |
| | |
| | |
| | |
| | | |
Follow-up for 4d1b2df199227ed4b934bbcb054364e92e93a1a6.
Fixes CID#1522888.
|
|\ \ \
| | | |
| | | | |
systemctl: is-failed: check if system is degraded when no unit given
|
| | | |
| | | |
| | | |
| | | | |
Closes #3335
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
varlink_collect is meant to be used when the client is willing to wait for the reply from the varlink method, much like varlink_call.
However, unlike varlink_call, it allows the client to collect all "more" replies that may be sent by method before the "final" reply is enqueued.
It aggregates all of these replies into a json variant array that it returns to the client.
|
| |_|/
|/| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Make sure we don't log anything when running in "fuzzing" mode. Also,
when at it, unify the setup logic into a helper, pretty similar to
the test_setup_logging() one.
Addresses:
- https://github.com/systemd/systemd/pull/29558#pullrequestreview-1676060607
- https://github.com/systemd/systemd/pull/29558#discussion_r1358940663
|
|\ \ \
| |/ /
|/| | |
test: add a fuzzer for exec_{serialize,deserialize}_invocation()
|
| | | |
|
|/ / |
|
|\ \
| | |
| | | |
more pidfdification
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
via PidRef
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
pidref_is_alive()
Let's no eat up errors, but propagate unexpected ones.
|
| | |
| | |
| | |
| | | |
pidref_get_uid()
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This simply checks if the specified PidRef refers to the process we are
running in.
(In case you wonder why this is not a static inline: to avoid cyclic
header inclusion problems between pidref.h + process-util.h)
|
| | |
| | |
| | |
| | | |
pid_get_comm()
|
| | |
| | |
| | |
| | |
| | | |
This way we can be sure to provide an atomic view of the process tree of
a unit.
|
| | | |
|
| | | |
|
| | | |
|