From 776dc1b9d5294f217b0d717126dced4993395ee1 Mon Sep 17 00:00:00 2001 From: Mike Yuan Date: Sat, 3 Jan 2026 20:26:27 +0100 Subject: [PATCH] core/dynamic-user: flock() does not return EBUSY --- src/core/dynamic-user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/dynamic-user.c b/src/core/dynamic-user.c index 9d7d96e4a3..576ce5c8b0 100644 --- a/src/core/dynamic-user.c +++ b/src/core/dynamic-user.c @@ -240,7 +240,7 @@ static int pick_uid(char **suggested_paths, const char *name, uid_t *ret_uid) { r = flock(lock_fd, LOCK_EX|LOCK_NB); /* Try to get a BSD file lock on the UID lock file */ if (r < 0) { - if (IN_SET(errno, EBUSY, EAGAIN)) + if (errno == EAGAIN) goto next; /* already in use */ return -errno;