Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add SELinux policy source files #1187

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,7 @@ Sass
Scala
Scheme
Scons
SeLinuxPolicySourceFile
Sh
ShaderLab
Slang
Expand Down
5 changes: 5 additions & 0 deletions languages.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down
20 changes: 20 additions & 0 deletions tests/data/selinux.te
Original file line number Diff line number Diff line change
@@ -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
Loading