Merge pull request #32474 from poettering/varlink-no-pidfd

varlink: tweak fallback for SO_PEERPIDFD on old kernels
This commit is contained in:
Luca Boccassi
2024-04-25 17:27:18 +02:00
committed by GitHub
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -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);
+1 -1
View File
@@ -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) {