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?
Just tested PAM_TTY="" and Active=yes can be seen below. But the real problem is that /dev/snd/* is still following normal ACL as you can for the access rights for /dev/snd/* below, which is what we are wondering that which component is actually setting the ACL when PAM_TTY=tty1?
root@ivi_box:~# loginctl show-session c1 Id=c1 Name=app Timestamp=Wed 2014-12-17 15:40:17 PST TimestampMonotonic=9853533 VTNr=2 Remote=no RemoteHost=localhost RemoteUser=root Service=tlm-default-login Scope=session-c1.scope Leader=275 Audit=0 Type=unspecified Class=background Active=yes State=active IdleHint=no IdleSinceHint=0 IdleSinceHintMonotonic=0 root@ivi_box:~# ls -lZa /dev/snd/* crw-rw----. 1 root audio * 116, 0 Dec 17 2014 /dev/snd/controlC0 crw-rw----. 1 root audio * 116, 32 Dec 17 2014 /dev/snd/controlC1 crw-rw----. 1 root audio * 116, 4 Dec 17 2014 /dev/snd/hwC0D0 _______________________________________________ Dev mailing list [email protected] https://lists.tizen.org/listinfo/dev
