Skip to content

Commit 8e0bd95

Browse files
authored
Merge pull request #32474 from poettering/varlink-no-pidfd
varlink: tweak fallback for SO_PEERPIDFD on old kernels
2 parents c929c6a + 78ef663 commit 8e0bd95

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/basic/errno-util.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,8 @@ static inline bool ERRNO_IS_NEG_NOT_SUPPORTED(intmax_t r) {
167167
-EAFNOSUPPORT,
168168
-EPFNOSUPPORT,
169169
-EPROTONOSUPPORT,
170-
-ESOCKTNOSUPPORT);
170+
-ESOCKTNOSUPPORT,
171+
-ENOPROTOOPT);
171172
}
172173
_DEFINE_ABS_WRAPPER(NOT_SUPPORTED);
173174

src/shared/varlink.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2871,7 +2871,7 @@ int varlink_get_peer_pidref(Varlink *v, PidRef *ret) {
28712871
* authentication. */
28722872

28732873
r = varlink_acquire_pidfd(v);
2874-
if (r < 0)
2874+
if (r < 0 && !ERRNO_IS_NEG_NOT_SUPPORTED(r))
28752875
return r;
28762876

28772877
if (v->peer_pidfd < 0) {

0 commit comments

Comments
 (0)