sd-login: reject invalid pidfd with -EBADF consistently

We got it mostly right except for one function, fix it.
This commit is contained in:
Mike Yuan
2025-06-01 09:04:27 +02:00
parent 4f4113ee33
commit 68db777ae2

View File

@@ -273,7 +273,7 @@ _public_ int sd_pidfd_get_owner_uid(int pidfd, uid_t *ret_uid) {
pid_t pid;
int r;
assert_return(pidfd >= 0, -EINVAL);
assert_return(pidfd >= 0, -EBADF);
r = pidfd_get_pid(pidfd, &pid);
if (r < 0)