Description
Type string READONLY
alertkeymatch contains the pattern matched by pmlocald. This variable is not available for use in the policy file, it is only available in the event log. To view the event log, use the pmlog -l command.
Example
#view all alerts recorded in the audit log that match the pattern "passwd"
pmlog –l -c 'alertkeymatch == "passwd"'
Description
Type integer READONLY
argc contains the number of arguments supplied for the original command. This includes the command name itself. For example, if the original command is pmrun ls –al, then argc is set to 2.
Example
# if any arguments are passed to a vi editor program, like vi
# then verify the path is not in a list of forbidden directories
if ((basename(command) in vi_program_list) && (argc > 1))
{
count=0;
while (count < length(forbid_dir_list))
{
if (glob(forbid_dir_list[count], dirname(argv[1])))
{
reject "You are not allowed to edit a file in this directory";
}
count=count+1;
}
}
Description
Type list READONLY
argv is a list of the arguments supplied for the original command, including the command itself. For example, if the original command is pmrun ls –al, then argv is set to {"ls","-al"}.
Example
# if any arguments are passed to an editor program, like vi
# then verify the path is not in a list of forbidden directories
if ((basename(command) in vi_program_list) && (argc > 1))
{
count=0;
while (count < length(forbid_dir_list))
{
if (glob(forbid_dir_list[count], dirname(argv[1])))
{
reject "You are not allowed to edit a file in this directory";
}
count=count+1;
}
}
Description
Type boolean READONLY
bkgd reflects the "-b" background argument of a pmrun call. If the user requested the background mode, it is set to 1.
To change whether the call runs in the background, set the runbkgd variable.