chiark / gitweb /
login: give session ownership of VT
authorRay Strode <rstrode@redhat.com>
Tue, 22 Apr 2014 17:27:58 +0000 (13:27 -0400)
committerDavid Herrmann <dh.herrmann@gmail.com>
Wed, 23 Apr 2014 15:36:43 +0000 (17:36 +0200)
commitd6176c6c97bf0614c2e7caaf2156bf813b39337a
tree95b846b71ccb2c19b2769cb37e89e862598fd4e9
parent26e376bfe34ba6caa04723b9200e9deace8e6c9f
login: give session ownership of VT

The tty associated with a VT should be owned by the owner of the session
running on the VT. This is important for supporting a socket activated X
server, since the X server will open the tty itself.

This commit makes sure to chown the tty any time a session is
created and and chown it back to root any time the session
is removed. This behavior is copied from /bin/login.
src/login/logind-session.c