diff --git a/README.md b/README.md index f3c8eacfc..6e80f4ee8 100644 --- a/README.md +++ b/README.md @@ -521,6 +521,7 @@ Sass Scala Scheme Scons +SeLinuxPolicySourceFile Sh ShaderLab Slang diff --git a/languages.json b/languages.json index 97f741966..53b0ce15a 100644 --- a/languages.json +++ b/languages.json @@ -1546,6 +1546,11 @@ ], "filenames": ["sconstruct", "sconscript"] }, + "SeLinuxPolicySourceFile": { + "name": "SELinux Policy Source File", + "line_comment": ["#"], + "extensions": ["te","if","fc"] + }, "Sh": { "name": "Shell", "shebangs": ["#!/bin/sh"], diff --git a/tests/data/selinux.te b/tests/data/selinux.te new file mode 100644 index 000000000..22730c274 --- /dev/null +++ b/tests/data/selinux.te @@ -0,0 +1,20 @@ +# 20 lines 6 code 11 comments 3 blanks +policy_module(corecommands) + +######################################## +# +# Declarations +# + +# +# Types with the exec_type attribute are executable files. +# +attribute exec_type; + +# +# bin_t is the type of files in the system bin/sbin directories. +# +type bin_t alias { ls_exec_t sbin_t }; +typealias bin_t alias { systemd_detect_virt_t systemd_run_exec_t }; +corecmd_executable_file(bin_t) +dev_associate(bin_t) #For /dev/MAKEDEV \ No newline at end of file