string readdir ( string path [, string filter] )
readdir reads the contents of the directory identified by path, and returns the list of files as a string. If you supply a filter, it applies a glob-style filter and only returns those files that match the filter in the string. If you do not supply a fully qualified path, it assumes the path is relative to the path identified by the policyDir setting in the pm.settings file.
#find all *.profile files in the profiles directory and include any found incfiles=readdir("profiles", "*.profile"); incfile_list=split(incfiles); for onefile in incfile_list { include onefile; }
string readfile ( string filename )
The readfile function reads the contents of the specified file and returns the contents as a single string. Note that any new lines in the file will be present in the string returned by readfile. If the file does not exist, it rejects the session and produces a syntax error.
#print a welcome msg from a file in /etc/ x=readfile("/etc/custom_welcome.txt"); print (x);
string sprintf ( string format [, expression expr, ...])
The sprintf function returns a formatted string.
For more information about formatting parameters, see the printf(3) man page.
printf("User= %-8.8s Application: %s\n", user, app);
Prints the same as:
a=sprintf("User= %-8.8s Application: %s", user, app); print(a);
syslog ( string format [, expression expr, ...])
syslog sends a formatted message to syslog as a LOG_INFO message.
For more information about configuring syslog messages, see the syslog(3) man page.
syslog("Accepted request from %s@%s", user, submithost);
© 2024 One Identity LLC. ALL RIGHTS RESERVED. Nutzungsbedingungen Datenschutz Cookie Preference Center