]> git.proxmox.com Git - systemd.git/blobdiff - src/core/dynamic-user.c
New upstream version 242
[systemd.git] / src / core / dynamic-user.c
index 530df70b800d6e86d6f380feb55d914f68d80184..c380bee9e5c53bbf4ff60d5904ace84d3dd38288 100644 (file)
@@ -3,11 +3,14 @@
 #include <grp.h>
 #include <pwd.h>
 #include <sys/file.h>
+#include <sys/stat.h>
+#include <sys/types.h>
 
 #include "clean-ipc.h"
 #include "dynamic-user.h"
 #include "fd-util.h"
 #include "fileio.h"
+#include "format-util.h"
 #include "fs-util.h"
 #include "io-util.h"
 #include "nscd-flush.h"
@@ -707,7 +710,7 @@ int dynamic_user_lookup_uid(Manager *m, uid_t uid, char **ret) {
 
         xsprintf(lock_path, "/run/systemd/dynamic-uid/" UID_FMT, uid);
         r = read_one_line_file(lock_path, &user);
-        if (r == -ENOENT)
+        if (IN_SET(r, -ENOENT, 0))
                 return -ESRCH;
         if (r < 0)
                 return r;