Custom functions
What are custom functions?
Custom functions (also referred to as user written functions) are standalone units of security code you write that perform specific programming tasks. After you write a function you can invoke it in any security policy file to perform its specific task or function.
How are custom functions useful to my organization?
To help simplify security policy implementation, the Security Policy Scripting Language enables the security administrator to write custom functions and procedures. For more information about the difference between these two, see Functions and procedures.
Functions are standalone units of security code that perform specific programming tasks. After you write a function you can invoke it in any security policy file to perform its specific task or function.
Important information
- In most cases, the order of the instructions in a security policy file is not important. The user’s security requirements determine the rules that the file contains.
- The overall structure of a security policy file is user-written functions first, followed by a security policy code.
Best practices
- Write functions for repetitive programming tasks. This centralizes the logic and allows for updating in one place while reusing it in multiple places.
- By centralizing the logic for a repetitive type task in a single function, all of the security policy files that call the function automatically benefit from any updates that are made to the function.
Updated 23 days ago