Commit f7254f4a authored by Vojtech Pavlik's avatar Vojtech Pavlik Committed by Dmitry Torokhov

input: Only root should be able to set the N_MOUSE line discipline.

Signed-off-by: default avatarVojtech Pavlik <vojtech@suse.cz>
parent d65b954b
......@@ -64,6 +64,9 @@ static int serport_ldisc_open(struct tty_struct *tty)
struct serio *serio;
char name[64];
if (!capable(CAP_SYS_ADMIN))
return -EPERM;
serport = kmalloc(sizeof(struct serport), GFP_KERNEL);
serio = kmalloc(sizeof(struct serio), GFP_KERNEL);
if (unlikely(!serport || !serio)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment