diff options
author | bde <bde@FreeBSD.org> | 1996-06-08 09:18:27 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1996-06-08 09:18:27 +0000 |
commit | 9c80bb05f751163c1e5ab78e8be5f6fbec06d56c (patch) | |
tree | 770c7cab80024855e538bb79ef7714310ef7c08f /sys/i386 | |
parent | 9525e0f3d5530bbfc391218f44451a925357cf13 (diff) | |
download | FreeBSD-src-9c80bb05f751163c1e5ab78e8be5f6fbec06d56c.zip FreeBSD-src-9c80bb05f751163c1e5ab78e8be5f6fbec06d56c.tar.gz |
Fixed group and permissions for devfs devices (group operator was games;
permissions 0640 was 0600).
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/isa/mcd.c | 24 | ||||
-rw-r--r-- | sys/i386/isa/scd.c | 24 | ||||
-rw-r--r-- | sys/i386/isa/wcd.c | 22 |
3 files changed, 38 insertions, 32 deletions
diff --git a/sys/i386/isa/mcd.c b/sys/i386/isa/mcd.c index bfa07c5..96eccec 100644 --- a/sys/i386/isa/mcd.c +++ b/sys/i386/isa/mcd.c @@ -40,7 +40,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: mcd.c,v 1.77 1996/05/03 14:57:24 phk Exp $ + * $Id: mcd.c,v 1.78 1996/05/03 16:49:02 phk Exp $ */ static char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore"; @@ -289,20 +289,22 @@ int mcd_attach(struct isa_device *dev) /* name filled in probe */ kdc_mcd[unit].kdc_description = mcd_data[unit].name; #ifdef DEVFS -#define MCD_UID 0 -#define MCD_GID 13 cd->ra_devfs_token = - devfs_add_devswf(&mcd_cdevsw, (unit * 8 ) + 0, DV_CHR, MCD_UID, - MCD_GID, 0600, "rmcd%da", unit); + devfs_add_devswf(&mcd_cdevsw, dkmakeminor(unit, 0, 0), + DV_CHR, UID_ROOT, GID_OPERATOR, 0640, + "rmcd%da", unit); cd->rc_devfs_token = - devfs_add_devswf(&mcd_cdevsw, (unit * 8 ) + RAW_PART, DV_CHR, - MCD_UID, MCD_GID, 0600, "rmcd%dc", unit); + devfs_add_devswf(&mcd_cdevsw, dkmakeminor(unit, 0, RAW_PART), + DV_CHR, UID_ROOT, GID_OPERATOR, 0640, + "rmcd%dc", unit); cd->a_devfs_token = - devfs_add_devswf(&mcd_bdevsw, (unit * 8 ) + 0, DV_BLK, MCD_UID, - MCD_GID, 0600, "mcd%da", unit); + devfs_add_devswf(&mcd_bdevsw, dkmakeminor(unit, 0, 0), + DV_BLK, UID_ROOT, GID_OPERATOR, 0640, + "mcd%da", unit); cd->c_devfs_token = - devfs_add_devswf(&mcd_bdevsw, (unit * 8 ) + RAW_PART, DV_BLK, - MCD_UID, MCD_GID, 0600, "mcd%dc", unit); + devfs_add_devswf(&mcd_bdevsw, dkmakeminor(unit, 0, RAW_PART), + DV_BLK, UID_ROOT, GID_OPERATOR, 0640, + "mcd%dc", unit); #endif return 1; } diff --git a/sys/i386/isa/scd.c b/sys/i386/isa/scd.c index d5a7d87..1c43341 100644 --- a/sys/i386/isa/scd.c +++ b/sys/i386/isa/scd.c @@ -41,7 +41,7 @@ */ -/* $Id: scd.c,v 1.19 1996/05/03 14:57:25 phk Exp $ */ +/* $Id: scd.c,v 1.20 1996/05/03 16:49:03 phk Exp $ */ /* Please send any comments to micke@dynas.se */ @@ -247,20 +247,22 @@ int scd_attach(struct isa_device *dev) TAILQ_INIT(&cd->head); #ifdef DEVFS -#define SCD_UID 0 -#define SCD_GID 13 cd->ra_devfs_token = - devfs_add_devswf(&scd_cdevsw, (unit * 8 ) + 0, DV_CHR, SCD_UID, - SCD_GID, 0600, "rscd%da", unit); + devfs_add_devswf(&scd_cdevsw, dkmakeminor(unit, 0, 0), + DV_CHR, UID_ROOT, GID_OPERATOR, 0640, + "rscd%da", unit); cd->rc_devfs_token = - devfs_add_devswf(&scd_cdevsw, (unit * 8 ) + RAW_PART, DV_CHR, - SCD_UID, SCD_GID, 0600, "rscd%dc", unit); + devfs_add_devswf(&scd_cdevsw, dkmakeminor(unit, 0, RAW_PART), + DV_CHR, UID_ROOT, GID_OPERATOR, 0640, + "rscd%dc", unit); cd->a_devfs_token = - devfs_add_devswf(&scd_bdevsw, (unit * 8 ) + 0, DV_BLK, SCD_UID, - SCD_GID, 0600, "scd%da", unit); + devfs_add_devswf(&scd_bdevsw, dkmakeminor(unit, 0, 0), + DV_BLK, UID_ROOT, GID_OPERATOR, 0640, + "scd%da", unit); cd->c_devfs_token = - devfs_add_devswf(&scd_bdevsw, (unit * 8 ) + RAW_PART, DV_BLK, - SCD_UID, SCD_GID, 0600, "scd%dc", unit); + devfs_add_devswf(&scd_bdevsw, dkmakeminor(unit, 0, RAW_PART), + DV_BLK, UID_ROOT, GID_OPERATOR, 0640, + "scd%dc", unit); #endif return 1; } diff --git a/sys/i386/isa/wcd.c b/sys/i386/isa/wcd.c index 76e04c5..56182fb 100644 --- a/sys/i386/isa/wcd.c +++ b/sys/i386/isa/wcd.c @@ -356,20 +356,22 @@ wcdattach (struct atapi *ata, int unit, struct atapi_params *ap, int debug, dev_attach (&t->cf); #ifdef DEVFS -#define WDC_UID 0 -#define WDC_GID 13 t->ra_devfs_token = - devfs_add_devswf(&wcd_cdevsw, (lun * 8), DV_CHR, WDC_UID, - WDC_GID, 0600, "rwcd%da", lun); + devfs_add_devswf(&wcd_cdevsw, dkmakeminor(lun, 0, 0), + DV_CHR, UID_ROOT, GID_OPERATOR, 0640, + "rwcd%da", lun); t->rc_devfs_token = - devfs_add_devswf(&wcd_cdevsw, (lun * 8) + RAW_PART, DV_CHR, - WDC_UID, WDC_GID, 0600, "rwcd%dc", lun); + devfs_add_devswf(&wcd_cdevsw, dkmakeminor(lun, 0, RAW_PART), + DV_CHR, UID_ROOT, GID_OPERATOR, 0640, + "rwcd%dc", lun); t->a_devfs_token = - devfs_add_devswf(&wcd_bdevsw, (lun * 8), DV_BLK, WDC_UID, - WDC_GID, 0600, "wcd%da", lun); + devfs_add_devswf(&wcd_bdevsw, dkmakeminor(lun, 0, 0), + DV_BLK, UID_ROOT, GID_OPERATOR, 0640, + "wcd%da", lun); t->c_devfs_token = - devfs_add_devswf(&wcd_bdevsw, (lun * 8) + RAW_PART, DV_BLK, - WDC_UID, WDC_GID, 0600, "wcd%dc", lun); + devfs_add_devswf(&wcd_bdevsw, dkmakeminor(lun, 0, RAW_PART), + DV_BLK, UID_ROOT, GID_OPERATOR, 0640, + "wcd%dc", lun); #endif return (1); } |