chiark / gitweb /
macro: fix ALIGN_TO macro definition
[elogind.git] / src / quotacheck.c
index 057d8617c2290172170771cbebb1b7580df43919..98b59a090a99ef33079d27884821171c106cb954 100644 (file)
@@ -26,6 +26,7 @@
 #include <unistd.h>
 
 #include "util.h"
+#include "virt.h"
 
 static bool arg_skip = false;
 static bool arg_force = false;
@@ -35,7 +36,7 @@ static int parse_proc_cmdline(void) {
         int r;
         size_t l;
 
-        if (detect_virtualization(NULL) > 0)
+        if (detect_container(NULL) > 0)
                 return 0;
 
         if ((r = read_one_line_file("/proc/cmdline", &line)) < 0) {
@@ -90,6 +91,8 @@ int main(int argc, char *argv[]) {
         log_parse_environment();
         log_open();
 
+        umask(0022);
+
         parse_proc_cmdline();
         test_files();
 
@@ -97,7 +100,7 @@ int main(int argc, char *argv[]) {
                 if (arg_skip)
                         return 0;
 
-                if (access("/dev/.run/systemd/quotacheck", F_OK) < 0)
+                if (access("/run/systemd/quotacheck", F_OK) < 0)
                         return 0;
         }