Merge pull request #32474 from poettering/varlink-no-pidfd
varlink: tweak fallback for SO_PEERPIDFD on old kernels
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user