Chat now with support
Chat mit Support

Privilege Manager for Unix 7.1.1 - Administration Guide

Introducing Privilege Manager for Unix Planning Deployment Installation and Configuration Upgrade Privilege Manager for Unix System Administration Managing Security Policy The Privilege Manager for Unix Security Policy Advanced Privilege Manager for Unix Configuration Administering Log and Keystroke Files InTrust Plug-in for Privilege Manager for Unix Troubleshooting Privilege Manager for Unix Policy File Components Privilege Manager for Unix Variables
Variable names Variable scope Global input variables Global output variables Global event log variables PM settings variables
Privilege Manager for Unix Flow Control Statements Privilege Manager for Unix Built-in Functions and Procedures
Environment functions Hash table functions Input and output functions LDAP functions LDAP API example List functions Miscellaneous functions Password functions Remote access functions String functions User information functions Authentication Services functions
Privilege Manager for Unix programs Installation Packages

comparehosts

Syntax
int comparehosts(hoststring, hostpattern)
Description

comparehosts checks whether a host string (either host name or IP string) matches a host definition, which could be a host name (such as, host1.a.b.com), IP address (such as, 10.10.10.1), netgroup (such as, @mygroup1), host pattern (such as, *.a.b.com) or IP address (such as, 10.10.10.*).

This function honors the value of short names defined in pm.settings when resolving host names.

Returns 1 if a match is found, 0 if no match is found.

Example
if (comparehosts(submithost,"*.a.b.com")) 
   { 
      ... 
   }

datecmp

Syntax
int datecmp(date1, date2)
Description

datecmp compares the two dates, which must be in the format YYYY/MM/DD or YY/MM/DD (in which case 2000 is added to the year).

This function returns these values:

  • -1: date1 < date2
  • 1: date1 > date2
  • 0: date1 = date2
Example
if (datecmp(startdate, enddate) >=0) 
   { 
      reject “startdate must be before enddate”; 
   }

dirname

Syntax
string dirname ( string pathname )
Description

dirname returns the directory portion of a pathname. It does not check that the filename or path exist.

Example
print(dirname("/var/adm/pmlog"));

Returns: "/var/adm"

Related Topics

basename

feature_enabled

Syntax
int feature_enabled (int feature )
Description

feature_enabled checks whether a particular feature is enabled on the policy server. Use this function to detect support for platform-dependant features; currently these comprise FEATURE_LDAP and FEATURE_VAS (defined as integer constants).

Returns true if the feature is enabled, otherwise false.

Example
if (feature_enabled(FEATURE_LDAP)) 
{ 
   if (proc_do_ldap_authentication(user)) 
   { 
      accept; 
   } 
}
Verwandte Dokumente

The document was helpful.

Bewertung auswählen

I easily found the information I needed.

Bewertung auswählen