mactest(1) mactest(1)
mactest - Tests MAC labels on directories, files and processes.
mactest -P -D|d|e|x file
mactest -F -D|d|e|x file1 file2
mactest -L -D|d|e|x label file1
mactest -M [directory]
The mactest command allows the current process and specified
files/directories to have their MAC label attributes compared for
dominance, equality and moldyness.
mactest evaluates the MAC labels using the given options and returns a
boolean result.
The options P, F, L and M determine the type of test:
-P Compare current running process and file.
-F Compare two files.
-L Compare MAC label and file.
-M Check if the process or directory is moldy.
The options D, d, e and x determine the type of comparison test:
D if [Process | file1 | maclabel] dominates file
d if [Process | file1 | maclabel] is dominated by file
e if [Process | file1 | maclabel] and file compare as equal
x if [Process | file1 | maclabel] and file are exactly equal
mactest returns 0(True) if the test is successful, 1(False) if the test
failed and -1 on error.
The -M (moldy) test option will only return 0(True) if the current
process is also moldy, as moldy directories are transparent to non-moldy
processes. See newlabel(1).
mactest -P -D abc.txt
Will return 0(True) if the process MAC label dominates the MAC label
of the file abc.txt
mactest -Lx userlow abc.txt
Will return 0(True) if the label 'userlow' is exactly the same as
the MAC label of abc.txt
mactest -M tmp
Will return 0(True) if the directory 'tmp' has a moldy MAC label.
Page 1
mactest(1) mactest(1)
mactest -M
Will return 0(True) if the process MAC label is moldy.
/etc/mac - MAC Label definitions.
chlabel(1), newlabel(1), and test(1)
PPPPaaaaggggeeee 2222 [ Back ]
|