patch-2.4.3 linux/drivers/char/dz.c
Next file: linux/drivers/char/i810_rng.c
Previous file: linux/drivers/char/dsp56k.c
Back to the patch index
Back to the overall index
- Lines: 15
- Date:
Fri Mar 2 18:38:37 2001
- Orig file:
v2.4.2/linux/drivers/char/dz.c
- Orig date:
Wed Feb 21 18:20:19 2001
diff -u --recursive --new-file v2.4.2/linux/drivers/char/dz.c linux/drivers/char/dz.c
@@ -847,10 +847,12 @@
if (!new_info)
return -EFAULT;
- copy_from_user (&new_serial, new_info, sizeof(new_serial));
+ if(copy_from_user (&new_serial, new_info, sizeof(new_serial)))
+ return -EFAULT;
+
old_info = *info;
- if (!suser())
+ if (!capable(CAP_SYS_ADMIN))
return -EPERM;
if (info->count > 1)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)