MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


User Commands                                     listdevices(1)



NAME
     listdevices - list allocatable devices

SYNOPSIS
     listdevices [-s] [-U uid] [-z zonename] [-a [-w]
          -l  -n  -u [device]  [-l  -n  -u] -c dev-class


     listdevices [-s] -d dev-type


DESCRIPTION
     The listdevices 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.

OPTIONS
     The following options are supported:

     -l [-c dev-class  device]    Lists  the  pathnames  of  the
                                   device  special  files associ-
                                   ated with the device that  are
                                   allocatable   to  the  current
                                   process.

                                   If  dev-class  is   specified,
                                   lists  only  the files associ-
                                   ated 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]    Lists  the  pathnames  of  the
                                   device  special  files associ-
                                   ated with the device that  are
                                   allocatable   to  the  current
                                   process but are not  currently
                                   allocated.

                                   If  dev-class  is   specified,
                                   lists  only  the files associ-
                                   ated with all devices  of  the
                                   specified device class.



SunOS 5.11          Last change: 30 Apr 2008                    1






User Commands                                     listdevices(1)



                                   If device is specified,  lists
                                   only the files associated with
                                   the specified device.


     -s                            Silent. Suppresses  any  diag-
                                   nostic output.


     -u [-c dev-class  device]    Lists the pathnames of  device
                                   special  files associated with
                                   the device that are  allocated
                                   to  the  owner  of the current
                                   process.

                                   If  dev-class  is   specified,
                                   lists  only  the files associ-
                                   ated with all devices  of  the
                                   specified device class.

                                   If device is specified,  lists
                                   only the files associated with
                                   the specified device.


     -U uid                        Uses the user ID  uid  instead
                                   of  the  real  user  ID of the
                                   current process when  perform-
                                   ing  the  listdevices  opera-
                                   tion. Only  a  user  with  the
                                   solaris.device.revoke authori-
                                   zation can use this option.



     The following options are supported when the system is  con-
     figured with Trusted Extensions:

     -a             Lists attributes like authorizations,  clean-
                    ing  programs  and  labels  associated with a
                    device.

                    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





SunOS 5.11          Last change: 30 Apr 2008                    2






User Commands                                     listdevices(1)



                    where device-attributes is  the  contents  of
                    the  reserved1  field  of deviceallocate(4).
                    The field is colon (:) separated.)

                    See deviceallocate(4) for a  description  of
                    these attributes and their format.

                    The -a output has the following keys:

                    auths     Specifies the  list  of  authoriza-
                              tions.   The   value  is  auths  is
                              described in deviceallocate(4).


                    clean     Specifies   the   device   cleaning
                              script. The value is device-exec as
                              described in deviceallocate(4).


                    device    Specifies  the  device  name.   The
                              value  is  device-name as described
                              in deviceallocate(4).


                    files     Specifies the  device  file  paths.
                              The   value   is   device-list   as
                              described in devicemaps(4).


                    type      Specifies  the  device  type.   The
                              value  is  device-type as described
                              in deviceallocate(4).



     -d             Displays the system-supplied  default  attri-
                    butes  for the device types managed by device
                    allocation.  If  dev-type  is  specified,  it
                    lists  the  default  attributes for only that
                    device type.


     -w             This option can be used with -a to  list  the
                    current  owner of the device as the key value
                    pair owner=value. value is  the  uid  of  the
                    current owner of the device. If the device is
                    unallocated, value is /FRE. If the device is
                    in  error state, value is /EROR. This option
                    also suppresses any diagnostic output.






SunOS 5.11          Last change: 30 Apr 2008                    3






User Commands                                     listdevices(1)



     -z zonename    When specified with the -l option, lists only
                    those non-allocated devices whose label range
                    includes the label of the  zonename,  and  of
                    the  allocated  devices,  only those that are
                    allocated  at  the  same  label  as  that  of
                    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.


EXAMPLES
     Example 1 Listing All Devices


     The following example lists all  devices  available  to  the
     caller for allocation:


       % listdevices -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  follow-
     ing example lists attributes of all devices available to the
     caller for allocation:


       % listdevices -al
       device=audio1;type=audio;\
       auths=solaris.device.allocate;\
       clean=/etc/security/lib/audioclean;\
       minlabel=adminlow:maxlabel=adminhigh;\
       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  follow-
     ing  example  lists attributes including the device owner of



SunOS 5.11          Last change: 30 Apr 2008                    4






User Commands                                     listdevices(1)



     all devices allocated to the user:


       % listdevices -auw
       device=audio2;type=audio;auths=solaris.device.allocate;\
       clean=/etc/security/lib/audioclean;\
       minlabel=adminlow:maxlabel=adminhigh:zone=public;\
       owner=1234;\
       files=/dev/audio2 /dev/audio2ctl /dev/sound/2 /dev/sound/2ctl



EXIT STATUS
     The following exit values are returned:

     0              Successful completion.


     20             No entry for the specified device.


     other value    An error occurred.


FILES
     /etc/security/deviceallocate


     /etc/security/devicemaps


     /etc/security/dev/*


     /usr/security/lib/*

ATRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:
















SunOS 5.11          Last change: 30 Apr 2008                    5






User Commands                                     listdevices(1)



     
           ATRIBUTE TYPE               ATRIBUTE VALUE       
    
     Availability                 SUNWcsu                     
    
     Interface Stability          See below.                  
    



     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.

SEE ALSO
     allocate(1),   deallocate(1),    bsmconv(1M),    dminfo(1M),
     mkdevalloc(1M),      mkdevmaps(1M),      deviceallocate(4),
     devicemaps(4), attributes(5)


     Controlling Access to Devices

NOTES
     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  func-
     tionality is enabled by default.


     /etc/security/dev, mkdevalloc(1M), and  mkdevmaps(1M)  might
     not  be supported in a future release of the Solaris Operat-
     ing Environment.




















SunOS 5.11          Last change: 30 Apr 2008                    6



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™