Lists the security attributes of a file, directory, process, or interprocess communication (IPC).
The lstxattr command lists Trusted AIX® security attributes of the file, process, shared memory, message queue or semaphore that is specified by the Name parameter. The command interprets the Name parameter as either a file, process, shared memory, message queue or semaphore based on whether the -f (file), -p (process), -m (shared memory), -q (message queue) or -s (semaphore) flag is specified.
By default, the lstxattr command displays all the security attributes for the specified object. To view the selected attributes, use the -a List flag.
By default, the security attributes are listed on one line. The command displays the attribute information as Attribute = Value definitions, each separated by a blank space. To list the attributes in stanza format, use the -F flag. To list the attributes as colon-separated records, use the -C flag.
Item | Description |
---|---|
-a List | Lists the attributes to display. The List variable requires
a blank space between attributes to list multiple attributes. If you
specify an empty list, the command displays only the object names.
The attributes that can be listed in the List variable are
dependent on which one of the -f, -p, -m, -q or -s flags
that you specified. Use the following file security attributes
for the -f flag:
Use the following process security attributes
for the -p flag:
Use the following security attributes for the -q,
-m, and -s flags:
|
-C | Displays the privileged security attributes in colon-separated
records in the following way:
The output is preceded by a comment line that lists details
about the attribute represented in each colon-separated field. If
you specify the -a flag, the order of the attributes matches
the order specified in the -a flag. If an object does not have
a value for a given attribute, the field is still displayed but is
empty. The last field in each entry is ended by a newline character
rather than a colon. |
-f | Lists the security attributes of a file. The Name parameter specifies the path to this file on the system. |
-F | Displays the output in stanza format, with each stanza identified
by a object name. Each Attribute = Value pair is listed on
a separate line:
|
-m | Lists the security attributes of a shared memory. The Name parameter specifies the numeric shared memory identifier on the system. |
-p | Lists the security attributes of a process. The Name parameter specifies the numeric process identifier (PID) of an active process on the system. |
-q | Lists the security attributes of a message queue. The Name parameter specifies the numeric message queue identifier on the system. |
-s | Lists the security attributes of a semaphore. The Name parameter specifies the numeric semaphore identifier on the system. |
Item | Description |
---|---|
Name | The object to list. The Name parameter is interpreted according to which one of the -f, -p, -m, -q or -s flags that you specified. |
Files Accessed:
Item | Description |
---|---|
Mode | File |
r | /etc/security/enc/LabelEncodings |
lstxattr –f regfile
lstxattr –f -a maxsl minsl tl dirname
lstxattr –q –a sl tl 0
lstxattr –m –a sl tl 3145728