1*2d543d20SAndroid Build Coastguard WorkerSELinux Common Intermediate Language (CIL) Compiler 2*2d543d20SAndroid Build Coastguard Worker 3*2d543d20SAndroid Build Coastguard WorkerINTRODUCTION 4*2d543d20SAndroid Build Coastguard Worker 5*2d543d20SAndroid Build Coastguard Worker The SELinux CIL Compiler is a compiler that converts the CIL language as 6*2d543d20SAndroid Build Coastguard Worker described on the CIL design wiki into a kernel binary policy file. 7*2d543d20SAndroid Build Coastguard Worker Please see the CIL Design Wiki at: 8*2d543d20SAndroid Build Coastguard Worker http://github.com/SELinuxProject/cil/wiki/ 9*2d543d20SAndroid Build Coastguard Worker for more information about the goals and features on the CIL language. 10*2d543d20SAndroid Build Coastguard Worker 11*2d543d20SAndroid Build Coastguard WorkerDEPENDENCIES 12*2d543d20SAndroid Build Coastguard Worker 13*2d543d20SAndroid Build Coastguard Worker gcc >= 4.5.1 14*2d543d20SAndroid Build Coastguard Worker libsepol >= 2.5 15*2d543d20SAndroid Build Coastguard Worker 16*2d543d20SAndroid Build Coastguard Worker 17*2d543d20SAndroid Build Coastguard WorkerBUILD STEPS 18*2d543d20SAndroid Build Coastguard Worker 19*2d543d20SAndroid Build Coastguard Worker Run "make" with one of the following targets: 20*2d543d20SAndroid Build Coastguard Worker 21*2d543d20SAndroid Build Coastguard Worker make 22*2d543d20SAndroid Build Coastguard Worker Build the CIL compiler (secilc). 23*2d543d20SAndroid Build Coastguard Worker 24*2d543d20SAndroid Build Coastguard Worker make test 25*2d543d20SAndroid Build Coastguard Worker Pass a sample policy to test with the compiler. 26*2d543d20SAndroid Build Coastguard Worker 27*2d543d20SAndroid Build Coastguard Worker make install 28*2d543d20SAndroid Build Coastguard Worker Install the secilc compiler and man page to disk. 29*2d543d20SAndroid Build Coastguard Worker 30*2d543d20SAndroid Build Coastguard Worker make clean 31*2d543d20SAndroid Build Coastguard Worker Remove temporary build files. 32*2d543d20SAndroid Build Coastguard Worker 33*2d543d20SAndroid Build Coastguard Worker make man 34*2d543d20SAndroid Build Coastguard Worker Build the secilc man page. 35*2d543d20SAndroid Build Coastguard Worker 36*2d543d20SAndroid Build Coastguard Worker make bare 37*2d543d20SAndroid Build Coastguard Worker Remove temporary build files and compile binaries. 38*2d543d20SAndroid Build Coastguard Worker 39*2d543d20SAndroid Build Coastguard Worker 40*2d543d20SAndroid Build Coastguard WorkerUSAGE 41*2d543d20SAndroid Build Coastguard Worker 42*2d543d20SAndroid Build Coastguard Worker Execute 'secilc' with any number of CIL files as arguments. A binary policy and 43*2d543d20SAndroid Build Coastguard Worker file_contexts file will be created. 44*2d543d20SAndroid Build Coastguard Worker 45*2d543d20SAndroid Build Coastguard Worker Use the '--help' option for more details. 46*2d543d20SAndroid Build Coastguard Worker 47*2d543d20SAndroid Build Coastguard Worker 48*2d543d20SAndroid Build Coastguard WorkerDOCUMENTATION 49*2d543d20SAndroid Build Coastguard Worker 50*2d543d20SAndroid Build Coastguard Worker There is a github markdown CIL Reference Guide in the docs directory. To 51*2d543d20SAndroid Build Coastguard Worker view the table of contents, see README.md in the docs directory. 52*2d543d20SAndroid Build Coastguard Worker 53*2d543d20SAndroid Build Coastguard Worker To convert the github markdown content to HTML and PDF, change to the docs 54*2d543d20SAndroid Build Coastguard Worker directory and run: 55*2d543d20SAndroid Build Coastguard Worker make 56*2d543d20SAndroid Build Coastguard Worker 57*2d543d20SAndroid Build Coastguard Worker The documents will be located in the docs/html and docs/pdf directories. 58*2d543d20SAndroid Build Coastguard Worker 59*2d543d20SAndroid Build Coastguard Worker To build the html and pdf, the pandoc package is required. 60*2d543d20SAndroid Build Coastguard Worker 61*2d543d20SAndroid Build Coastguard WorkerKNOWN ISSUES 62*2d543d20SAndroid Build Coastguard Worker 63*2d543d20SAndroid Build Coastguard Worker - Blocks inside of macros causes undefined behavior 64*2d543d20SAndroid Build Coastguard Worker 65*2d543d20SAndroid Build Coastguard Worker - Policy must be well formed. For example, invalid usage of 66*2d543d20SAndroid Build Coastguard Worker sensitivities/categories/levels may create an unloaded binary 67*2d543d20SAndroid Build Coastguard Worker 68*2d543d20SAndroid Build Coastguard Worker - Recursive limits are not handled 69