Merge pull request #7833 from keszybz/netdev-relaxed

Avoid spurious warnings about unknown sections in .netdev files
This commit is contained in:
Lennart Poettering
2018-01-11 17:14:49 +01:00
committed by GitHub
2 changed files with 4 additions and 7 deletions

View File

@@ -620,13 +620,10 @@ static void bus_get_peercred(sd_bus *b) {
/* Get the list of auxiliary groups of the peer */
r = getpeergroups(b->input_fd, &b->groups);
if (r < 0) {
if (!IN_SET(r, -EOPNOTSUPP, -ENOPROTOOPT))
log_debug_errno(r, "Failed to determine peer groups list: %m");
b->n_groups = (size_t) -1;
} else
if (r >= 0)
b->n_groups = (size_t) r;
else if (!IN_SET(r, -EOPNOTSUPP, -ENOPROTOOPT))
log_debug_errno(r, "Failed to determine peer's group list: %m");
}
static int bus_socket_start_auth_client(sd_bus *b) {

View File

@@ -647,7 +647,7 @@ static int netdev_load_one(Manager *manager, const char *filename) {
r = config_parse_many(filename, network_dirs, dropin_dirname,
"Match\0NetDev\0",
config_item_perf_lookup, network_netdev_gperf_lookup,
CONFIG_PARSE_WARN, netdev_raw);
CONFIG_PARSE_WARN|CONFIG_PARSE_RELAXED, netdev_raw);
if (r < 0)
return r;