]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
tty: moxa: fix TIOCSSERIAL permission check
authorJohan Hovold <johan@kernel.org>
Wed, 7 Apr 2021 10:23:29 +0000 (12:23 +0200)
committerKelsey Skunberg <kelsey.skunberg@canonical.com>
Mon, 24 May 2021 23:46:11 +0000 (17:46 -0600)
commiteaff0eeae3e2a7016e83022877f7d91d7f73aa42
tree7093e39a129e4cae4386de01726a34549567e992
parent412e3aedbf40c08a98f44c9402c64505d90a54b4
tty: moxa: fix TIOCSSERIAL permission check

BugLink: https://bugs.launchpad.net/bugs/1929455
commit dc8c8437658667be9b11ec25c4b5482ed2becdaa upstream.

Changing the port close delay or type are privileged operations so make
sure to return -EPERM if a regular user tries to change them.

Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20210407102334.32361-12-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/tty/moxa.c