Compare commits
16 Commits
35f47caf8d
...
089a01fe89
Author | SHA1 | Date |
---|---|---|
![]() |
089a01fe89 | |
![]() |
defd5060d6 | |
![]() |
ae04218383 | |
![]() |
2a6ca54154 | |
![]() |
39dd06dbc4 | |
![]() |
a30684b983 | |
![]() |
8e7ef6abb8 | |
![]() |
bdf4f200fd | |
![]() |
4cbc25ab4c | |
![]() |
885001ed5d | |
![]() |
2d4c4d9e10 | |
![]() |
828513ee3e | |
![]() |
b0a2d49b61 | |
![]() |
f6a2a9ba93 | |
![]() |
1785961660 | |
![]() |
aeaeeb0d24 |
3
NEWS
3
NEWS
|
@ -96,6 +96,9 @@ CHANGES WITH 258 in spe:
|
|||
continue to work, update to xf86-input-evdev >= 2.11.0 and
|
||||
xf86-input-libinput >= 1.5.0 before updating to systemd >= 258.
|
||||
|
||||
* The meson option 'integration-tests' has been deprecated, and will be
|
||||
removed in a future release.
|
||||
|
||||
— <place>, <date>
|
||||
|
||||
CHANGES WITH 257:
|
||||
|
|
|
@ -383,6 +383,7 @@ evdev:name:gpio-keys:phys:gpio-keys/input0:ev:3:dmi:bvn*:bvr*:bd*:svncube:pni1-T
|
|||
###########################################################
|
||||
|
||||
evdev:atkbd:dmi:bvn*:bvr*:bd*:svnDell*:pn*:*
|
||||
KEYBOARD_KEY_68=prog2 # G-Mode (Dell-specific)
|
||||
KEYBOARD_KEY_81=playpause # Play/Pause
|
||||
KEYBOARD_KEY_82=stopcd # Stop
|
||||
KEYBOARD_KEY_83=previoussong # Previous song
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
<refsynopsisdiv>
|
||||
<programlisting>
|
||||
Host unix/* vsock/* vsock-mux/*
|
||||
Host unix/* unix,* vsock/* vsock,* vsock-mux/* vsock-mux,*
|
||||
ProxyCommand /usr/lib/systemd/systemd-ssh-proxy %h %p
|
||||
ProxyUseFdpass yes
|
||||
</programlisting>
|
||||
|
@ -46,7 +46,7 @@ Host unix/* vsock/* vsock-mux/*
|
|||
configuration fragment like the following:</para>
|
||||
|
||||
<programlisting>
|
||||
Host unix/* vsock/* vsock-mux/*
|
||||
Host unix/* unix,* vsock/* vsock,* vsock-mux/* vsock-mux,*
|
||||
ProxyCommand /usr/lib/systemd/systemd-ssh-proxy %h %p
|
||||
ProxyUseFdpass yes
|
||||
CheckHostIP no
|
||||
|
@ -69,7 +69,9 @@ Host .host
|
|||
direct <constant>AF_VSOCK</constant> communication between the host and guests, and provide their own
|
||||
multiplexer over <constant>AF_UNIX</constant> sockets. See
|
||||
<ulink url="https://github.com/cloud-hypervisor/cloud-hypervisor/blob/main/docs/vsock.md">cloud-hypervisor VSOCK support</ulink>
|
||||
and <ulink url="https://github.com/firecracker-microvm/firecracker/blob/main/docs/vsock.md">Using the Firecracker Virtio-vsock Device</ulink>.</para>
|
||||
and <ulink url="https://github.com/firecracker-microvm/firecracker/blob/main/docs/vsock.md">Using the Firecracker Virtio-vsock Device</ulink>.
|
||||
Note that <literal>,</literal> can be used as a separator instead of <literal>/</literal> to be
|
||||
compatible with tools like <literal>scp</literal> and <literal>rsync</literal>.</para>
|
||||
|
||||
<para>Moreover, connecting to <literal>.host</literal> will connect to the local host via SSH, without
|
||||
involving networking.</para>
|
||||
|
@ -113,6 +115,12 @@ Host .host
|
|||
|
||||
<programlisting>ssh unix/run/ssh-unix-local/socket</programlisting>
|
||||
</example>
|
||||
|
||||
<example>
|
||||
<title>Copy local 'foo' file to a local VM with CID 1348</title>
|
||||
|
||||
<programlisting>scp foo vsock,1348:</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
|
|
|
@ -912,24 +912,20 @@ static void hashmap_free_no_clear(HashmapBase *h) {
|
|||
free(h);
|
||||
}
|
||||
|
||||
HashmapBase* _hashmap_free(HashmapBase *h, free_func_t default_free_key, free_func_t default_free_value) {
|
||||
HashmapBase* _hashmap_free(HashmapBase *h) {
|
||||
if (h) {
|
||||
_hashmap_clear(h, default_free_key, default_free_value);
|
||||
_hashmap_clear(h);
|
||||
hashmap_free_no_clear(h);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void _hashmap_clear(HashmapBase *h, free_func_t default_free_key, free_func_t default_free_value) {
|
||||
free_func_t free_key, free_value;
|
||||
void _hashmap_clear(HashmapBase *h) {
|
||||
if (!h)
|
||||
return;
|
||||
|
||||
free_key = h->hash_ops->free_key ?: default_free_key;
|
||||
free_value = h->hash_ops->free_value ?: default_free_value;
|
||||
|
||||
if (free_key || free_value) {
|
||||
if (h->hash_ops->free_key || h->hash_ops->free_value) {
|
||||
|
||||
/* If destructor calls are defined, let's destroy things defensively: let's take the item out of the
|
||||
* hash table, and only then call the destructor functions. If these destructors then try to unregister
|
||||
|
@ -941,11 +937,11 @@ void _hashmap_clear(HashmapBase *h, free_func_t default_free_key, free_func_t de
|
|||
|
||||
v = _hashmap_first_key_and_value(h, true, &k);
|
||||
|
||||
if (free_key)
|
||||
free_key(k);
|
||||
if (h->hash_ops->free_key)
|
||||
h->hash_ops->free_key(k);
|
||||
|
||||
if (free_value)
|
||||
free_value(v);
|
||||
if (h->hash_ops->free_value)
|
||||
h->hash_ops->free_value(v);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1780,7 +1776,7 @@ HashmapBase* _hashmap_copy(HashmapBase *h HASHMAP_DEBUG_PARAMS) {
|
|||
}
|
||||
|
||||
if (r < 0)
|
||||
return _hashmap_free(copy, NULL, NULL);
|
||||
return _hashmap_free(copy);
|
||||
|
||||
return copy;
|
||||
}
|
||||
|
|
|
@ -93,12 +93,12 @@ OrderedHashmap* _ordered_hashmap_new(const struct hash_ops *hash_ops HASHMAP_DE
|
|||
#define ordered_hashmap_free_and_replace(a, b) \
|
||||
free_and_replace_full(a, b, ordered_hashmap_free)
|
||||
|
||||
HashmapBase* _hashmap_free(HashmapBase *h, free_func_t default_free_key, free_func_t default_free_value);
|
||||
HashmapBase* _hashmap_free(HashmapBase *h);
|
||||
static inline Hashmap* hashmap_free(Hashmap *h) {
|
||||
return (void*) _hashmap_free(HASHMAP_BASE(h), NULL, NULL);
|
||||
return (void*) _hashmap_free(HASHMAP_BASE(h));
|
||||
}
|
||||
static inline OrderedHashmap* ordered_hashmap_free(OrderedHashmap *h) {
|
||||
return (void*) _hashmap_free(HASHMAP_BASE(h), NULL, NULL);
|
||||
return (void*) _hashmap_free(HASHMAP_BASE(h));
|
||||
}
|
||||
|
||||
IteratedCache* iterated_cache_free(IteratedCache *cache);
|
||||
|
@ -266,12 +266,12 @@ static inline bool ordered_hashmap_iterate(OrderedHashmap *h, Iterator *i, void
|
|||
return _hashmap_iterate(HASHMAP_BASE(h), i, value, key);
|
||||
}
|
||||
|
||||
void _hashmap_clear(HashmapBase *h, free_func_t default_free_key, free_func_t default_free_value);
|
||||
void _hashmap_clear(HashmapBase *h);
|
||||
static inline void hashmap_clear(Hashmap *h) {
|
||||
_hashmap_clear(HASHMAP_BASE(h), NULL, NULL);
|
||||
_hashmap_clear(HASHMAP_BASE(h));
|
||||
}
|
||||
static inline void ordered_hashmap_clear(OrderedHashmap *h) {
|
||||
_hashmap_clear(HASHMAP_BASE(h), NULL, NULL);
|
||||
_hashmap_clear(HASHMAP_BASE(h));
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -331,27 +331,6 @@ static inline void *ordered_hashmap_first_key(OrderedHashmap *h) {
|
|||
return _hashmap_first_key(HASHMAP_BASE(h), false);
|
||||
}
|
||||
|
||||
#define hashmap_clear_with_destructor(h, f) \
|
||||
({ \
|
||||
Hashmap *_h = (h); \
|
||||
void *_item; \
|
||||
while ((_item = hashmap_steal_first(_h))) \
|
||||
f(_item); \
|
||||
_h; \
|
||||
})
|
||||
#define hashmap_free_with_destructor(h, f) \
|
||||
hashmap_free(hashmap_clear_with_destructor(h, f))
|
||||
#define ordered_hashmap_clear_with_destructor(h, f) \
|
||||
({ \
|
||||
OrderedHashmap *_h = (h); \
|
||||
void *_item; \
|
||||
while ((_item = ordered_hashmap_steal_first(_h))) \
|
||||
f(_item); \
|
||||
_h; \
|
||||
})
|
||||
#define ordered_hashmap_free_with_destructor(h, f) \
|
||||
ordered_hashmap_free(ordered_hashmap_clear_with_destructor(h, f))
|
||||
|
||||
/* no hashmap_next */
|
||||
void* ordered_hashmap_next(OrderedHashmap *h, const void *key);
|
||||
|
||||
|
|
|
@ -83,17 +83,6 @@ void ordered_set_print(FILE *f, const char *field, OrderedSet *s);
|
|||
#define ORDERED_SET_FOREACH(e, s) \
|
||||
_ORDERED_SET_FOREACH(e, s, UNIQ_T(i, UNIQ))
|
||||
|
||||
#define ordered_set_clear_with_destructor(s, f) \
|
||||
({ \
|
||||
OrderedSet *_s = (s); \
|
||||
void *_item; \
|
||||
while ((_item = ordered_set_steal_first(_s))) \
|
||||
f(_item); \
|
||||
_s; \
|
||||
})
|
||||
#define ordered_set_free_with_destructor(s, f) \
|
||||
ordered_set_free(ordered_set_clear_with_destructor(s, f))
|
||||
|
||||
DEFINE_TRIVIAL_CLEANUP_FUNC(OrderedSet*, ordered_set_free);
|
||||
|
||||
#define _cleanup_ordered_set_free_ _cleanup_(ordered_set_freep)
|
||||
|
|
|
@ -12,15 +12,9 @@ Set* _set_new(const struct hash_ops *hash_ops HASHMAP_DEBUG_PARAMS);
|
|||
#define set_new(ops) _set_new(ops HASHMAP_DEBUG_SRC_ARGS)
|
||||
|
||||
static inline Set* set_free(Set *s) {
|
||||
return (Set*) _hashmap_free(HASHMAP_BASE(s), NULL, NULL);
|
||||
return (Set*) _hashmap_free(HASHMAP_BASE(s));
|
||||
}
|
||||
|
||||
static inline Set* set_free_free(Set *s) {
|
||||
return (Set*) _hashmap_free(HASHMAP_BASE(s), free, NULL);
|
||||
}
|
||||
|
||||
/* no set_free_free_free */
|
||||
|
||||
#define set_copy(s) ((Set*) _hashmap_copy(HASHMAP_BASE(s) HASHMAP_DEBUG_SRC_ARGS))
|
||||
|
||||
int _set_ensure_allocated(Set **s, const struct hash_ops *hash_ops HASHMAP_DEBUG_PARAMS);
|
||||
|
@ -77,30 +71,13 @@ static inline bool set_iterate(const Set *s, Iterator *i, void **value) {
|
|||
}
|
||||
|
||||
static inline void set_clear(Set *s) {
|
||||
_hashmap_clear(HASHMAP_BASE(s), NULL, NULL);
|
||||
_hashmap_clear(HASHMAP_BASE(s));
|
||||
}
|
||||
|
||||
static inline void set_clear_free(Set *s) {
|
||||
_hashmap_clear(HASHMAP_BASE(s), free, NULL);
|
||||
}
|
||||
|
||||
/* no set_clear_free_free */
|
||||
|
||||
static inline void *set_steal_first(Set *s) {
|
||||
return _hashmap_first_key_and_value(HASHMAP_BASE(s), true, NULL);
|
||||
}
|
||||
|
||||
#define set_clear_with_destructor(s, f) \
|
||||
({ \
|
||||
Set *_s = (s); \
|
||||
void *_item; \
|
||||
while ((_item = set_steal_first(_s))) \
|
||||
f(_item); \
|
||||
_s; \
|
||||
})
|
||||
#define set_free_with_destructor(s, f) \
|
||||
set_free(set_clear_with_destructor(s, f))
|
||||
|
||||
/* no set_steal_first_key */
|
||||
/* no set_first_key */
|
||||
|
||||
|
@ -145,10 +122,8 @@ int set_put_strsplit(Set *s, const char *v, const char *separators, ExtractFlags
|
|||
for (; ({ e = set_first(s); assert_se(!e || set_move_one(d, s, e) >= 0); e; }); )
|
||||
|
||||
DEFINE_TRIVIAL_CLEANUP_FUNC(Set*, set_free);
|
||||
DEFINE_TRIVIAL_CLEANUP_FUNC(Set*, set_free_free);
|
||||
|
||||
#define _cleanup_set_free_ _cleanup_(set_freep)
|
||||
#define _cleanup_set_free_free_ _cleanup_(set_free_freep)
|
||||
|
||||
int set_strjoin(Set *s, const char *separator, bool wrap_with_separator, char **ret);
|
||||
|
||||
|
|
|
@ -476,7 +476,8 @@ static void timer_enter_waiting(Timer *t, bool time_change) {
|
|||
assert_not_reached();
|
||||
}
|
||||
|
||||
v->next_elapse = usec_add(usec_shift_clock(base, CLOCK_MONOTONIC, TIMER_MONOTONIC_CLOCK(t)), v->value);
|
||||
if (!time_change)
|
||||
v->next_elapse = usec_add(usec_shift_clock(base, CLOCK_MONOTONIC, TIMER_MONOTONIC_CLOCK(t)), v->value);
|
||||
|
||||
if (dual_timestamp_is_set(&t->last_trigger) &&
|
||||
!time_change &&
|
||||
|
|
|
@ -1163,8 +1163,7 @@ int netdev_reload(Manager *manager) {
|
|||
}
|
||||
|
||||
/* Detach old NetDev objects from Manager.
|
||||
* Note, the same object may be registered with multiple names, and netdev_detach() may drop multiple
|
||||
* entries. Hence, hashmap_free_with_destructor() cannot be used. */
|
||||
* The same object may be registered with multiple names, and netdev_detach() may drop multiple entries. */
|
||||
for (NetDev *n; (n = hashmap_first(manager->netdevs)); )
|
||||
netdev_detach(n);
|
||||
|
||||
|
|
|
@ -683,8 +683,7 @@ Manager* manager_free(Manager *m) {
|
|||
m->dhcp_pd_subnet_ids = set_free(m->dhcp_pd_subnet_ids);
|
||||
m->networks = ordered_hashmap_free(m->networks);
|
||||
|
||||
/* The same object may be registered with multiple names, and netdev_detach() may drop multiple
|
||||
* entries. Hence, hashmap_free_with_destructor() cannot be used. */
|
||||
/* The same object may be registered with multiple names, and netdev_detach() may drop multiple entries. */
|
||||
for (NetDev *n; (n = hashmap_first(m->netdevs)); )
|
||||
netdev_detach(n);
|
||||
m->netdevs = hashmap_free(m->netdevs);
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
if conf.get('ENABLE_NSPAWN') != 1
|
||||
subdir_done()
|
||||
endif
|
||||
|
||||
libnspawn_core_sources = files(
|
||||
'nspawn-bind-user.c',
|
||||
'nspawn-cgroup.c',
|
||||
|
@ -52,6 +48,7 @@ executables += [
|
|||
executable_template + {
|
||||
'name' : 'systemd-nspawn',
|
||||
'public' : true,
|
||||
'conditions' : ['ENABLE_NSPAWN'],
|
||||
'sources' : files('nspawn.c'),
|
||||
'link_with' : nspawn_libs,
|
||||
'dependencies' : [
|
||||
|
|
|
@ -56,6 +56,9 @@ int notify_push_fd(int fd, const char *name) {
|
|||
if (!state)
|
||||
return -ENOMEM;
|
||||
|
||||
/* Remove existing fds with the same name in fdstore. */
|
||||
(void) notify_remove_fd_warn(name);
|
||||
|
||||
return sd_pid_notify_with_fds(0, /* unset_environment = */ false, state, &fd, 1);
|
||||
}
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ Host .host machine/.host
|
|||
# Make sure unix/* and vsock/* can be used to connect to AF_UNIX and AF_VSOCK paths.
|
||||
# Make sure machine/* can be used to connect to local machines registered in machined.
|
||||
#
|
||||
Host unix/* vsock/* vsock-mux/* machine/*
|
||||
Host unix/* unix,* vsock/* vsock,* vsock-mux/* vsock-mux,* machine/* machine,*
|
||||
ProxyCommand {{LIBEXECDIR}}/systemd-ssh-proxy %h %p
|
||||
ProxyUseFdpass yes
|
||||
CheckHostIP no
|
||||
|
|
|
@ -175,6 +175,15 @@ static int process_machine(const char *machine, const char *port) {
|
|||
return process_vsock_cid(cid, port);
|
||||
}
|
||||
|
||||
static char *startswith_sep(const char *s, const char *prefix) {
|
||||
const char *p = startswith(s, prefix);
|
||||
|
||||
if (p && IN_SET(*p, '/', ','))
|
||||
return (char*) p + 1;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static int run(int argc, char* argv[]) {
|
||||
|
||||
log_setup();
|
||||
|
@ -184,19 +193,19 @@ static int run(int argc, char* argv[]) {
|
|||
|
||||
const char *host = argv[1], *port = argv[2];
|
||||
|
||||
const char *p = startswith(host, "vsock/");
|
||||
const char *p = startswith_sep(host, "vsock");
|
||||
if (p)
|
||||
return process_vsock_string(p, port);
|
||||
|
||||
p = startswith(host, "unix/");
|
||||
p = startswith_sep(host, "unix");
|
||||
if (p)
|
||||
return process_unix(p);
|
||||
|
||||
p = startswith(host, "vsock-mux/");
|
||||
p = startswith_sep(host, "vsock-mux");
|
||||
if (p)
|
||||
return process_vsock_mux(p, port);
|
||||
|
||||
p = startswith(host, "machine/");
|
||||
p = startswith_sep(host, "machine");
|
||||
if (p)
|
||||
return process_machine(p, port);
|
||||
|
||||
|
|
|
@ -764,29 +764,6 @@ TEST(hashmap_free) {
|
|||
}
|
||||
}
|
||||
|
||||
typedef struct Item {
|
||||
int seen;
|
||||
} Item;
|
||||
static void item_seen(Item *item) {
|
||||
item->seen++;
|
||||
}
|
||||
|
||||
TEST(hashmap_free_with_destructor) {
|
||||
Hashmap *m;
|
||||
struct Item items[4] = {};
|
||||
unsigned i;
|
||||
|
||||
assert_se(m = hashmap_new(NULL));
|
||||
for (i = 0; i < ELEMENTSOF(items) - 1; i++)
|
||||
assert_se(hashmap_put(m, INT_TO_PTR(i), items + i) == 1);
|
||||
|
||||
m = hashmap_free_with_destructor(m, item_seen);
|
||||
assert_se(items[0].seen == 1);
|
||||
assert_se(items[1].seen == 1);
|
||||
assert_se(items[2].seen == 1);
|
||||
assert_se(items[3].seen == 0);
|
||||
}
|
||||
|
||||
TEST(hashmap_first) {
|
||||
_cleanup_hashmap_free_ Hashmap *m = NULL;
|
||||
|
||||
|
|
|
@ -110,7 +110,7 @@ TEST(strv_make_nulstr) {
|
|||
}
|
||||
|
||||
TEST(set_make_nulstr) {
|
||||
_cleanup_set_free_free_ Set *set = NULL;
|
||||
_cleanup_set_free_ Set *set = NULL;
|
||||
size_t len = 0;
|
||||
int r;
|
||||
|
||||
|
@ -130,7 +130,7 @@ TEST(set_make_nulstr) {
|
|||
static const char expect[] = { 0x00, 0x00 };
|
||||
_cleanup_free_ char *nulstr = NULL;
|
||||
|
||||
set = set_new(NULL);
|
||||
set = set_new(&string_hash_ops_free);
|
||||
assert_se(set);
|
||||
|
||||
r = set_make_nulstr(set, &nulstr, &len);
|
||||
|
|
|
@ -227,14 +227,14 @@ TEST(serialize_item_base64mem) {
|
|||
TEST(serialize_string_set) {
|
||||
_cleanup_(unlink_tempfilep) char fn[] = "/tmp/test-serialize.XXXXXX";
|
||||
_cleanup_fclose_ FILE *f = NULL;
|
||||
_cleanup_set_free_free_ Set *s = NULL;
|
||||
_cleanup_set_free_ Set *s = NULL;
|
||||
_cleanup_free_ char *line1 = NULL, *line2 = NULL;
|
||||
char *p, *q;
|
||||
|
||||
assert_se(fmkostemp_safe(fn, "r+", &f) == 0);
|
||||
log_info("/* %s (%s) */", __func__, fn);
|
||||
|
||||
assert_se(set_ensure_allocated(&s, &string_hash_ops) >= 0);
|
||||
assert_se(set_ensure_allocated(&s, &string_hash_ops_free) >= 0);
|
||||
|
||||
assert_se(serialize_string_set(f, "a", s) == 0);
|
||||
|
||||
|
|
|
@ -32,21 +32,6 @@ static void item_seen(Item *item) {
|
|||
item->seen++;
|
||||
}
|
||||
|
||||
TEST(set_free_with_destructor) {
|
||||
Set *m;
|
||||
struct Item items[4] = {};
|
||||
|
||||
assert_se(m = set_new(NULL));
|
||||
FOREACH_ARRAY(item, items, ELEMENTSOF(items) - 1)
|
||||
assert_se(set_put(m, item) == 1);
|
||||
|
||||
m = set_free_with_destructor(m, item_seen);
|
||||
assert_se(items[0].seen == 1);
|
||||
assert_se(items[1].seen == 1);
|
||||
assert_se(items[2].seen == 1);
|
||||
assert_se(items[3].seen == 0);
|
||||
}
|
||||
|
||||
DEFINE_PRIVATE_HASH_OPS_WITH_VALUE_DESTRUCTOR(item_hash_ops, void, trivial_hash_func, trivial_compare_func, Item, item_seen);
|
||||
|
||||
TEST(set_free_with_hash_ops) {
|
||||
|
@ -145,9 +130,8 @@ TEST(set_ensure_allocated) {
|
|||
}
|
||||
|
||||
TEST(set_copy) {
|
||||
_cleanup_set_free_ Set *s = NULL;
|
||||
_cleanup_set_free_free_ Set *copy = NULL;
|
||||
char *key1, *key2, *key3, *key4;
|
||||
_cleanup_set_free_ Set *s = NULL, *copy = NULL;
|
||||
_cleanup_free_ char *key1 = NULL, *key2 = NULL, *key3 = NULL, *key4 = NULL;
|
||||
|
||||
key1 = strdup("key1");
|
||||
assert_se(key1);
|
||||
|
|
|
@ -553,9 +553,6 @@ int manager_serialize_config(Manager *manager) {
|
|||
if (r < 0)
|
||||
return log_warning_errno(r, "Failed to finalize serialization file: %m");
|
||||
|
||||
/* Remove the previous serialization to make it replaced with the new one. */
|
||||
(void) notify_remove_fd_warn("config-serialization");
|
||||
|
||||
r = notify_push_fd(fileno(f), "config-serialization");
|
||||
if (r < 0)
|
||||
return log_warning_errno(r, "Failed to push serialization fd to service manager: %m");
|
||||
|
|
|
@ -1166,7 +1166,7 @@ static int manager_listen_fds(Manager *manager) {
|
|||
|
||||
int n = sd_listen_fds_with_names(/* unset_environment = */ true, &names);
|
||||
if (n < 0)
|
||||
return n;
|
||||
return log_error_errno(n, "Failed to listen on fds: %m");
|
||||
|
||||
for (int i = 0; i < n; i++) {
|
||||
int fd = SD_LISTEN_FDS_START + i;
|
||||
|
|
|
@ -60,7 +60,7 @@ sanitize_address_undefined = custom_target(
|
|||
'fuzzers',
|
||||
' '.join(fuzz_c_args + '-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION'),
|
||||
' '.join(fuzz_cpp_args + '-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION'),
|
||||
'-Dfuzz-tests=true -Db_lundef=false -Db_sanitize=address,undefined -Dnspawn=enabled --optimization=@0@ @1@ --auto-features=@2@'.format(
|
||||
'-Dfuzz-tests=true -Db_lundef=false -Db_sanitize=address,undefined --optimization=@0@ @1@ --auto-features=@2@'.format(
|
||||
get_option('optimization'),
|
||||
get_option('werror') ? '--werror' : '',
|
||||
sanitize_auto_features
|
||||
|
|
|
@ -61,4 +61,13 @@ ssh -o StrictHostKeyChecking=no -v -i "$ROOTID" machine/.host cat /etc/machine-i
|
|||
modprobe vsock_loopback ||:
|
||||
if test -e /dev/vsock -a -d /sys/module/vsock_loopback ; then
|
||||
ssh -o StrictHostKeyChecking=no -v -i "$ROOTID" vsock/1 cat /etc/machine-id | cmp - /etc/machine-id
|
||||
|
||||
if ! command -v scp &> /dev/null ; then
|
||||
echo "scp not found, skipping subtest" >&2
|
||||
else
|
||||
OUT_FILE=$(mktemp -u)
|
||||
scp -o StrictHostKeyChecking=no -v -i "$ROOTID" vsock,1:/etc/machine-id "$OUT_FILE"
|
||||
cmp "$OUT_FILE" /etc/machine-id
|
||||
rm -f "$OUT_FILE"
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue