diff options
author | David Herrmann <dh.herrmann@gmail.com> | 2015-07-16 15:14:43 +0200 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-03-14 10:06:54 +0100 |
commit | 0a763769282e494dc3c4ef192f3e763931179817 (patch) | |
tree | 7593289c8e0bb88c639e81bdacb2c3a0f8a4908c /src/shared | |
parent | acfcd596701fed76897fb64396ac6a123576c6e1 (diff) |
bus-proxy: never pass on unmatched broadcasts
The lovely libvirtd goes into crazy mode if it receives broadcasts that
it didn't subscribe to. With bus-proxyd, this might happen in 2 cases:
1) The kernel passes us an unmatched signal due to a false-positive
bloom-match.
2) We generate NameOwnerChanged/NameAcquired/NameLost locally even
though the peer didn't subscribe to it.
dbus-daemon is reliable in what signals it passes on. So make sure we
follow that style. Never ever send a signal to a local peer if it doesn't
match an installed filter of that peer.
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/blkid-util.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/shared/blkid-util.h b/src/shared/blkid-util.h index 33d18cb39..b596daddf 100644 --- a/src/shared/blkid-util.h +++ b/src/shared/blkid-util.h @@ -1,5 +1,7 @@ /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ +#pragma once + /*** This file is part of systemd. @@ -19,19 +21,17 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#pragma once - -#include "sd-event.h" -#include "util.h" - -typedef enum { DKR_PULL_V1, DKR_PULL_V2 } DkrPullVersion; -typedef struct DkrPull DkrPull; +#include "sd-bus.h" +#include "proxy.h" -typedef void (*DkrPullFinished)(DkrPull *pull, int error, void *userdata); +int synthetic_driver_send(sd_bus *b, sd_bus_message *m); -int dkr_pull_new(DkrPull **pull, sd_event *event, const char *index_url, const char *image_root, DkrPullFinished on_finished, void *userdata); -DkrPull* dkr_pull_unref(DkrPull *pull); +int synthetic_reply_method_return(sd_bus_message *call, const char *types, ...); +int synthetic_reply_method_return_strv(sd_bus_message *call, char **l); -DEFINE_TRIVIAL_CLEANUP_FUNC(DkrPull*, dkr_pull_unref); +int synthetic_reply_method_error(sd_bus_message *call, const sd_bus_error *e); +int synthetic_reply_method_errorf(sd_bus_message *call, const char *name, const char *format, ...) _sd_printf_(3, 4); +int synthetic_reply_method_errno(sd_bus_message *call, int error, const sd_bus_error *p); +int synthetic_reply_method_errnof(sd_bus_message *call, int error, const char *format, ...) _sd_printf_(3, 4); -int dkr_pull_start(DkrPull *pull, const char *name, const char *tag, const char *local, bool force_local, DkrPullVersion version); +int synthesize_name_acquired(Proxy *p, sd_bus *a, sd_bus *b, sd_bus_message *m); |