chiark / gitweb /
systemadm: use color for dependency links
[elogind.git] / src / vconsole-setup.c
index 1be260bc2f41011b24fe78be83505a000c27426e..4347a2078f64b6aa55302185b16131bcf9bf2fca 100644 (file)
@@ -171,12 +171,14 @@ int main(int argc, char **argv) {
         log_parse_environment();
         log_open();
 
+        umask(0022);
+
         if (argv[1])
                 vc = argv[1];
         else
                 vc = "/dev/tty0";
 
-        if ((fd = open(vc, O_RDWR|O_CLOEXEC)) < 0) {
+        if ((fd = open_terminal(vc, O_RDWR|O_CLOEXEC)) < 0) {
                 log_error("Failed to open %s: %m", vc);
                 goto finish;
         }