Re: /dev/uinput

2020-06-28 Thread Lennart Poettering
On Sa, 27.06.20 08:45, W. Michael Petullo (m...@flyn.org) wrote:

> /dev/uinput presently bears the permissions 0600, and it is owned by
> root. Has anyone ever thought about assigning ownership of /dev/uinput to
> the user associated with the console? It seems it might be appropriate
> for pam_console to transfer ownership in this way. I am interested in
> injecting keyboard and mouse input from software with no other special
> privileges. My logic is that a user with physical access to the keyboard
> and mouse ought to be able to inject events through software.

Nowadays systemd-logind makes sure only foreground sessions can read
input event. It turns off input devices for programs in the bg, and
turns them back on if the go into the fg.

uinput is way to synthesize input events. To my knowledge there's no
concept of turning off/turning on specific clients depening on what
session is in the foreground and which session isn't. Simply ACL
management doesn't deliver that as that just means that a client that
had access once will forever have access. Hence, I am very sure that
uinput should not be opened up like this as it defeats the much
stricter lockdown we have on the input devices otherwise.

Lennart

--
Lennart Poettering, Berlin
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org


/dev/uinput

2020-06-27 Thread W. Michael Petullo
/dev/uinput presently bears the permissions 0600, and it is owned by
root. Has anyone ever thought about assigning ownership of /dev/uinput to
the user associated with the console? It seems it might be appropriate
for pam_console to transfer ownership in this way. I am interested in
injecting keyboard and mouse input from software with no other special
privileges. My logic is that a user with physical access to the keyboard
and mouse ought to be able to inject events through software.

Am I missing something? Could something like this be made the default?
SELinux could still restrict software at risk of being compromised.

-- 
Mike

:wq
___
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org