]> git.baikalelectronics.ru Git - 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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 7 Apr 2021 15:22:07 +0000 (17:22 +0200)
commit7ecc206a3397ddc4809780902c22e6507efa7b2a
treed26574381e2d997c7c8b8a3a36949ae66322562a
parent989a165ce21dcc1a4159953e0bda8da873535993
tty: moxa: fix TIOCSSERIAL permission check

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>
drivers/tty/moxa.c