patch-2.1.100 linux/drivers/char/vt.c

Next file: linux/drivers/isdn/avmb1/capi.c
Previous file: linux/drivers/char/stallion.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.99/linux/drivers/char/vt.c linux/drivers/char/vt.c
@@ -249,7 +249,8 @@
 		if (!(key_map = key_maps[s])) {
 			int j;
 
-			if (keymap_count >= MAX_NR_OF_USER_KEYMAPS && !suser())
+			if (keymap_count >= MAX_NR_OF_USER_KEYMAPS && 
+			    !capable(CAP_SYS_RESOURCE))
 				return -EPERM;
 
 			key_map = (ushort *) kmalloc(sizeof(plain_map),
@@ -268,7 +269,7 @@
 		/*
 		 * Attention Key.
 		 */
-		if (((ov == K_SAK) || (v == K_SAK)) && !suser())
+		if (((ov == K_SAK) || (v == K_SAK)) && !capable(CAP_SYS_ADMIN))
 			return -EPERM;
 		key_map[i] = U(v);
 		if (!s && (KTYP(ov) == KT_SHIFT || KTYP(v) == KT_SHIFT))

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov