On Wed, 2014-12-17 at 15:25 +0200, Jussi Laako wrote:
> On 17.12.2014 11:15, Kaskinen, Tanu wrote:
> > If you're looking for the place where those ACLs are set, that would be
> > logind's source code. The logic that logind implements is that if a
> > device has been assigned to a seat, then logind gives access to the user
> > that currently has an active session on that seat. If you see
> > "crw-rw----.", my guess is that in logind's opinion nobody has an active
> > session on the seat.
> 
> But why does the session have to be specifically on "tty1". If it's 
> "tty2", then the permissions are incorrect. Based on "loginctl" the 
> session is on "seat0" in both cases (and the devices are attached to 
> seat0)...

My theory is that logind for some reason thinks that tty1 is active no
matter what you do. If you set PAM_TTY to "tty2", does "loginctl
show-session" say "Active=yes" or "Active=no"?

I'm not very familiar with the tty concept, and I don't know what the
PAM_TTY variable is supposed to mean exactly... My assumptions: the VT
number corresponds to the function key number when I switch terminals
with Ctrl-Alt-F<N>. The tty number is related to the VT number, but they
are not exactly the same thing. Maybe ttys are only assigned to text
logins, while the VT can also be graphical? That theory is supported by
the fact that pam_sm_open_session() in src/login/pam_systemd.c sets the
tty variable to NULL in case of X11, cron and ssh logins before passing
it to logind. If the tty number is relevant only in the context of text
logins, and you're dealing with graphical logins, maybe the right thing
would be to unset PAM_TTY or set it to an empty string?

-- 
Tanu
_______________________________________________
Dev mailing list
[email protected]
https://lists.tizen.org/listinfo/dev

Reply via email to