Change ACPI make_dev() calls to use UID_ and GID_ constants rather

than hard-coded uids and gids.

Switch the device to a group of wheel instead of operator.

Narrow down the permissions on the device to require root privilege
to manipulate the system power state.  It may be that we can broaden
access to the device after review of the access control in ACPI.

Submitted by:	kris
Reviewed by:	takawata
This commit is contained in:
rwatson 2002-12-28 14:58:50 +00:00
parent 73bbe5c126
commit fe7f98e604

View File

@ -487,7 +487,8 @@ acpi_attach(device_t dev)
/*
* Create the control device
*/
sc->acpi_dev_t = make_dev(&acpi_cdevsw, 0, 0, 5, 0660, "acpi");
sc->acpi_dev_t = make_dev(&acpi_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600,
"acpi");
sc->acpi_dev_t->si_drv1 = sc;
#ifdef ACPI_DEBUGGER