Bring in fix from FreeBSD/cperciva:
authorSimon Schubert <corecode@dragonflybsd.org>
Fri, 6 May 2005 11:27:51 +0000 (11:27 +0000)
committerSimon Schubert <corecode@dragonflybsd.org>
Fri, 6 May 2005 11:27:51 +0000 (11:27 +0000)
  Log:
  Correct improper permissions on /dev/iir.  The earlier permissions
  of 0644 allowed for people to do Evil Things via ioctl(2).

  Security: FreeBSD-SA-05:06.iir

Thanks to Colin Percival for notifying us!

sys/dev/raid/iir/iir_ctrl.c

index 20e794e..6c2793e 100644 (file)
@@ -1,5 +1,5 @@
 /* $FreeBSD: src/sys/dev/iir/iir_ctrl.c,v 1.2.2.4 2002/05/05 08:18:12 asmodai Exp $ */
-/* $DragonFly: src/sys/dev/raid/iir/iir_ctrl.c,v 1.7 2004/05/19 22:52:47 dillon Exp $ */
+/* $DragonFly: src/sys/dev/raid/iir/iir_ctrl.c,v 1.8 2005/05/06 11:27:51 corecode Exp $ */
 /*
  *       Copyright (c) 2000-01 Intel Corporation
  *       All Rights Reserved
@@ -107,12 +107,12 @@ gdt_make_dev(int unit)
 
 #ifdef SDEV_PER_HBA
     dev = make_dev(&iir_cdevsw, hba2minor(unit), UID_ROOT, GID_OPERATOR,
-                   S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH, "iir%d", unit);
+                   S_IRUSR | S_IWUSR, "iir%d", unit);
 #else
     if (sdev_made)
         return (0);
     dev = make_dev(&iir_cdevsw, 0, UID_ROOT, GID_OPERATOR,
-                   S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH, "iir");
+                   S_IRUSR | S_IWUSR, "iir");
     sdev_made = 1;
 #endif
     reference_dev(dev);