In session_prepare_vt() we set owner of /dev/ttyX to the user, as that is
needed for things to work. However, we shouldn't "reset" it to root on
session_restore_vt() since it could have in fact already been set to the user.
---
 src/login/logind-session.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/login/logind-session.c b/src/login/logind-session.c
index fdeacb1..905e73f 100644
--- a/src/login/logind-session.c
+++ b/src/login/logind-session.c
@@ -1070,8 +1070,6 @@ void session_restore_vt(Session *s) {
         mode.mode = VT_AUTO;
         ioctl(vt, VT_SETMODE, &mode);
 
-        fchown(vt, 0, -1);
-
         s->vtfd = safe_close(s->vtfd);
 }
 
-- 
2.0.4

_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to