Syntax
string getstringsetting ( string variable_name)
Description
getstringsetting returns the value of a string setting in the pmpolicy server host settings file. If the named config is not present in the policy server host setting file, it returns an empty string.
Example
if (getstringsetting("eventLogQueue") == false ) {
reject;
}
Syntax
boolean getyesnosetting ( string <variable_name>)
Description
getyesnosetting returns the value of a yes/no setting in the current policy server host settings file. If the named config is not present in the policy server host setting file, it returns false.
Example
if (getyesnosetting("sysLogQueue") == false ) {
reject;
}
Syntax
keepenv( string env1 [, string env2, …] )
Description
The keepenv procedure modifies the runenv variable to keep only those environment variables whose names are specified. All others are deleted from the runtime environment. This is used to constrain which environment variables a user may keep when running programs through Privilege Manager for Unix or Safeguard for Sudo when using the pmpolicy style policy.
Example
# reset the environment to the minimum
keepenv("PATH", "TERM", “HOME”, “USER”);
Syntax
string policygetenv ( string name [, string value] )
Description
policygetenv returns the value of the specified environment variable from the policy server.
Example
# print the value of HOME if defined, otherwise print "none"
print(policygetenv("HOME", "none"));