PSL description can be divided into modules, and some modules can be included into others. For example, this lets you put common parts of descriptions into modules and reuse them to write similar solutions for different architectures.
The contents of the connected file are merged with the current file during processing by the nk-psl-gen-c
compiler.
The use
declaration is used to connect a module:
use <path.to.module._>
The underscore character "_
" is used to load all definitions from a specific file (direct equivalent of #include
in C++).
Connecting descriptions of security policy classes
To use class policies, you must connect a PSL file containing the definition of this class.
Class files are located in the folder /opt/KasperskyOS-Community-Edition-<version>/toolchain/include/nk/
Examples:
/* Include basic security policies: grant and deny. */
use nk.base._
/* Connect "Flow" class policies. */
use nk.flow._
Page top