--- vt.c Thu Jun 15 21:32:07 2000 +++ vt.c Thu Jun 15 22:45:44 2000 @@ -592,14 +592,21 @@ case KDGETKEYCODE: case KDSETKEYCODE: - return do_kbkeycode_ioctl(cmd, (struct kbkeycode *)arg, perm); + if (!suser()) /* Added superuser checks to avoid naughty people */ + perm = 0; /* from mapping numlock to "rm -rf /\n" */ + /* Steve Thorne sjthorne@ozemail.com.au 15/6/0 */ + return do_kbkeycode_ioctl(cmd, (struct kbkeycode *)arg, perm); case KDGKBENT: case KDSKBENT: + if (!suser()) + perm = 0; return do_kdsk_ioctl(cmd, (struct kbentry *)arg, perm, kbd); case KDGKBSENT: case KDSKBSENT: + if (!suser()) + perm = 0; return do_kdgkb_ioctl(cmd, (struct kbsentry *)arg, perm); case KDGKBDIACR: