1
0
mirror of https://github.com/systemd/systemd synced 2026-03-27 17:24:51 +01:00

Compare commits

...

2 Commits

Author SHA1 Message Date
Luca Boccassi
3f1487f5a0 analyze: ignore dependencies with security --offline
We don't care about validating dependencies here, the security verb is
only checking the unit(s) under test.
2021-09-08 19:46:57 +01:00
Michal Sekletar
9f6ef46781 sd-event: take ref on event loop object before dispatching event sources
Idea is that all public APIs should take reference on objects that get
exposed to user-provided callbacks. We take the reference as a
protection from callbacks dropping it. We used to do this also here in
sd_event_loop(). However, in cleanup portion of f814c871e6 this was
accidentally dropped.
2021-09-09 01:15:57 +09:00
2 changed files with 2 additions and 1 deletions

View File

@ -2647,6 +2647,7 @@ static int offline_security_checks(char **filenames,
const ManagerTestRunFlags flags =
MANAGER_TEST_RUN_MINIMAL |
MANAGER_TEST_RUN_ENV_GENERATORS |
MANAGER_TEST_RUN_IGNORE_DEPENDENCIES |
run_generators * MANAGER_TEST_RUN_GENERATORS;
_cleanup_(manager_freep) Manager *m = NULL;

View File

@ -4154,7 +4154,7 @@ _public_ int sd_event_loop(sd_event *e) {
assert_return(!event_pid_changed(e), -ECHILD);
assert_return(e->state == SD_EVENT_INITIAL, -EBUSY);
_unused_ _cleanup_(sd_event_unrefp) sd_event *ref = NULL;
_unused_ _cleanup_(sd_event_unrefp) sd_event *ref = sd_event_ref(e);
while (e->state != SD_EVENT_FINISHED) {
r = sd_event_run(e, UINT64_MAX);