chiark / gitweb /
umask: change default umask to 0022 just to be sure, and set it explicitly in all...
[elogind.git] / src / fsck.c
index a3c83c3c2428000e5bddc9d0d76b0f1d4730d451..5d9cf24f4d2d8150d83f4099be4229453b58803d 100644 (file)
@@ -106,7 +106,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) {
@@ -163,6 +163,8 @@ int main(int argc, char *argv[]) {
         log_parse_environment();
         log_open();
 
+        umask(0022);
+
         parse_proc_cmdline();
         test_files();
 
@@ -265,7 +267,7 @@ int main(int argc, char *argv[]) {
                 r = EXIT_SUCCESS;
 
         if (status.si_code == CLD_EXITED && (status.si_status & 1))
-                touch("/dev/.run/systemd/quotacheck");
+                touch("/run/systemd/quotacheck");
 
 finish:
         if (udev_device)