Chat now with support
Chat with Support

Safeguard for Sudo 2.0 - Administrators Guide

One Identity Privileged Access Suite for Unix Introducing Privilege Manager for Unix Introducing Privilege Manager for Sudo Planning Deployment Installation and Configuration
Download Privilege Manager for Unix Software Packages Download Privilege Manager for Sudo Software Packages Quick Start and Evaluation Configure a Primary Policy Server Configure a Secondary Policy Server Install PM Agent or Sudo Plugin on a Remote Host Remove Configurations
Upgrading Privilege Manager 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 Troubleshooting Privilege Manager for Unix Policy File Components Privilege Manager Variables Privilege Manager for Unix Flow Control Statements Privilege Manager for Unix Built-in Functions and Procedures Privilege Manager Programs Installation Packages Unsupported Sudo Options Sudo Plugin Policy Evaluation About us

hashtable_add

Syntax
int hashtable_add ( int hid, string key , list value)
Description

hashtable_add adds a new list value to the specified hash table, associated with the specified key.

Returns 0 if the hash table was successfully added, otherwise returns non-zero.

Example
hid=hashtable_create(); 
hashtable_add(hid, "unxadm", {"johnd", "davel", "jamesp"}); 
hashtable_add(hid, "winadm", {"marym", "stevec", "janel"}); 
print("Windows Admin Group:" + hashtable_lookup(hid, "winadm")); 

hashtable_create

Syntax
int hashtable_create ()
Description

hashtable_create creates a new hash table that can be used to store key-value pairs in a format that allows more efficient searching than an array.

Returns an identifier that you can use to add entries to and search the hash table.

Example
hid=hashtable_create(); 
hashtable_add(hid, "unxadm", {"johnd", "davel", "jamesp"}); 
hashtable_add(hid, "winadm", {"marym", "stevec", "janel"}); 
print("Windows Admin Group:" + hashtable_lookup(hid, "winadm")); 

hashtable_enum

Syntax
string hashtable_enum (int hid, [int reset])
Description

hashtable_enum returns the next entry in a hash table.

Example
hid=hashtable_create(); 
hashtable_add(hid, "unxadm", {"johnd", "davel", "jamesp"}); 
hashtable_add(hid, "winadm", {"marym", "stevec", "janel"}); 
print("Windows Admin Group:" + hashtable_lookup(hid, "winadm")); 
for (x=hashtable_enum (hid,1); x!=""; x=hashtable_enum(hid,0)) { 
   printf("Table contains key=%s\n", x); 
}

hashtable_import

Syntax
int hashtable_import ( int hid, string filename )
Description

hashtable_import reads a specified file and uses the contents to create a hash table containing hash table entries, one per line, consisting of a single hash key, a colon, and a comma-separated list of hash values. The file may also contain comments delimited by the # character.

If successfully imported, it returns the number of entries in the hash table.

Example
#File admgroups.txt contains the formatted text 
unxadm:john,bob,fred,jane 
winadm:mary,chris,henry 

#policy loads this file into a hashtable that identifies the group permissions, 
hid=hashtable_create(); 
count=hashtable_import(hid, "/etc/opt/quest/qpm4u/tables/admgroups.txt"); 
printf("Import loaded %d groups\n", count); 
unxadm=hashtable_lookup(hid, "unxadm"); 
if (user !in unxadm) 
{ 
   reject "You are not authorized to run this command"; 
}
Related Documents