]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
tty: amiserial: fix TIOCSSERIAL permission check
authorJohan Hovold <johan@kernel.org>
Wed, 7 Apr 2021 10:23:26 +0000 (12:23 +0200)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 26 May 2021 13:39:02 +0000 (15:39 +0200)
commit509eabc941b2383fd70d10616464af528b094fdf
tree685d95b93ff7097a58ae58930693a02f1d63a683
parent69964c1de312c419870ff91e1a0115a4d4be78a3
tty: amiserial: fix TIOCSSERIAL permission check

BugLink: https://bugs.launchpad.net/bugs/1929615
commit 1d31a831cc04f5f942de3e7d91edaa52310d3c99 upstream.

Changing the port closing_wait parameter is a privileged operation.

Add the missing check to TIOCSSERIAL so that -EPERM is returned in case
an unprivileged user tries to change the closing-wait setting.

Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://lore.kernel.org/r/20210407102334.32361-9-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/tty/amiserial.c