device_maps
File
Device maps are created when you set up device allocation for your system. The /etc/security/device_maps
file includes the device names, device types, and device-special files that are associated with each allocatable device.
The device_maps
file defines the device-special file mappings for each device, which in many cases is not intuitive. This file allows programs to discover which device-special files map to which devices. You can use the dminfo
command, for example, to retrieve the device name, the device type, and the device-special files to specify when you set up an allocatable device. The dminfo
command uses the device_maps
file to report this information.
Each device is represented by a one-line entry in the following format:
device-name:device-type:device-list
Example 4-10 Sample device_maps
Entry
The following example shows an entry in a device_maps
file.
audio0:\ audio:\ /dev/audio /dev/audioctl /dev/dsp /dev/dsp0 /dev/mixer0 /dev/sound/0 /dev/sound/0ctl /dev/sound/audio810\:0mixer /dev/sound/audio810\:0dsp /dev/sound/audio810\:0 /dev/sound/audio810\:0ctl
Lines in the device_maps
file can end with a backslash (\
) to continue an entry on the next line. Comments can also be included. A pound sign (#
) comments all subsequent text until the next newline that is not immediately preceded by a backslash. Leading and trailing blanks are allowed in any field. The fields are defined as follows:
- device-name
-
Specifies the name of the device. For a list of current device names, see Viewing Allocation Information About a Device.
- device-type
-
Specifies the generic device type. The generic name is the name for the class of devices, such as
st
,fd
,rmdisk
, oraudio
. The device-type field logically groups related devices. - device-list
-
Lists the device-special files that are associated with the physical device. The device-list must contain all of the special files that allow access to a particular device. If the list is incomplete, a malevolent user can still obtain or modify private information. Valid entries for the device-list field reflect the device files that are located in the
/dev
directory.