diff options
author | Luca Boccassi <bluca@debian.org> | 2024-04-25 17:27:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-25 17:27:18 +0200 |
commit | 8e0bd955fea1a0de0eed32042ad4a1ca4cfcf0c1 (patch) | |
tree | 8a373955acd13b2a760acfbc97c40ba547d7317d /src | |
parent | Merge pull request #32467 from yuwata/network-radv-cleanup (diff) | |
parent | varlink: fix varlink_get_peer_pidref() fallback (diff) | |
download | systemd-8e0bd955fea1a0de0eed32042ad4a1ca4cfcf0c1.tar.xz systemd-8e0bd955fea1a0de0eed32042ad4a1ca4cfcf0c1.zip |
Merge pull request #32474 from poettering/varlink-no-pidfd
varlink: tweak fallback for SO_PEERPIDFD on old kernels
Diffstat (limited to 'src')
-rw-r--r-- | src/basic/errno-util.h | 3 | ||||
-rw-r--r-- | src/shared/varlink.c | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/basic/errno-util.h b/src/basic/errno-util.h index 27804e6382..48b76e4bf7 100644 --- a/src/basic/errno-util.h +++ b/src/basic/errno-util.h @@ -167,7 +167,8 @@ static inline bool ERRNO_IS_NEG_NOT_SUPPORTED(intmax_t r) { -EAFNOSUPPORT, -EPFNOSUPPORT, -EPROTONOSUPPORT, - -ESOCKTNOSUPPORT); + -ESOCKTNOSUPPORT, + -ENOPROTOOPT); } _DEFINE_ABS_WRAPPER(NOT_SUPPORTED); diff --git a/src/shared/varlink.c b/src/shared/varlink.c index f1c00a21b6..d96967b8e6 100644 --- a/src/shared/varlink.c +++ b/src/shared/varlink.c @@ -2871,7 +2871,7 @@ int varlink_get_peer_pidref(Varlink *v, PidRef *ret) { * authentication. */ r = varlink_acquire_pidfd(v); - if (r < 0) + if (r < 0 && !ERRNO_IS_NEG_NOT_SUPPORTED(r)) return r; if (v->peer_pidfd < 0) { |