1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-07 18:27:04 +03:00

bus-socket: slight simplification in bus_get_peercred()

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2018-01-04 15:28:57 +01:00
parent 5360d77131
commit c599b325b6

View File

@ -620,13 +620,10 @@ static void bus_get_peercred(sd_bus *b) {
/* Get the list of auxiliary groups of the peer */ /* Get the list of auxiliary groups of the peer */
r = getpeergroups(b->input_fd, &b->groups); r = getpeergroups(b->input_fd, &b->groups);
if (r < 0) { 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
b->n_groups = (size_t) r; 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) { static int bus_socket_start_auth_client(sd_bus *b) {