]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core/dynamic-user: flock() does not return EBUSY
authorMike Yuan <me@yhndnzj.com>
Sat, 3 Jan 2026 19:26:27 +0000 (20:26 +0100)
committerMike Yuan <me@yhndnzj.com>
Sat, 3 Jan 2026 20:14:32 +0000 (21:14 +0100)
src/core/dynamic-user.c

index 9d7d96e4a37ac24aa9b05160d3ab9b209fc826d5..576ce5c8b0eedca02a8590ce3af11607a3b01e01 100644 (file)
@@ -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;