list_devices - list allocatable devices
list_devices [-s] [-U uid] [-z zonename] [-a [-w]] -l | -n | -u [device] | [-l | -n | -u] -c dev-class
list_devices [-s] -d dev-type
The list_devices utility lists the allocatable devices in the system according to specified qualifications.
The device and all device special files associated with the device are listed. The device argument is optional and, if it is not present, all relevant devices are listed. If dev-class is present, devices belonging to the specified dev-class are listed. There is no default dev-class.
The following options are supported:
-l [-c dev-class | device]
If dev-class is specified, lists only the files associated with all devices of the specified device class.
If device is specified, lists only the files associated with the specified device.
-n [-c dev-class | device]
If dev-class is specified, lists only the files associated with all devices of the specified device class.
If device is specified, lists only the files associated with the specified device.
-s
-u [-c dev-class | device]
If dev-class is specified, lists only the files associated with all devices of the specified device class.
If device is specified, lists only the files associated with the specified device.
-U uid
The following options are supported when the system is configured with Trusted Extensions:
-a
The list is a single line of semicolon (;) separated key=value pairs for each device in the format:
device=device-name;type=device-type;\ auths=auths;clean=device-exec;\ device-attributes;\ files=device-list
where device-attributes is the contents of the reserved1 field of device_allocate(4). The field is colon (:) separated.)
See device_allocate(4) for a description of these attributes and their format.
The -a output has the following keys:
auths
clean
device
files
type
-d
-w
-z zonename
When specified with the -n option, lists only those non-allocated devices whose label range includes the label of the zonename.
When specified with the -u option, lists only those devices that are allocated at the same label as that of zonename.
Example 1 Listing All Devices
The following example lists all devices available to the caller for allocation:
% list_devices -l device: audio type: audio \ files: /dev/audio /dev/audioctl /dev/sound/0 /dev/sound/0ctl
Example 2 Listing Attributes of All Devices
On a system configured with Trusted Extensions, the following example lists attributes of all devices available to the caller for allocation:
% list_devices -al device=audio1;type=audio;\ auths=solaris.device.allocate;\ clean=/etc/security/lib/audio_clean;\ minlabel=admin_low:maxlabel=admin_high;\ files=/dev/audio1 /dev/audio1ctl /dev/sound/1 /dev/sound/1ctl
Example 3 Listing Attributes Including the Device Owner
On a system configured with Trusted Extensions, the following example lists attributes including the device owner of all devices allocated to the user:
% list_devices -auw device=audio2;type=audio;auths=solaris.device.allocate;\ clean=/etc/security/lib/audio_clean;\ minlabel=admin_low:maxlabel=admin_high:zone=public;\ owner=1234;\ files=/dev/audio2 /dev/audio2ctl /dev/sound/2 /dev/sound/2ctl
The following exit values are returned:
0
20
other value
/etc/security/device_allocate
/etc/security/device_maps
/etc/security/dev/*
See attributes(5) for descriptions of the following attributes:
|
The invocation is Uncommitted. The options are Uncommitted. The output from the -a and -w options is Uncommitted. All other output is Not-an-Interface.
allocate(1), deallocate(1), bsmconv(1M), dminfo(1M), mkdevalloc(1M), mkdevmaps(1M), device_allocate(4), device_maps(4), attributes(5)
The functionality described in this man page is available only if Solaris Auditing has been enabled. See bsmconv(1M) for more information.
On systems configured with Trusted Extensions, the functionality is enabled by default.
/etc/security/dev, mkdevalloc(1M), and mkdevmaps(1M) might not be supported in a future release of the Solaris Operating Environment.
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |