int innetgroup ( string netgroup, string host )
innetgroup returns true if the specified host is in the specified NIS netgroup on the policy server; otherwise returns false.
if ( ! innetgroup("submithosts", submithost)) { reject "You are not permitted to submit a command from this host"; }
int innetuser (string netgroup, string user)
innetuser returns true if the specified user is in the specified NIS netgroup on the policy server; otherwise returns false.
if ( ! innetuser("submitusers", user)) { reject "You are not permitted to submit a command from this host"; }
int lineno( )
lineno returns the current line number in the policy file.
printf("TRACE: user:%s, cmd:%s, lineno:%d\n", user, command, lineno());
string mktemp ( string template )
mktemp returns a unique filename which is guaranteed not to exist on the policy server. Use the mktemp function to create unique temporary filenames.
|
NOTE: For more information, see the mktemp(3) man page. |
#generate a unique filename–the XXXXXX chars will be replaced to construct a unique name filename=mktemp("/tmp/pmXXXXXX"); print(filename); // prints "/tmp/pmAxK2de"
© 2021 One Identity LLC. ALL RIGHTS RESERVED. Feedback Terms of Use Privacy