chiark / gitweb /
login: fix user@.service case, so we don't allow nested sessions (#8051)
authorAlan Jenkins <alan.christopher.jenkins@gmail.com>
Thu, 22 Feb 2018 20:38:44 +0000 (20:38 +0000)
committerSven Eden <yamakuzure@gmx.net>
Wed, 30 May 2018 05:59:04 +0000 (07:59 +0200)
commita8a2468900dc38304ed053641aa2f6e1cf158da9
tree59c7e338aa29008d3098d75ceae317e6c9b97a3b
parent21a9caccf84109b69525235e9546995350c513ee
login: fix user@.service case, so we don't allow nested sessions (#8051)

> logind sessions are mostly bound to the audit session concept, and audit
> sessions remain unaffected by "su", in fact they are defined to be
> "sealed off", i.e. in a way that if a process entered a session once, it
> will always stay with it, and so will its children, i.e. the only way to
> get a new session is by forking off something off PID 1 (or something
> similar) that never has been part of a session.

The code had a gap.  user@.service is a special case PAM session which does
not create a logind session.  Let's remember to check for it.

Fixes #8021
src/login/logind-dbus.c