mactest(1)
mactest - Tests MAC labels on directories, files and processes.
As shipped in IRIX 6.5.19. Added in IRIX 6.5.15.
NAME mactest - Tests MAC labels on directories, files and processes. SYNOPSIS 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] DESCRIPTION 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 RETURN VALUE 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). EXAMPLE 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. mactest -M Will return 0(True) if the process MAC label is moldy. FILES /etc/mac - MAC Label definitions. SEE ALSO chlabel(1), newlabel(1), and test(1)