From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d4db,dd69f937a4d495f2,start X-Google-Attributes: gid10d4db,public X-Google-ArrivalTime: 1993-06-21 07:00:51 PST Newsgroups: comp.os.linux.announce Path: gmd.de!xlink.net!howland.reston.ans.net!noc.near.net!uunet!psinntp!dg-rtp!bounce-bounce From: gwesp@cosy.sbg.ac.at (Gerhard Wesp) Subject: Disabling Ctrl-Alt-Del Sender: usenet@dg-rtp.dg.com (Usenet Administration) Message-ID: <1993Jun21.132539.24159@dg-rtp.dg.com> Date: Mon, 21 Jun 93 13:25:39 GMT Reply-To: gwesp@cosy.sbg.ac.at (Gerhard Wesp) Organization: University of Salzburg / Austria Followup-To: comp.os.linux Keywords: kernel patch, ctrl-alt-del, reboot Hi! Just in case somebody is interested, here are my diffs against the .99pl10 kernel sources to add a confuguration option for disabling the Ctrl-Alt-Del reboot. To apply them, cd to /usr/src/linux or whereever your kernel sources live and type 'patch < patchfile', where 'patchfile' of course should contain the diffs in this posting. After that, type 'make config' and run through the normal configuration procedure. There should be a new question, 'Ctrl-Alt-Del reboots the machine?' Answering yes will result in the usual kernel behaviour, ans- wering no will #ifdef out all code related to detecting and reacting to a Ctrl-Alt-Del combination. Greetings, -Gerhard ============================= CUT HERE ================================= diff --context --recursive ../linux/config.in ./config.in *** ../linux/config.in Sat Jun 19 16:27:17 1993 --- ./config.in Sat Jun 19 18:02:54 1993 *************** *** 69,74 **** --- 69,76 ---- . Keyboard meta-key sends ESC-prefix CONFIG_KBD_META y/n y + Ctrl-Alt-Del reboots the machine + CONFIG_KBD_CAD y/n y Logitech busmouse support CONFIG_BUSMOUSE y/n n PS/2 mouse (aka 'auxiliary device') support diff --context --recursive ../linux/kernel/chr_drv/keyboard.c ./kernel/chr_drv/keyboard.c *** ../linux/kernel/chr_drv/keyboard.c Sat Jun 5 14:36:21 1993 --- ./kernel/chr_drv/keyboard.c Sat Jun 19 18:02:25 1993 *************** *** 47,53 **** --- 47,55 ---- #include extern void do_keyboard_interrupt(void); + #ifdef CONFIG_KBD_CAD extern void ctrl_alt_del(void); + #endif extern void change_console(unsigned int new_console); extern void scrollback(int); extern void scrollfront(int); *************** *** 502,512 **** --- 504,516 ---- if (up_flag) return; /* no action, if this is a key release */ + #ifdef CONFIG_KBD_CAD if ((value == KVAL(K_PCOMMA) || value == KVAL(K_PDOT)) && (kbd_flags & CTRL_KEYS) && (kbd_flags & (ALT_KEYS | ALTGR_KEYS))) { ctrl_alt_del(); return; } + #endif if ((kbd_flags & ALT_KEYS) && value <= 9) { /* Alt-numpad */ npadch = (npadch * 10 + value) % 1000; diff --context --recursive ../linux/kernel/sys.c ./kernel/sys.c *** ../linux/kernel/sys.c Wed May 26 19:21:22 1993 --- ./kernel/sys.c Sat Jun 19 18:02:24 1993 *************** *** 23,29 **** --- 23,31 ---- /* * this indicates wether you can reboot with ctrl-alt-del: the default is yes */ + #ifdef CONFIG_KBD_CAD static int C_A_D = 1; + #endif /* * The timezone where the local system is located. Used as a default by some *************** *** 220,229 **** --- 222,233 ---- return -EINVAL; if (flag == 0x01234567) hard_reset_now(); + #ifdef CONFIG_KBD_CAD else if (flag == 0x89ABCDEF) C_A_D = 1; else if (!flag) C_A_D = 0; + #endif else return -EINVAL; return (0); *************** *** 234,239 **** --- 238,245 ---- * As it's called within an interrupt, it may NOT sync: the only choice * is wether to reboot at once, or just ignore the ctrl-alt-del. */ + + #ifdef CONFIG_KBD_CAD void ctrl_alt_del(void) { if (C_A_D) *************** *** 241,247 **** else send_sig(SIGINT,task[1],1); } ! /* * This is done BSD-style, with no consideration of the saved gid, except --- 247,253 ---- else send_sig(SIGINT,task[1],1); } ! #endif /* * This is done BSD-style, with no consideration of the saved gid, except -- Send submissions for comp.os.linux.announce to: linux-announce@tc.cornell.edu