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.
Description
Type integer READONLY
Process ID of client's parent process.
Example
# only allow requests submitted from a login shell
# (parent process name starts with a dash)
if (client_parent_procname[0] == "-") {
printf("process info -- name:[%s], pid[%d], uid[%d]\n"
client_parent_procname, client_parent_pid, client_parent_uid);
reject "only requests from login shells are allowed";
}
Description
Type integer READONLY
User ID associated with the client's parent process.
Example
# only allow requests submitted from a login shell
# (parent process name starts with a dash)
if (client_parent_procname[0] == "-") {
printf("process info -- name:[%s], pid[%d], uid[%d]\n"
client_parent_procname, client_parent_pid, client_parent_uid);
reject "only requests from login shells are allowed";
}