<!-- $Id: A201DB11R1_lnx.xml,v 1.2 2008/02/26 08:13:32 mschenke Exp $ -->
<!-- ARCS: $Header: /home/cvs/repository/RDA_4/src/scripting/lib/hcve/A201DB11R1_lnx.xml,v 1.2 2008/02/26 08:13:32 mschenke Exp $ -->
<!--  Change History: 20080226  DEM  Modify documentation -->
<hcve name="Oracle Database 11g R1 (11.1.0) PreInstall (Linux-x86)" type="A" product="DB11R1" platform="linux-x86">
<rule condition="==" id="10" maximum="N" minimum="Adequate" mode="VERIFY" name="OS Certified?" repeat="1" command_type="RDA">
<command><![CDATA[import $OS_NAM,$OS_TYP
call setHcveResult(check($OS_TYP,\
  'Asianux',check(lc($OS_NAM),\
    'quartet',  cmp_kernel('Asianux 3.0','2.6.18'),\
    'trinity',  cmp_kernel('Asianux 2.0','2.6.9'),\
                'Not certified [Asianux version]'),\
  'Enterprise', 'Adequate',\
  'Red Hat',check(lc($OS_NAM),\
    'tikanga',  cmp_kernel('RH EL5','2.6.18'),\
    'nahant',   cmp_kernel('RH EL4','2.6.9'),\
    'taroon',   cmp_kernel('RH EL3'),\
    'pensacola',cmp_kernel('RH AS2.1'),\
    'derry',    cmp_kernel('RH AS2.1-ia64'),\
    'destin',   cmp_kernel('RH ASDE2.1'),\
    'panama',   cmp_kernel('RH ES2.1'),\
    'shrike',   cmp_kernel('RH 9.0'),\
    'psyche',   cmp_kernel('RH 8.0'),\
    'valhalla', cmp_kernel('RH 7.3'),\
    'enigma',   cmp_kernel('RH 7.2'),\
    'seawolf',  cmp_kernel('RH 7.1'),\
    'guinness', cmp_kernel('RH 7.0'),\
    'zoot',     cmp_kernel('RH 6.2'),\
                'Not certified [Red Hat version]'),\
  'SuSE',check($OS_NAM,\
    'SLES-10',cmp_kernel('SUSE 10','2.6.16-21'),\
              'Not certified [Suse version]'),\
  'Not certified [OS]'))
]]></command>
<description><![CDATA[This rule checks for the correct version of Linux required for installing Oracle Database 11g.]]></description>
<action type="negative"><![CDATA[!!SHOWSTOPPER!!
You do not have the correct version of Linux installed on your server. For the certified versions of Linux, see the ''Oracle Database Installation Guide 11g Release 1 (11.1) for Linux x86'' and Oracle MetaLink.]]></action>
<action type="positive"><![CDATA[The correct version of Linux is installed on your server.]]></action>
</rule>
<rule condition="==" id="20" maximum="N" minimum="userOK" mode="VERIFY" name="User in /etc/passwd?" repeat="1" command_type="RDA">
<command><![CDATA[call setHcveResult(cond(\
  not(testFile('r','/etc/passwd')),\
    'Can not read /etc/passwd',\
  grepFile('/etc/passwd',\
           concat('^',assign($usr,command('/usr/bin/id -nu')),':'),\
           'f'),\
    'userOK',\
    concat($usr,' not in /etc/passwd.')))
]]></command>
<description><![CDATA[This rule verifies that the user name of the user who runs this script is found in the /etc/passwd file.]]></description>
<action type="negative"><![CDATA[The /etc/passwd file does not contain the user or else the file has no read permission. Add the user to the /etc/passwd file if the user does not exist in the file.]]></action>
<action type="positive"><![CDATA[The /etc/passwd file contains the user. No action is required.]]></action>
</rule>
<rule condition="==" id="40" maximum="N" minimum="GroupOK" mode="VERIFY" name="Group in /etc/group?" repeat="1" command_type="RDA">
<command><![CDATA[call setHcveResult(cond(\
  not(testFile('r','/etc/group')),\
    'Can not read /etc/group',\
  grepFile('/etc/group',concat('^',command('/usr/bin/id -ng'),':'),'f'),\
    'GroupOK',\
    'Group not in /etc/group'))
]]></command>
<description><![CDATA[This rule verifies that the group to which the user belongs exists in the /etc/group file.]]></description>
<action type="negative"><![CDATA[ALERT:
The /etc/group file does not contain the group. Add the group to the /etc/group file.]]></action>
<action type="positive"><![CDATA[The /etc/group file contains the group of the user. No action required.]]></action>
</rule>
<rule condition="==" id="50" minimum="$ORACLE_HOME" mode="RECORD" name="Input ORACLE_HOME" repeat="1" command_type="PROMPT">
<command><![CDATA[Planned ORACLE_HOME location or if set]]></command>
<description><![CDATA[Variable to store ORACLE_HOME entered during the execution.]]></description>
</rule>
<rule condition="=~" id="60" maximum="N" minimum="OHexists|OHsymlink|OHNotSpecified" mode="VERIFY" name="ORACLE_HOME Valid?" repeat="1" command_type="RDA">
<command><![CDATA[var $ORACLE_HOME = replaceEnv('%50%')
call setHcveResult(cond(\
  not(defined($ORACLE_HOME)),    'OHNotSpecified',\
  not(testDir('d',$ORACLE_HOME)),'OHnotvalid',\
  not(testDir('l',$ORACLE_HOME)),'OHexists',\
                                 'OHsymlink'))
]]></command>
<description><![CDATA[This rule checks for the Oracle home directory.]]></description>
<action type="negative" syntax="wiki"><![CDATA[ALERT:
There is something wrong with the Oracle home. Verify the following:
|*Return Value*|*Action*|
|OHnotvalid|Ensure that you provided the correct location or that the directory is created and then run this script again|
|OHsymlink|ORACLE_HOME is a symbolic link|]]></action>
<action type="positive"><![CDATA[The Oracle home directory exists. No action required]]></action>
</rule>
<rule condition="=~" id="70" maximum="N" minimum="CorrectPerms|OHNotSpecified" mode="VERIFY" name="O_H Permissions OK?" repeat="1" command_type="RDA">
<command><![CDATA[var $ORACLE_HOME = replaceEnv('%50%')
call setHcveResult(cond(\
  not(defined($ORACLE_HOME)),    'OHNotSpecified',\
  not(testDir('d',$ORACLE_HOME)),'OHNotExist',\
  not(testDir('r',$ORACLE_HOME)),'NoReadPerm',\
  not(testDir('w',$ORACLE_HOME)),'NoWritePerm',\
  not(testDir('x',$ORACLE_HOME)),'NoExecutePerm',\
                                 'CorrectPerms'))
]]></command>
<description><![CDATA[This rule checks that the user has the correct privileges to install Oracle Database 11g in the Oracle home directory.]]></description>
<action type="negative" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|NoReadPerm|Ensure that the install user has read permission for the Oracle home directory|
|NoWritePerm|Ensure that the install user has write permission for the Oracle home directory|
|NoExecutePerm|Ensure that the install user has execute permission for the Oracle home directory|
|OHNotExist|The Oracle home directory does not exist. Create the ORACLE_HOME mount point and ensure that the permissions are set correctly (chmod 755)|
|OHNotSpecified|RDA cannot verify the Oracle home directory because ORACLE_HOME is not specified|]]></action>
<action type="positive"><![CDATA[The permissions for the Oracle home directory are correct. No action required.]]></action>
</rule>
<rule condition="=~" id="80" maximum="N" minimum="oraInventoryOK|oraInventoryNotFound" mode="VERIFY" name="oraInventory Permissions" repeat="1" command_type="RDA">
<command><![CDATA[call setHcveResult(cond(\
  not(testFile('f','/etc/oraInst.loc')),\
    'oraInventoryNotFound',\
  not(testFile('wr',assign($INV_LOC,\
    value(grepFile('/etc/oraInst.loc','^inventory_loc','f'))))),\
    'oraInventoryNotOK',\
    'oraInventoryOK'))
call setHcveVariable('$INV_LOC')
]]></command>
<description><![CDATA[This rule verifies that the user who is installing Oracle Database 11g has sufficient privileges for the oraInventory directory.]]></description>
<action type="negative" syntax="wiki"><![CDATA[The user who is logged in currently to install Oracle Database 11g cannot access (write and read) oraInventory. Verify that the user can write to the directory specified in the /etc/oraInst.loc file.
|*Return Value*|*Action*|
|oraInventoryNotOK|Make sure the install user has write permission to ${INV_LOC}|
|oraInventoryNotFound|The /etc/oraInst.loc file was not found.  This is not a problem if this is the first Oracle installation on the system.|]]></action>
<action type="positive"><![CDATA[The user who is logged in currently either has sufficient privileges for the oraInventory directory to install Oracle Database 11g or this is the first Oracle product to be installed on the system in which case the installer creates the oraInventory directory. No action required.]]></action>
</rule>
<rule condition="==" id="90" maximum="N" minimum="ld_nm_ar_make_found" mode="VERIFY" name="Got ld,nm,ar,make?" repeat="1" command_type="RDA">
<command><![CDATA[var @tbl = ()
macro find_exe
{var (\@tbl,$exe,$ref) = @arg
 var $cmd = findCommand($exe)
 if $cmd
 {if testFile('l',$cmd)
  {var ($lin) = command(concat('/bin/ls -l ',$cmd))
   var $cmd = field('\*',0,field('\s+',10,$lin))
  }
  if !compare('eq',$cmd,$ref)
   var @tbl = (@tbl,concat(ucfirst($exe),'NotFound'))
 }
 else
  var @tbl = (@tbl,concat(ucfirst($exe),'NotFound'))
}
call find_exe(\@tbl,'ar','/usr/bin/ar')
call find_exe(\@tbl,'ld','/usr/bin/ld')
call find_exe(\@tbl,'nm','/usr/bin/nm')
call find_exe(\@tbl,'make','/usr/bin/make')
call setHcveResult(cond(scalar(@tbl),join("\012",@tbl),'ld_nm_ar_make_found'))
]]></command>
<description><![CDATA[This rule verifies that the required assembly tools for the installation of Oracle Database 11g exist.]]></description>
<action type="negative" syntax="wiki"><![CDATA[Some of the required assembly tools for the Oracle Database 11g installation were not found. Check your installation.
|*Return Value*|*Action*|
|ArNotFound|ar either is not found in PATH or not in /usr/bin as required|
|LdNotFound|ld either is not found in PATH or not in /usr/bin as required|
|NmNotFound|nm either is not found in PATH or not in /usr/bin as required|
|MakeNotFound|make either is not found in PATH or not in /usr/bin as required|]]></action>
<action type="positive"><![CDATA[All required assembly tools for the installation of Oracle Database 11g were found. No action required.]]></action>
</rule>
<rule condition="==" id="100" maximum="N" minimum="UmaskOK" mode="VERIFY" name="Umask Set to 022?" repeat="1" command_type="RDA">
<command><![CDATA[call setHcveResult(cond(\
  expr('==','022',command('"umask"')),'UmaskOK','UmaskNotOK')) # Force shell
]]></command>
<description><![CDATA[This rule checks if the umask value is set correctly for installing Oracle Database 11g.]]></description>
<action type="negative"><![CDATA[The umask value is not set correctly. Set the umask to 022 before installing Oracle Database 11g.]]></action>
<action type="positive"><![CDATA[The umask value is set correctly for installing Oracle Database 11g. No action required.]]></action>
</rule>
<rule condition="==" id="120" maximum="N" minimum="Adequate" mode="VERIFY" name="Limit Processes" repeat="1" command_type="RDA">
<command><![CDATA[var $shl = getEnv('SHELL')
macro proc_lmt
{var ($cmd,$flg) = @arg
 var ($val) = command($cmd)
 if $flg
  var $val = field('\s+',1,$val)
 if compare('eq',$val,'unlimited')
  return 'Adequate'
 return cond(and(isNumber($val),expr('>=',$val,16384)),\
             'Adequate',\
             'Less than 16384')
}
call setHcveResult(check(\
  $shl,'csh',proc_lmt(concat($shl,' -f -c "limit maxproc"'),true),\
       'ksh',proc_lmt(concat($shl,' -c "ulimit -p"'),false),\
             proc_lmt(concat($shl,' -c "ulimit -u"'),false)))
]]></command>
<description><![CDATA[This rule checks that the limit of max processes is set to 16384 or higher. For details about configuring this parameter, see the ''Oracle Database Installation Guide 11g Release 1 (11.1) for Linux x86''.]]></description>
<action type="negative" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Less than 16384|Increase the limit for max processes to 16384 or higher.|]]></action>
<action type="positive"><![CDATA[The limit of max processes is set to 16384 or higher.]]></action>
</rule>
<rule condition="==" id="130" maximum="N" minimum="Adequate" mode="VERIFY" name="Limit Descriptors" repeat="1" command_type="RDA">
<command><![CDATA[var $shl = getEnv('SHELL')
macro proc_lmt
{var ($cmd,$flg) = @arg
 var ($val) = command($cmd)
 if $flg
  var $val = field('\s+',1,$val)
 if compare('eq',$val,'unlimited')
  return 'Adequate'
 return cond(and(isNumber($val),expr('>=',$val,65536)),\
             'Adequate',\
             'Less than 65536')
}
call setHcveResult(check(\
  $shl,'csh',proc_lmt(concat($shl,' -f -c "limit descriptors"'),true),\
             proc_lmt(concat($shl,' -c "ulimit -n"'),false)))
]]></command>
<description><![CDATA[This rule checks that the limit of file descriptors is set to 65536 or higher. For details about configuring this parameter, see the ''Oracle Database Installation Guide 11g Release 1 (11.1) for Linux x86''.]]></description>
<action type="negative" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Less than 65536|Increase the limit for file descriptors to 65536 or higher.|]]></action>
<action type="positive"><![CDATA[The limit of descriptors is set to 65536 or higher.]]></action>
</rule>
<rule condition="==" id="140" minimum="UnSet" mode="VERIFY" name="LDLIBRARYPATH Unset?" repeat="1" command_type="RDA">
<command><![CDATA[call setHcveResult(cond(\
  defined(getEnv('LD_LIBRARY_PATH')),'IsSet','UnSet'))
]]></command>
<description><![CDATA[This rule checks that the LD_LIBRARY_PATH environment variable is not set.]]></description>
<action type="negative"><![CDATA[The LD_LIBRARY_PATH environment variable is set in your environment and must be unset before installing Oracle Database 11g.]]></action>
<action type="positive"><![CDATA[The LD_LIBRARY_PATH environment variable is not set. No action required.]]></action>
</rule>
<rule condition="==" id="180" minimum="UnSet" mode="VERIFY" name="JAVA_HOME Unset?" repeat="1" command_type="RDA">
<command><![CDATA[call setHcveResult(cond(\
  defined(getEnv('JAVA_HOME')),'IsSet','UnSet'))
]]></command>
<description><![CDATA[This rule checks that the JAVA_HOME environment variable is not set.]]></description>
<action type="negative"><![CDATA[The JAVA_HOME environment variable is set in your environment and must be unset before installing Oracle Database 11g.]]></action>
<action type="positive"><![CDATA[The JAVA_HOME environment variable is not set. No action required.]]></action>
</rule>
<rule id="190" mode="RECORD" name="JDK Home" minimum="" repeat="1" command_type="PROMPT">
<command><![CDATA[JDK Home]]></command>
<description><![CDATA[This rule prompts user for the JDK home.]]></description>
</rule>
<rule condition="==" id="200" minimum="Adequate" mode="VERIFY" name="JDK Version" repeat="1" command_type="RDA">
<command><![CDATA[var $sdk = replaceEnv('%190%')
if !testDir('d',$sdk)
 return setHcveResult('JDK home is missing')
macro chk_sdk
{var ($dir) = @arg
 var $ver = field('\s+',3,\
   command(concat(catCommand($dir,'java'),' -fullversion 2>&1')))
 var $ver = trim(replace($ver,'[\-\_]','.',true),'"')
 return compare('valid',$ver,'1.5.0.0')
}
var $SDK_BIN = catDir($sdk,'bin')
if !testDir('d',$SDK_BIN)
 return setHcveResult('JDK bin directory is missing')
var $cnt = grepDir($SDK_BIN,'^javac$')
call setHcveResult(cond(not($cnt),         'JDK compiler is missing',\
                        chk_sdk($SDK_BIN), 'Adequate',\
                                           'Need 1.5 or later'))
]]></command>
<description><![CDATA[This rule checks that the JDK version installed is JDK 1.5 or later.]]></description>
<action type="negative" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Need 1.5 or later|Install JDK 1.5 or later|
|JDK bin directory is missing|Install full JDK package.|
|JDK compiler is missing|Install full JDK package.|
|JDK home is missing|Provide correct location for JDK home.|]]></action>
<action type="positive"><![CDATA[The correct JDK version is installed.]]></action>
</rule>
<rule condition="==" id="210" maximum="N" minimum="NoneFound" mode="VERIFY" name="Other O_Hs in PATH?" repeat="1" command_type="RDA">
<command><![CDATA[var @pth = split(':',getEnv('PATH'))
loop $lin (grepFile(catFile('/etc','oratab'),'#|^$','v'))
{var $pat = concat('^',quote(replace(field(':',1,$lin),'\/+$')),'(\/.*)?$')
 if grep(@pth,$pat)
  return setHcveResult('OratabEntryInPath')
}
call setHcveResult('NoneFound')
]]></command>
<description><![CDATA[This rule checks to ensure that the PATH variable does not contain any references to other Oracle home directories based on the /etc/oratab entries.]]></description>
<action type="negative"><![CDATA[The PATH variable contains one or more references to the Oracle homes found in the /etc/oratab file. Remove these references for the PATH variable before installing Oracle Database 11g.]]></action>
<action type="positive"><![CDATA[The PATH does not contain any of the Oracle homes found in the /etc/oratab file. No action required.]]></action>
</rule>
<rule condition="==" id="220" maximum="N" minimum="NoOtherOUI" mode="VERIFY" name="Other OUI Up?" repeat="1" command_type="RDA">
<command><![CDATA[call setHcveResult(cond(\
  grepCommand('/bin/ps -ef','runInstaller','i'),'AnotherOUIup','NoOtherOUI'))
]]></command>
<description><![CDATA[This rule checks for another active runInstaller process on the system.]]></description>
<action type="negative"><![CDATA[Stop the other instance of runInstaller that is currently active on your system.]]></action>
<action type="positive"><![CDATA[No other runInstaller process is running currently. No action required.]]></action>
</rule>
<rule condition="==" id="230" maximum="N" minimum="TempSpaceOK" mode="VERIFY" name="/tmp Adequate?" repeat="1" command_type="RDA">
<command><![CDATA[var @tbl = ()
macro check_tmp
{var (\@tbl,$dir,$siz,$nam) = @arg
 if !testDir('d',$dir)
 {var @tbl = (@tbl,'invalidDir')
  return
 }
 if expr('<',get_df($dir),$siz)
  var @tbl = (@tbl,concat($nam,'TooSmall'))
 elsif !testDir('w',$dir)
  var @tbl = (@tbl,concat($nam,'NoWrite'))
}
var $TEMP = nvl(getEnv('TEMP'),getEnv('TMP'),'/tmp')
var $TMPDIR = getEnv('TMPDIR','/var/tmp')
call setHcveVariable('$TEMP','$TMPDIR')
call check_tmp(\@tbl,$TEMP,400,'Temp')
call check_tmp(\@tbl,$TMPDIR,200,'TMPDIR')
call setHcveResult(cond(scalar(@tbl),join("\012",@tbl),'TempSpaceOK'))
]]></command>
<description><![CDATA[This rule checks for sufficient space available to store temporary files during the Oracle Database 11g installation.]]></description>
<action type="negative" syntax="wiki"><![CDATA[The temp space is not configured correctly.
|*Return Value*|*Action*|
|TempTooSmall|ALERT- Your temporary space ${TEMP} has less than the required 400 MB free space. Make sure your temporary space has at least 400 MB of free space.|
|TempNoWrite|ALERT- Your temporary space ${TEMP} does not have write permissions for this user.|
|TMPDIRTooSmall|ALERT- ${TMPDIR} has less than the required 200 MB. Point the TMPDIR environment variable to a mount point with at least 200 MB of free space.|
|TMPDIRNoWrite|ALERT- TMPDIR is set in the environment; however, ${TMPDIR} does not have write permissions for this user.|
|invalidDir|ALERT- $TEMP or $TMPDIR are set in the environment with an invalid directory.|
FYI: The runInstaller (OUI) uses or checks for temporary space by checking for the TEMP environment variable first, then the TMP environment variable, and lastly the actual '/tmp' mount point.
%BR%The operating system also requires additional space by creating files under /tmp or using the TMPDIR environment variable if it finds it.]]></action>
<action type="positive"><![CDATA[There is sufficient temporary disk space available for installing Oracle Database 11g. No action required.]]></action>
</rule>
<rule condition="=~" id="240" maximum="N" minimum="DiskSpaceOK|OHNotSpecified" mode="VERIFY" name="Disk Space OK?" repeat="1" command_type="RDA">
<command><![CDATA[var $ORACLE_HOME = replaceEnv('%50%')
call setHcveVariable('$ORACLE_HOME')
if !length($ORACLE_HOME)
 return setHcveResult('OHNotSpecified')
if !testDir('d',$ORACLE_HOME)
 return setHcveResult('OHNotValid')
var $dsk = get_df($ORACLE_HOME)
call setHcveResult(cond(expr('>=',$dsk,3584), 'DiskSpaceOK',\
                        expr('>=',$dsk,2048), 'OnlySpaceForOne',\
                                              'NoSpace'))
]]></command>
<description><![CDATA[This rules verifies that the amount of disk space in the Oracle home directory is sufficient for installing Oracle Database 11g.]]></description>
<action type="negative" syntax="wiki"><![CDATA[ORACLE_HOME has insufficient disk space for installing any type of Oracle Database 11g architecture. Verify the specifications.
|*Return Value*|*Action*|
|OnlySpaceForOne|${ORACLE_HOME} has sufficient free disk space to install the Oracle Database 11g software but not enough to create a database.|
|NoSpace|${ORACLE_HOME} has insufficient free disk space for an Oracle Database 11g installation.|
|OHNotValid|Disk space calculations cannot be performed since $ORACLE_HOME is not a valid directory|]]></action>
<action type="positive"><![CDATA[ORACLE_HOME has sufficient disk space to install Oracle Database software, and create a database. No action required.]]></action>
</rule>
<rule condition="==" id="250" maximum="N" mode="RECORD" name="Swap (in MB)" repeat="1" command_type="RDA">
<command><![CDATA[if !testFile('x','/usr/bin/free')
 return setHcveResult('SWAPNotDetermined')
var $swp = field('\s+',1,grepCommand('/usr/bin/free -mt','Swap','f'))
call setHcveResult(cond(isNumber($swp),$swp,'SWAPNotSet'))
]]></command>
<description><![CDATA[This rule shows the amount of free swap space.]]></description>
<action type="negative"><![CDATA[NA]]></action>
<action type="positive"><![CDATA[NA]]></action>
</rule>
<rule condition="&gt;" id="260" minimum="1023" mode="VERIFY" name="RAM (in MB)" repeat="1" command_type="RDA">
<command><![CDATA[call setHcveResult(nvl(\
  field('\s+',1,grepCommand('/usr/bin/free -m','Mem','f')),\
  0))
]]></command>
<description><![CDATA[This rule verifies that your system has sufficient physical memory installed to install Oracle Database 11g.]]></description>
<action type="negative"><![CDATA[ALERT:
The amount of physical memory in your system is not sufficient to install Oracle Database 11g.]]></action>
<action type="positive"><![CDATA[You have sufficient physical memory installed to install Oracle Database 11g. No action required.]]></action>
</rule>
<rule condition="==" id="270" maximum="N" minimum="SwapToRAMOK" mode="VERIFY" name="Swap OK?" repeat="1" command_type="RDA">
<command><![CDATA[var $swp = "%250%"
var $mem = "%260%"
call setHcveResult(cond(\
  not(isNumber($swp)),                      'SwapNotDetermined',\
  expr('<',$swp,1610),                      'InsufficientSwap',\
  not(expr('>',$mem,0)),                    'MemNotDetermined',\
  and(expr('>',$mem,1024),expr('<',$mem,2048)),\
    cond(expr('<',$swp,expr('*',$mem,1.5)), 'SwapLessThanRAM','SwapToRAMOK'),\
  and(expr('>',$mem,2049),expr('<',$mem,8192)),\
    cond(expr('<',$swp,$mem),               'SwapLessThanRAM','SwapToRAMOK'),\
  expr('>',$mem,8192),\
    cond(expr('<',$swp,expr('*',$mem,0.75)),'SwapLessThanRAM','SwapToRAMOK'),\
                                            'SwapToRAMOK'))
]]></command>
<description><![CDATA[This rule verifies that the total amount of swap space is greater than or equal to the amount recommended by the ''Oracle Database Installation Guide 11g Release 1 (11.1) for Linux x86''.]]></description>
<action type="negative" syntax="wiki"><![CDATA[The amount of swap space is less than the amount recommended by the ''Oracle Database Installation Guide 11g Release 1 (11.1) for Linux x86''. Verify the requirements and adjust your system accordingly.
|*Return Value*|*Action*|
|SwapNotDetermined|ALERT- A Swap to Memory ratio cannot be determined because swap is not set up or you do not have execute permission to determine swap|
|SwapLessThanRAM|Alert - Review Note:169706.1 for correct ratio of Swap to Ram|
|InsufficientSwap|ALERT- Oracle Database 11g requires at least 1.6 GB of swap space|]]></action>
<action type="positive"><![CDATA[The amount of swap space meets the minimum requirements for installing Oracle Database 11g. No action required.]]></action>
</rule>
<rule condition="=~" id="280" maximum="N" minimum="Connected|Not connected. Check log." mode="VERIFY" name="Network" repeat="1" command_type="RDA">
<command><![CDATA[call setHcveResult(cond(\
  not(testFile('x','/sbin/ifconfig')),     'Cannot access /sbin/ifconfig',\
  grepCommand('/sbin/ifconfig','eth','f'), 'Connected',\
                                           'Not connected. Check log.'))
]]></command>
<description><![CDATA[This rule checks that the machine is connected to the network. You can install Oracle Database 11g on a standalone machine that is not connected to the network or on a machine that is connected to the network. Although both cases are supported, when the machine is not connected to the network, you must configure the machine to resolve the host name of the computer to either a static IP address or a loopback IP address. To access Oracle Database 11g, you must use a local browser. For more information, see the ''Oracle Database Installation Guide 11g Release 1 (11.1) for Linux x86''.]]></description>
<action type="negative" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Cannot access /sbin/ifconfig|Grant execute permission on /sbin/ifconfig to the current user.|]]></action>
<action type="positive"><![CDATA[The machine is connected to the network.]]></action>
</rule>
<rule id="290" mode="RECORD" name="IP Address" repeat="1" command_type="RDA">
<command><![CDATA[var $hst = field('\.',0,command('hostname'))
var ($lin) = grepFile('/etc/hosts',\
 concat('^[^#]+\s\<?',quote($hst),'\>?($|\.|\s)'),'f')
call setHcveResult(field('\s+',0,$lin))
]]></command>
<description><![CDATA[This rule gets the host IP address.]]></description>
</rule>
<rule id="300" mode="RECORD" name="Domain Name" repeat="1" command_type="RDA">
<command><![CDATA[var $ip = "%290%"
var ($hst) = command('hostname')
var ($nam,$dom) = split('\.',$hst,2)
if testFile('x','/bin/domainname')
 var ($nis) = command('/bin/domainname')
if testFile('r','/etc/resolv.conf')
 var $dns = field('\s+',1,grepFile('/etc/resolv.conf','domain'))
if testFile('x','/usr/bin/nslookup')
{if $nam
 {var $nsl = field(concat(quote($nam),'\.'),1,\
                   grepCommand(concat('/usr/bin/nslookup ',$hst),'Name','f'))
 }
 else
 {var $nsl = field(concat(quote($hst),'\.'),1,\
                   grepCommand(concat('/usr/bin/nslookup ',$hst),'Name','f'))
 }
}
if $ip
{if !$nam
  var $ipn = trim(field(concat($hst,'\.'),1,\
             grepCommand(concat('/usr/bin/nslookup -sil ',$ip),'Name','f')),'.')
}
call setHcveResult(cond($dom,$dom,\
                        and(length($nis),compare('ne',$nis,'(none)')),$nis,\
                        $dns,$dns,\
                        $nsl,$nsl,\
                        $ipn,$ipn,\
                             'Not configured'))
]]></command>
<description><![CDATA[This rule gets the host domain name.]]></description>
</rule>
<rule condition="==" id="310" minimum="Host correctly registered in DNS" mode="VERIFY" name="DNS Lookup" repeat="1" command_type="RDA">
<command><![CDATA[var $dom = "%300%"
var $ip  = "%290%"
var $hst = field('\.',0,command('hostname'))
if !length($hst)
{if and(compare('ne',$dom,'Not configured'),length($dom))
  var $hst = concat($hst,'.',$dom)
}
call setHcveResult(cond(\
  not(length($ip)),\
    'Cannot determine IP address',\
  not(testFile('x','/usr/bin/nslookup')),\
    'Cannot access /usr/bin/nslookup',\
  not(grepCommand(concat('/usr/bin/nslookup -sil ',$hst),quote($ip),'f')),\
    'nslookup host.domain',\
  not(grepCommand(concat('/usr/bin/nslookup -sil ',$ip),quote($hst),'f')),\
    'nslookup IP_address',\
    'Host correctly registered in DNS'))
]]></command>
<description><![CDATA[This rule checks that the host is registered properly in the DNS.]]></description>
<action type="negative" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|nslookup host.domain|The DNS server failed to resolve the nslookup using host.domain.|
|nslookup IP_address|The DNS server failed to resolve the nslookup using IP address.|
|Cannot determine IP address|Fix any problem with the host IP address.|
|Cannot access /usr/bin/nslookup|Grant execute permission on /usr/bin/nslookup to the current user.|]]></action>
<action type="positive"><![CDATA[The host is registered correctly in the DNS.]]></action>
</rule>
<rule condition="==" id="320" minimum="Contains host.domain" mode="VERIFY" name="/etc/hosts Format" repeat="1" command_type="RDA">
<command><![CDATA[var $dom = "%300%"
var $ip  = "%290%"
if !testFile('r','/etc/hosts')
 return setHcveResult('Cannot access /etc/hosts')
var $hst = field('\.',0,command('hostname'))
var $fqd = concat($hst,'.',$dom)
var ($lin) = grepFile('/etc/hosts',quote($fqd),'f')
var @fld = split('\s+',$lin,4)
call setHcveResult(cond(\
  compare('eq',join('|',$fld[0],$fld[1]),join('|',$ip,$fqd)),\
    'Contains host.domain',\
    'Missing host.domain'))
]]></command>
<description><![CDATA[This rule checks that the /etc/hosts file contains a line with "ip_address fully_qualified_hostname short_hostname".]]></description>
<action type="negative" syntax="wiki"><![CDATA[The fully qualified host name is not configured properly. 
|*Return Value*|*Action*|
|Missing host.domain|Add the FQDN to the /etc/hosts file.|
|Cannot access /etc/hosts|Grant read permission on /etc/hosts to the current user.|]]></action>
<action type="positive"><![CDATA[The fully qualified domain name is set correctly.]]></action>
</rule>
<rule condition="==" id="330" maximum="N" minimum="KernelOK" mode="VERIFY" name="Kernel Parameters OK?" repeat="1" command_type="RDA">
<command><![CDATA[import $OS_BIT
var @tbl = ()
var $FILEMAXREQD = 65536
var $RMEMREQD    = 4194304
var $SEMMNIREQD  = 128
var $SEMMNSREQD  = 32000
var $SEMMSLREQD  = 250
var $SEMOPMREQD  = 100
var $SHMALLREQD  = 2097152
var $SHMMAXREQD  = expr('*',%260%,524288)
if expr('==',$OS_BIT,32)
 var $SHMMAXREQD = min(4294967295,$SHMMAXREQD)
var $SHMMNIREQD  = 4096
var $WMEMREQD    = 262144
call setHcveVariable('$FILEMAXREQD','$RMEMREQD','$SEMMNIREQD','$SEMMNSREQD',\
                     '$SEMMSLREQD','$SEMOPMREQD','$SHMALLREQD','$SHMMAXREQD',\
                     '$SHMMNIREQD','$WMEMREQD')
macro chk_minimum
{var (\@tbl,$nam,$max,$val) = @arg
 if !defined($val)
 {var @tbl = (@tbl,concat($nam,'Undef'))
  return
 }
 if expr('<',$val,$max)
  var @tbl = (@tbl,concat($nam,'TooSmall'))
}
call chk_minimum(\@tbl,'FILEMAX',$FILEMAXREQD,\
                 grepFile('/proc/sys/fs/file-max','.','f'))
call chk_minimum(\@tbl,'RMEM_DEFAULT',$RMEMREQD,\
      value(grepCommand('/sbin/sysctl -a','net.core.rmem_default\s*=','f')))
call chk_minimum(\@tbl,'RMEM_MAX',$RMEMREQD,\
      value(grepCommand('/sbin/sysctl -a','net.core.rmem_max\s*=','f')))
var ($lin) = grepFile('/proc/sys/kernel/sem','.','f')
var ($msl,$mns,$opm,$mni) = split('\s+',$lin,5)
call chk_minimum(\@tbl,'SEMMNI',$SEMMNIREQD,$mni)
call chk_minimum(\@tbl,'SEMMNS',$SEMMNSREQD,$mns)
call chk_minimum(\@tbl,'SEMMSL',$SEMMSLREQD,$msl)
call chk_minimum(\@tbl,'SEMOPM',$SEMOPMREQD,$opm)
call chk_minimum(\@tbl,'SHMALL',$SHMALLREQD,\
                 grepFile('/proc/sys/kernel/shmall','.','f'))
call chk_minimum(\@tbl,'SHMMAX',$SHMMAXREQD,\
                 grepFile('/proc/sys/kernel/shmmax','.','f'))
call chk_minimum(\@tbl,'SHMMNI',$SHMMNIREQD,\
                 grepFile('/proc/sys/kernel/shmmni','.','f'))
call chk_minimum(\@tbl,'WMEM_DEFAULT',$WMEMREQD,\
      value(grepCommand('/sbin/sysctl -a','net.core.wmem_default\s*=','f')))
call chk_minimum(\@tbl,'WMEM_MAX',$WMEMREQD,\
      value(grepCommand('/sbin/sysctl -a','net.core.wmem_max\s*=','f')))
call setHcveResult(cond(scalar(@tbl),join("\012",@tbl),'KernelOK'))
]]></command>
<description><![CDATA[This rule verifies that the kernel parameters are set according to the ''Oracle Database Installation Guide 11g Release 1 (11.1) for Linux x86''.]]></description>
<action type="negative" syntax="wiki"><![CDATA[The kernel parameters are not set according to the ''Oracle Database Installation Guide 11g Release 1 (11.1) for Linux x86''. See the ''Oracle Database Installation Guide 11g Release 1 (11.1) for Linux x86''.
|*Return Value*|*Action*|
|FILEMAXUndef|FILE-MAX has not been defined and must be set to ${FILEMAXREQD}|
|FILEMAXTooSmall|Increase the kernel parameter FILE-MAX to at least ${FILEMAXREQD}|
|RMEM_DEFAULTTooSmall|Increase the kernel parameter RMEM_DEFAULT to at least ${RMEMREQD}|
|RMEM_DEFAULTUndef|RMEM_DEFAULT has not been defined and must be set to ${RMEMREQD}|
|RMEM_MAXTooSmall|Increase the kernel parameter RMEM_MAX to at least ${RMEMREQD}|
|RMEM_MAXUndef|RMEM_MAX has not been defined and must be set to ${RMEMREQD}|
|SEMMNIUndef|SEMMNI has not been defined and must be set to ${SEMMNIREQD}|
|SEMMNITooSmall|Increase the kernel parameter SEMMNI to at least ${SEMMNIREQD}|
|SEMMSLUndef|SEMMSL has not been defined and must be set to ${SEMMSLREQD}|
|SEMMSLTooSmall|Increase the kernel parameter SEMMSL to at least ${SEMMSLREQD}|
|SEMMNSUndef|SEMMNS has not been defined and must be set to ${SEMMNSREQD}|
|SEMMNSTooSmall|Increase the kernel parameter SEMMNS to at least ${SEMMNSREQD}|
|SEMOPMUndef|SEMOPM has not been defined and must be set to ${SEMOPMREQD}|
|SEMOPMTooSmall|Increase the kernel parameter SEMOPM to at least ${SEMOPMREQD}|
|SHMALLUndef|SHMALL has not been defined and must be set to ${SHMALLREQD} or more|
|SHMALLTooSmall|Increase the kernel parameter SHMALL to at least ${SHMALLREQD}|
|SHMMAXUndef|SHMMAX has not been defined and must be set to ${SHMMAXREQD}|
|SHMMAXTooSmall|Increase the kernel parameter SHMMAX to ${SHMMAXREQD}. The maximum value is limited to 4GB on 32 bit Linux versions|
|SHMMNIUndef|SHMMNI has not been defined and must be set to ${SHMMNIREQD} or more|
|SHMMNITooSmall|Increase the kernel parameter SHMMNI to at least ${SHMMNIREQD}|
|WMEM_DEFAULTTooSmall|Increase the kernel parameter WMEM_DEFAULT to at least ${WMEMREQD}|
|WMEM_DEFAULTUndef|WMEM_DEFAULT has not been defined and must be set to ${WMEMREQD}|
|WMEM_MAXTooSmall|Increase the kernel parameter WMEM_MAX to at least ${WMEMREQD}|
|WMEM_MAXUndef|WMEM_MAX has not been defined and must be set to ${WMEMREQD}|]]></action>
<action type="positive"><![CDATA[The kernel parameters are set according to the ''Oracle Database Installation Guide 11g Release 1 (11.1) for Linux x86''. No action required.]]></action>
</rule>
<rule condition="=~" id="380" maximum="N" minimum="NotTainted|NotVerifiable" mode="VERIFY" name="Tainted Kernel?" repeat="1" command_type="RDA">
<command><![CDATA[if !testFile('x','/sbin/lsmod')
 return setHcveResult('Cannot run /sbin/lsmod')
call loadCommand('/sbin/lsmod')
call setHcveResult(cond(\
  grepLastFile('not tainted','if'), 'NotTainted',\
  grepLastFile('taint','if'),       'Tainted',\
                                    'NotVerifiable'))
]]></command>
<description><![CDATA[This rule determines if the kernel contains tainted modules.]]></description>
<action type="negative"><![CDATA[The Linux kernel is tainted. For clarification about what action is required, see Oracle MetaLink Note: 225710.1.]]></action>
<action type="positive"><![CDATA[The Linux kernel is not tainted.  No action is required.]]></action>
</rule>
<rule condition="==" id="400" maximum="N" minimum="ip_local_port_rangeOK" mode="VERIFY" name="ip_local_port_range OK?" repeat="1" command_type="RDA">
<command><![CDATA[var @tbl = ()
if !testFile('e','/proc/sys/net/ipv4/ip_local_port_range')
 return setHcveResult(join("\012",'iplocalNotFound',\
                           'ALERT- The ip_local_port_range is not present \
                            in the /proc/sys/net/ipv4 directory as required'))
macro chk_prt_rng
{import $prt_hig
 var (\@tbl,$flg,@lst) = @arg
 if expr('>=',$prt_hig,65000)
  var @tbl = (@tbl,$lst[0])
 else
 {if $flg
   var @tbl = (@tbl,$lst[1])
  else
   var @tbl = (@tbl,$lst[1],$lst[2])
 }
}
var ($prt_low,$prt_hig) = split(\
 '\s+',grepFile('/proc/sys/net/ipv4/ip_local_port_range','\d+','f'),2)
call cond(expr('<=',$prt_low,1024),\
          chk_prt_rng(\@tbl,true,'ip_local_port_rangeOK','HighTooLow'),\
          chk_prt_rng(\@tbl,undef,'LowTooHigh','LowTooHigh','HighTooLow'))
call setHcveResult(join("\012",@tbl))
]]></command>
<description><![CDATA[This rule checks that the ip_local_port_range kernel parameter is set according to the ''Oracle Database Installation Guide 11g Release 1 (11.1) for Linux x86''.]]></description>
<action type="negative" syntax="wiki"><![CDATA[The sockets defined in /proc/sys/net/ipv4/ip_local_port_range are not set correctly for installing Oracle Database 11g.
%BR%Change the values according to those recommended by the ''Oracle Database Installation Guide 11g Release 1 (11.1) for Linux x86'':
%BR%$ /bin/echo 1024 65000 > /proc/sys/net/ipv4/ip_local_port_change
|*Return Value*|*Action*|
|LowTooHigh|The low end value for the ip_local_port_range is set too high and must be reset to a maximum of 1024|
|HighTooLow|The high end value for the ip_local_port_range is set too low and must be reset to a minimum of 65000|
|iplocalNotFound|ip_local_port_range is not present in the /proc/sys/net/ipv4 directory as required|]]></action>
<action type="positive"><![CDATA[The sockets defined in /proc/sys/net/ipv4/ip_local_port_range are adequate for installing Oracle Database 11g. No action required.]]></action>
</rule>
<rule condition="=~" id="460" maximum="N" minimum="Asianux2rpmsOK|NotAsianux2|NotAsianux" mode="VERIFY" name="Asianux2 RPMs OK?" repeat="1" command_type="RDA">
<command><![CDATA[import $OS_NAM,$OS_TYP
if !match($OS_TYP,'Asianux')
 call setHcveResult('NotAsianux')
elsif !match($OS_NAM,'trinity',true)
 call setHcveResult('NotAsianux2')
else
{var @tbl = ()
 call cmp_os_pkg(\@tbl,'binutils','2.15.92.0.2.18')
 call cmp_os_pkg(\@tbl,'compat-libstdc++-33','2.3.47.3')
 call cmp_os_pkg(\@tbl,'elfutils-libelf','0.97.5')
 call cmp_os_pkg(\@tbl,'elfutils-libelf-devel','0.97.5')
 call cmp_os_pkg(\@tbl,'gcc','3.4.5.2')
 call cmp_os_pkg(\@tbl,'gcc-c++','3.4.5.2')
 call cmp_os_pkg(\@tbl,'glibc','2.3.4.2.19')
 call cmp_os_pkg(\@tbl,'glibc-common','2.3.4.2.19')
 call cmp_os_pkg(\@tbl,'glibc-devel','2.3.4.2.19')
 call cmp_os_pkg(\@tbl,'glibc-headers','2.3.4.2.19')
 call cmp_os_pkg(\@tbl,'glibc-kernheaders','2.4.9.1.98')
 call cmp_os_pkg(\@tbl,'libaio','0.3.105.2')
 call cmp_os_pkg(\@tbl,'libaio-devel','0.3.105.2')
 call cmp_os_pkg(\@tbl,'libgcc','3.4.5')
 call cmp_os_pkg(\@tbl,'libstdc++','3.4.5.2')
 call cmp_os_pkg(\@tbl,'libstdc++-devel','3.4.5.2')
 call cmp_os_pkg(\@tbl,'make','3.80.5')
 call cmp_os_pkg(\@tbl,'sysstat','5.0.5')
 call cmp_os_pkg(\@tbl,'unixODBC','2.2.11.1')
 call cmp_os_pkg(\@tbl,'unixODBC-devel','2.2.11.1')
 call setHcveResult(cond(scalar(@tbl),join("\012",@tbl),'Asianux2rpmsOK'))
}]]></command>
<description><![CDATA[This rule verifies that the correct versions of the required RPMs are installed on an Asianux 2 system.]]></description>
<action type="negative"><![CDATA[You have incorrect versions of binutils, compat-libstdc++-33, elfutils-libelf, elfutils-libelf-devel, gcc, gcc-c++, glibc, glibc-common, glibc-devel, glibc-headers, glibc-kernheaders, libaio, libaio-devel, libgcc, libstdc++, libstdc++-devel, make, sysstat, unixODBC, or unixODBC-devel installed on your system. Make sure that the correct versions are installed. For the required versions, see Oracle MetaLink Note: 169706.1.]]></action>
<action type="positive"><![CDATA[The correct binutils, compat-libstdc++-33, elfutils-libelf, elfutils-libelf-devel, gcc, gcc-c++, glibc, glibc-common, glibc-devel, glibc-headers, glibc-kernheaders, libaio, libaio-devel, libgcc, libstdc++, libstdc++-devel, make, sysstat, unixODBC, and unixODBC-devel packages are installed on your Asianux 2 system. No action required.]]></action>
</rule>
<rule condition="=~" id="470" maximum="N" minimum="Asianux3rpmsOK|NotAsianux3|NotAsianux" mode="VERIFY" name="Asianux3 RPMs OK?" repeat="1" command_type="RDA">
<command><![CDATA[import $OS_NAM,$OS_TYP
if !match($OS_TYP,'Asianux')
 call setHcveResult('NotAsianux')
elsif !match($OS_NAM,'quartet',true)
 call setHcveResult('NotAsianux3')
else
{var @tbl = ()
 call cmp_os_pkg(\@tbl,'binutils','2.17.50.0.6.2')
 call cmp_os_pkg(\@tbl,'compat-libstdc++-33','3.2.3.61')
 call cmp_os_pkg(\@tbl,'elfutils-libelf','0.125.3')
 call cmp_os_pkg(\@tbl,'elfutils-libelf-devel','0.125.3')
 call cmp_os_pkg(\@tbl,'elfutils-libelf-devel-static','0.125.3')
 call cmp_os_pkg(\@tbl,'gcc','4.1.1.52')
 call cmp_os_pkg(\@tbl,'gcc-c++','4.1.1.52')
 call cmp_os_pkg(\@tbl,'glibc','2.5.12')
 call cmp_os_pkg(\@tbl,'glibc-common','2.5.12')
 call cmp_os_pkg(\@tbl,'glibc-devel','2.5.12')
 call cmp_os_pkg(\@tbl,'glibc-headers','2.5.12')
 call cmp_os_pkg(\@tbl,'libaio','0.3.106')
 call cmp_os_pkg(\@tbl,'libaio-devel','0.3.106')
 call cmp_os_pkg(\@tbl,'libgcc','4.1.1.52')
 call cmp_os_pkg(\@tbl,'libgomp','4.1.1.52')
 call cmp_os_pkg(\@tbl,'libstdc++','4.1.1.52')
 call cmp_os_pkg(\@tbl,'libstdc++-devel','4.1.1.52')
 call cmp_os_pkg(\@tbl,'make','3.81.1.1')
 call cmp_os_pkg(\@tbl,'sysstat','7.0.0.3')
 call cmp_os_pkg(\@tbl,'unixODBC','2.2.11.7.1')
 call cmp_os_pkg(\@tbl,'unixODBC-devel','2.2.11.7.1')
 call setHcveResult(cond(scalar(@tbl),join("\012",@tbl),'Asianux3rpmsOK'))
}]]></command>
<description><![CDATA[This rule verifies that the correct versions of the required RPMs are installed on an Asianux 3 system.]]></description>
<action type="negative"><![CDATA[You have incorrect versions of binutils, compat-libstdc++-33, elfutils-libelf, elfutils-libelf-devel, elfutils-libelf-devel-static, gcc, gcc-c++, glibc, glibc-common, glibc-devel, glibc-headers, libaio, libaio-devel, libgcc, libgomp, libstdc++, libstdc++-devel, make, sysstat, unixODBC, or unixODBC-devel installed on your system. Make sure that the correct versions are installed. For the required versions, see Oracle MetaLink Note: 169706.1.]]></action>
<action type="positive"><![CDATA[The correct binutils, compat-libstdc++-33, elfutils-libelf, elfutils-libelf-devel, elfutils-libelf-devel-static, gcc, gcc-c++, glibc, glibc-common, glibc-devel, glibc-headers, libaio, libaio-devel, libgcc, libgomp, libstdc++, libstdc++-devel, make, sysstat, unixODBC, and unixODBC-devel packages are installed on your Asianux 3 system. No action required.]]></action>
</rule>
<rule condition="=~" id="480" maximum="N" minimum="EL4rpmsOK|NotEL4|NotEnterprise" mode="VERIFY" name="EL4 RPMs OK?" repeat="1" command_type="RDA">
<command><![CDATA[import $OS_NAM,$OS_TYP
if !match($OS_TYP,'Enterprise')
 call setHcveResult('NotEnterprise')
elsif !match($OS_NAM,'october',true)
 call setHcveResult('NotEL4')
else
{var @tbl = ()
 call cmp_os_pkg(\@tbl,'binutils','2.15.92.0.2.18')
 call cmp_os_pkg(\@tbl,'compat-libstdc++-33','2.3.47.3')
 call cmp_os_pkg(\@tbl,'elfutils-libelf','0.97.5')
 call cmp_os_pkg(\@tbl,'elfutils-libelf-devel','0.97.5')
 call cmp_os_pkg(\@tbl,'gcc','3.4.5.2')
 call cmp_os_pkg(\@tbl,'gcc-c++','3.4.5.2')
 call cmp_os_pkg(\@tbl,'glibc','2.3.4.2.19')
 call cmp_os_pkg(\@tbl,'glibc-common','2.3.4.2.19')
 call cmp_os_pkg(\@tbl,'glibc-devel','2.3.4.2.19')
 call cmp_os_pkg(\@tbl,'glibc-headers','2.3.4.2.19')
 call cmp_os_pkg(\@tbl,'glibc-kernheaders','2.4.9.1.98')
 call cmp_os_pkg(\@tbl,'libaio','0.3.105.2')
 call cmp_os_pkg(\@tbl,'libaio-devel','0.3.105.2')
 call cmp_os_pkg(\@tbl,'libgcc','3.4.5')
 call cmp_os_pkg(\@tbl,'libstdc++','3.4.5.2')
 call cmp_os_pkg(\@tbl,'libstdc++-devel','3.4.5.2')
 call cmp_os_pkg(\@tbl,'make','3.80.5')
 call cmp_os_pkg(\@tbl,'sysstat','5.0.5')
 call cmp_os_pkg(\@tbl,'unixODBC','2.2.11.1')
 call cmp_os_pkg(\@tbl,'unixODBC-devel','2.2.11.1')
 call setHcveResult(cond(scalar(@tbl),join("\012",@tbl),'EL4rpmsOK'))
}]]></command>
<description><![CDATA[This rule verifies that the correct versions of the required RPMs are installed on an Enterprise Linux 4 system.]]></description>
<action type="negative"><![CDATA[You have incorrect versions of binutils, compat-libstdc++-33, elfutils-libelf, elfutils-libelf-devel, gcc, gcc-c++, glibc, glibc-common, glibc-devel, glibc-headers, glibc-kernheaders, libaio, libaio-devel, libgcc, libstdc++, libstdc++-devel, make, sysstat, unixODBC, or unixODBC-devel installed on your system. Make sure that the correct versions are installed. For the required versions, see Oracle MetaLink Note: 169706.1.]]></action>
<action type="positive"><![CDATA[The correct binutils, compat-libstdc++-33, elfutils-libelf, elfutils-libelf-devel, gcc, gcc-c++, glibc, glibc-common, glibc-devel, glibc-headers, glibc-kernheaders, libaio, libaio-devel, libgcc, libstdc++, libstdc++-devel, make, sysstat, unixODBC, and unixODBC-devel packages are installed on your Enterprise Linux 4 system. No action required.]]></action>
</rule>
<rule condition="=~" id="490" maximum="N" minimum="EL5rpmsOK|NotEL5|NotEnterprise" mode="VERIFY" name="EL5 RPMs OK?" repeat="1" command_type="RDA">
<command><![CDATA[import $OS_NAM,$OS_TYP
if !match($OS_TYP,'Enterprise')
 call setHcveResult('NotEnterprise')
elsif !match($OS_NAM,'carthage',true)
 call setHcveResult('NotEL5')
else
{var @tbl = ()
 call cmp_os_pkg(\@tbl,'binutils','2.17.50.0.6.2/el5')
 call cmp_os_pkg(\@tbl,'compat-libstdc++-33','3.2.3.61')
 call cmp_os_pkg(\@tbl,'elfutils-libelf','0.125.3/el5')
 call cmp_os_pkg(\@tbl,'elfutils-libelf-devel','0.125.3/el5')
 call cmp_os_pkg(\@tbl,'elfutils-libelf-devel-static','0.125.3/el5')
 call cmp_os_pkg(\@tbl,'gcc','4.1.1.52/el5')
 call cmp_os_pkg(\@tbl,'gcc-c++','4.1.1.52/el5')
 call cmp_os_pkg(\@tbl,'glibc','2.5.12')
 call cmp_os_pkg(\@tbl,'glibc-common','2.5.12')
 call cmp_os_pkg(\@tbl,'glibc-devel','2.5.12')
 call cmp_os_pkg(\@tbl,'glibc-headers','2.5.12')
 call cmp_os_pkg(\@tbl,'libaio','0.3.106')
 call cmp_os_pkg(\@tbl,'libaio-devel','0.3.106')
 call cmp_os_pkg(\@tbl,'libgcc','4.1.1.52')
 call cmp_os_pkg(\@tbl,'libgomp','4.1.1.52/el5')
 call cmp_os_pkg(\@tbl,'libstdc++','4.1.1.52/el5')
 call cmp_os_pkg(\@tbl,'libstdc++-devel','4.1.1.52/el5')
 call cmp_os_pkg(\@tbl,'make','3.81.1.1')
 call cmp_os_pkg(\@tbl,'sysstat','7.0.0.3/el5')
 call cmp_os_pkg(\@tbl,'unixODBC','2.2.11.7.1')
 call cmp_os_pkg(\@tbl,'unixODBC-devel','2.2.11.7.1')
 call setHcveResult(cond(scalar(@tbl),join("\012",@tbl),'EL5rpmsOK'))
}]]></command>
<description><![CDATA[This rule verifies that the correct versions of the required RPMs are installed on an Enterprise Linux 5 system.]]></description>
<action type="negative"><![CDATA[You have incorrect versions of binutils, compat-libstdc++-33, elfutils-libelf, elfutils-libelf-devel, elfutils-libelf-devel-static, gcc, gcc-c++, glibc, glibc-common, glibc-devel, glibc-headers, libaio, libaio-devel, libgcc, libgomp, libstdc++, libstdc++-devel, make, sysstat, unixODBC, or unixODBC-devel installed on your system. Make sure that the correct versions are installed. For the required versions, see Oracle MetaLink Note: 169706.1.]]></action>
<action type="positive"><![CDATA[The correct binutils, compat-libstdc++-33, elfutils-libelf, elfutils-libelf-devel, elfutils-libelf-devel-static, gcc, gcc-c++, glibc, glibc-common, glibc-devel, glibc-headers, libaio, libaio-devel, libgcc, libgomp, libstdc++, libstdc++-devel, make, sysstat, unixODBC, and unixODBC-devel packages are installed on your Enterprise Linux 5 system. No action required.]]></action>
</rule>
<rule condition="=~" id="530" maximum="N" minimum="RHEL4rpmsOK|NotRHEL4|NotRedHat" mode="VERIFY" name="RHEL4 RPMs OK?" repeat="1" command_type="RDA">
<command><![CDATA[import $OS_NAM,$OS_TYP
if !match($OS_TYP,'Red Hat')
 call setHcveResult('NotRedHat')
elsif !match($OS_NAM,'nahant',true)
 call setHcveResult('NotRHEL4')
else
{var @tbl = ()
 call cmp_os_pkg(\@tbl,'binutils','2.15.92.0.2.18')
 call cmp_os_pkg(\@tbl,'compat-libstdc++-33','2.3.47.3')
 call cmp_os_pkg(\@tbl,'elfutils-libelf','0.97.5')
 call cmp_os_pkg(\@tbl,'elfutils-libelf-devel','0.97.5')
 call cmp_os_pkg(\@tbl,'gcc','3.4.5.2')
 call cmp_os_pkg(\@tbl,'gcc-c++','3.4.5.2')
 call cmp_os_pkg(\@tbl,'glibc','2.3.4.2.19')
 call cmp_os_pkg(\@tbl,'glibc-common','2.3.4.2.19')
 call cmp_os_pkg(\@tbl,'glibc-devel','2.3.4.2.19')
 call cmp_os_pkg(\@tbl,'glibc-headers','2.3.4.2.19')
 call cmp_os_pkg(\@tbl,'glibc-kernheaders','2.4.9.1.98')
 call cmp_os_pkg(\@tbl,'libaio','0.3.105.2')
 call cmp_os_pkg(\@tbl,'libaio-devel','0.3.105.2')
 call cmp_os_pkg(\@tbl,'libgcc','3.4.5')
 call cmp_os_pkg(\@tbl,'libstdc++','3.4.5.2')
 call cmp_os_pkg(\@tbl,'libstdc++-devel','3.4.5.2')
 call cmp_os_pkg(\@tbl,'make','3.80.5')
 call cmp_os_pkg(\@tbl,'sysstat','5.0.5')
 call cmp_os_pkg(\@tbl,'unixODBC','2.2.11.1/RHEL4')
 call cmp_os_pkg(\@tbl,'unixODBC-devel','2.2.11.1/RHEL4')
 call setHcveResult(cond(scalar(@tbl),join("\012",@tbl),'RHEL4rpmsOK'))
}]]></command>
<description><![CDATA[This rule verifies that the correct versions of the required RPMs are installed on a Red Hat Enterprise Linux 4 system.]]></description>
<action type="negative"><![CDATA[You have incorrect versions of binutils, compat-libstdc++-33, elfutils-libelf, elfutils-libelf-devel, gcc, gcc-c++, glibc, glibc-common, glibc-devel, glibc-headers, glibc-kernheaders, libaio, libaio-devel, libgcc, libstdc++, libstdc++-devel, make, sysstat, unixODBC, or unixODBC-devel installed on your system. Make sure that the correct versions are installed. For information about the correct versions, see Oracle MetaLink Note: 169706.1.]]></action>
<action type="positive"><![CDATA[The correct binutils, compat-libstdc++-33, elfutils-libelf, elfutils-libelf-devel, gcc, gcc-c++, glibc, glibc-common, glibc-devel, glibc-headers, glibc-kernheaders, libaio, libaio-devel, libgcc, libstdc++, libstdc++-devel, make, sysstat, unixODBC, and unixODBC-devel packages are installed on your RHEL4 system. No action required.]]></action>
</rule>
<rule condition="=~" id="540" maximum="N" minimum="RHEL5rpmsOK|NotRHEL5|NotRedHat" mode="VERIFY" name="RHEL5 RPMs OK?" repeat="1" command_type="RDA">
<command><![CDATA[import $OS_NAM,$OS_TYP
if !match($OS_TYP,'Red Hat')
 call setHcveResult('NotRedHat')
elsif !match($OS_NAM,'tikanga',true)
 call setHcveResult('NotRHEL5')
else
{var @tbl = ()
 call cmp_os_pkg(\@tbl,'binutils','2.17.50.0.6.2')
 call cmp_os_pkg(\@tbl,'compat-libstdc++-33','3.2.3.61')
 call cmp_os_pkg(\@tbl,'elfutils-libelf','0.125.3')
 call cmp_os_pkg(\@tbl,'elfutils-libelf-devel','0.125.3')
 call cmp_os_pkg(\@tbl,'elfutils-libelf-devel-static','0.125.3')
 call cmp_os_pkg(\@tbl,'gcc','4.1.1.52')
 call cmp_os_pkg(\@tbl,'gcc-c++','4.1.1.52')
 call cmp_os_pkg(\@tbl,'glibc','2.5.12')
 call cmp_os_pkg(\@tbl,'glibc-common','2.5.12')
 call cmp_os_pkg(\@tbl,'glibc-devel','2.5.12')
 call cmp_os_pkg(\@tbl,'glibc-headers','2.5.12')
 call cmp_os_pkg(\@tbl,'libaio','0.3.106')
 call cmp_os_pkg(\@tbl,'libaio-devel','0.3.106')
 call cmp_os_pkg(\@tbl,'libgcc','4.1.1.52')
 call cmp_os_pkg(\@tbl,'libgomp','4.1.1.52')
 call cmp_os_pkg(\@tbl,'libstdc++','4.1.1.52')
 call cmp_os_pkg(\@tbl,'libstdc++-devel','4.1.1.52')
 call cmp_os_pkg(\@tbl,'make','3.81.1.1')
 call cmp_os_pkg(\@tbl,'sysstat','7.0.0.3')
 call cmp_os_pkg(\@tbl,'unixODBC','2.2.11.7.1')
 call cmp_os_pkg(\@tbl,'unixODBC-devel','2.2.11.7.1')
 call setHcveResult(cond(scalar(@tbl),join("\012",@tbl),'RHEL5rpmsOK'))
}]]></command>
<description><![CDATA[This rule verifies that the correct versions of the required RPMs are installed on a Red Hat Enterprise Linux 5 system.]]></description>
<action type="negative"><![CDATA[You have incorrect versions of binutils, compat-libstdc++-33, elfutils-libelf, elfutils-libelf-devel, elfutils-libelf-devel-static, gcc, gcc-c++, glibc, glibc-common, glibc-devel, glibc-headers, libaio, libaio-devel, libgcc, libgomp, libstdc++, libstdc++-devel, make, sysstat, unixODBC, or unixODBC-devel installed on your system. Make sure that the correct versions are installed. For information about the correct versions, see Oracle MetaLink Note: 169706.1.]]></action>
<action type="positive"><![CDATA[The correct binutils, compat-libstdc++-33, elfutils-libelf, elfutils-libelf-devel, elfutils-libelf-devel-static, gcc, gcc-c++, glibc, glibc-common, glibc-devel, glibc-headers, libaio, libaio-devel, libgcc, libgomp, libstdc++, libstdc++-devel, make, sysstat, unixODBC, and unixODBC-devel packages are installed on your RHEL5 system. No action required.]]></action>
</rule>
<rule condition="=~" id="570" maximum="N" minimum="SLES10rpmsOK|NotSLES10|NotSuSE" mode="VERIFY" name="SUSE SLES10 RPMs OK?" repeat="1" command_type="RDA">
<command><![CDATA[import $OS_NAM,$OS_TYP
if !match($OS_TYP,'SuSE')
 call setHcveResult('NotSuSE')
elsif !match($OS_NAM,'SLES-10')
 call setHcveResult('NotSLES10')
else
{var @tbl = ()
 call cmp_os_pkg(\@tbl,'binutils','2.16.91.0.5.23.4')
 call cmp_os_pkg(\@tbl,'compat-libstdc++','5.0.7.22.2')
 call cmp_os_pkg(\@tbl,'gcc','4.1.0.28.4')
 call cmp_os_pkg(\@tbl,'gd','2.0.32.23.2')
 call cmp_os_pkg(\@tbl,'glibc','2.4.31.2')
 call cmp_os_pkg(\@tbl,'glibc-devel','2.4.31.2')
 call cmp_os_pkg(\@tbl,'gnuplot','4.0.0.20.2')
 call cmp_os_pkg(\@tbl,'ksh','12.9/93r')
 call cmp_os_pkg(\@tbl,'libaio','0.3.104.14.2')
 call cmp_os_pkg(\@tbl,'libaio-devel','0.3.104.14.2')
 call cmp_os_pkg(\@tbl,'libelf','0.8.5.47.2')
 call cmp_os_pkg(\@tbl,'libgcc','4.1.0.28.4')
 call cmp_os_pkg(\@tbl,'libstdc++','4.1.0.28.4')
 call cmp_os_pkg(\@tbl,'libstdc++-devel','4.1.0.28.4')
 call cmp_os_pkg(\@tbl,'make','3.80.202.2')
 call cmp_os_pkg(\@tbl,'plotutils','2.4.1.591.2')
 call cmp_os_pkg(\@tbl,'sysstat','6.0.2.16.4')
 call cmp_os_pkg(\@tbl,'unixODBC','2.2.11.21.4')
 call cmp_os_pkg(\@tbl,'unixODBC-devel','2.2.11.21.4')
 call setHcveResult(cond(scalar(@tbl),join("\012",@tbl),'SLES10rpmsOK'))
}]]></command>
<description><![CDATA[This rule verifies that the correct versions of the required RPMs are installed on a SUSE Linux Enterprise Server 10 system.]]></description>
<action type="negative"><![CDATA[You have incorrect versions of binutils, compat-libstdc++, gcc, gd, glibc, glibc-devel, gnuplot, ksh, libaio, libaio-devel, libelf, libgcc, libstdc++, libstdc++-devel, make, plotutils, sysstat, unixODBC, or unixODBC-devel packages installed on your SUSE SLES10 system. Make sure that the correct versions are installed. For information about the correct version, see Oracle MetaLink Note: 169706.1.]]></action>
<action type="positive"><![CDATA[The correct binutils, compat-libstdc++, gcc, gd, glibc, glibc-devel, gnuplot, ksh, libaio, libaio-devel, libelf, libgcc, libstdc++, libstdc++-devel, make, plotutils, sysstat, unixODBC, and unixODBC-devel packages are installed on your SUSE SLES10 system. No action required.]]></action>
</rule>
</hcve>
