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/dev | |
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/dev')
-rw-r--r-- | sys/dev/mcd/mcd.c | 24 | ||||
-rw-r--r-- | sys/dev/scd/scd.c | 24 |
2 files changed, 26 insertions, 22 deletions
diff --git a/sys/dev/mcd/mcd.c b/sys/dev/mcd/mcd.c index bfa07c5..96eccec 100644 --- a/sys/dev/mcd/mcd.c +++ b/sys/dev/mcd/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/dev/scd/scd.c b/sys/dev/scd/scd.c index d5a7d87..1c43341 100644 --- a/sys/dev/scd/scd.c +++ b/sys/dev/scd/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; } |