chiark / gitweb /
logind: use open_terminal() instead of open()
[elogind.git] / src / login / logind-session.c
index 39eab71833c8fccc8067a1df349e527ba35179ae..70a93c689691438e188ec1838c1225bab71ca28a 100644 (file)
@@ -981,7 +981,7 @@ static int session_open_vt(Session *s) {
                 return s->vtfd;
 
         sprintf(path, "/dev/tty%u", s->vtnr);
-        s->vtfd = open(path, O_RDWR | O_CLOEXEC | O_NONBLOCK | O_NOCTTY);
+        s->vtfd = open_terminal(path, O_RDWR | O_CLOEXEC | O_NONBLOCK | O_NOCTTY);
         if (s->vtfd < 0)
                 return log_error_errno(errno, "cannot open VT %s of session %s: %m", path, s->id);