summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLuca Boccassi <bluca@debian.org>2024-04-25 17:27:18 +0200
committerGitHub <noreply@github.com>2024-04-25 17:27:18 +0200
commit8e0bd955fea1a0de0eed32042ad4a1ca4cfcf0c1 (patch)
tree8a373955acd13b2a760acfbc97c40ba547d7317d /src
parentMerge pull request #32467 from yuwata/network-radv-cleanup (diff)
parentvarlink: fix varlink_get_peer_pidref() fallback (diff)
downloadsystemd-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.h3
-rw-r--r--src/shared/varlink.c2
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) {