<sdp_diaglet platform="linux" product="DB11R2" set="A200DB11R2_lnx" title="Oracle Database 11g R2 (11.2.0) Preinstall (Linux)" type="A">
<sdp_meta id="$Id: A200DB11R2_lnx.xml,v 2.23 2012/08/20 12:39:39 mschenke Exp $" type="version"/>
<sdp_meta author="JCR" change="Incorporate Linux 6" date="20120817" type="history"/>
<sdp_content set="A200DB11R2_lnx" title="Oracle Database 11g R2 (11.2.0) Preinstall (Linux)" type="check">
<sdp_group>

<sdp_rule id="A00010" mode="VERIFY" name="OS Certified?">
<sdp_command type="RDA"><![CDATA[import $OS_NAM,$OS_TYP
call setHcveResult(check($OS_TYP,\
  'Asianux',   check(lc($OS_NAM),\
                  'quartet', cmp_kernel('Asianux3','2.6.18-92'),\
                  'trinity', cmp_kernel('Asianux2','2.6.9-78'),\
                             'Not certified [Asianux version]'),\
  'Oracle',check(lc($OS_NAM),\
                  '^oracle.*release\s6\.\d+$',\
                             cmp_kernel('OL6','2.6.32-71'),\
                  '(carthage|^oracle.*release\s5\.\d+$)',\
                             cmp_kernel('OL5','2.6.18-92'),\
                  'october', cmp_kernel('0L4','2.6.9-78'),\
                             'Not certified [Oracle Linux version]'),\
  'Red Hat',   check(lc($OS_NAM),\
                  'santiago',cmp_kernel('RH EL6','2.6.32-71'),\
                  'tikanga', cmp_kernel('RH EL5','2.6.18-92'),\
                  'nahant',  cmp_kernel('RH EL4','2.6.9-78'),\
                             'Not certified [Red Hat version]'),\
  'SuSE',      check($OS_NAM,\
                  'SLES-10', cmp_kernel('SuSE 10','2.6.16.21-0.8'),\
                  'SLES-11', cmp_kernel('SuSE 11','2.6.27.19-5'),\
                'Not certified [OS]')))
var $BOOK = 'Oracle Database Installation Guide 11g Release 2 (11.2) \
             for Linux'
call setHcveVariable('$BOOK')
]]></sdp_command>
<sdp_description><![CDATA[This rule checks for the correct version of Linux for installing Oracle Database 11g R2.]]></sdp_description>
<sdp_actions>
<sdp_action condition="=~" minimum="Adequate" result="PASSED"><![CDATA[The correct version of Linux is installed on your server.]]></sdp_action>
<sdp_action result="FAILED" syntax="wiki"><![CDATA[!!SHOWSTOPPER!!%BR%
You do not have the correct version of Linux installed on your server. For the certified versions of Linux, see the ${'BOOK} and My Oracle Support.]]></sdp_action>
</sdp_actions>
</sdp_rule>

<sdp_rule id="A00020" mode="VERIFY" name="User in /etc/passwd?">
<sdp_command type="RDA"><![CDATA[call setHcveResult(cond(\
  not(testFile('r','/etc/passwd')),\
    'Can not read /etc/passwd',\
  grepFile('/etc/passwd',\
           concat('^',$usr = first(command('/usr/bin/id -nu')),':'),\
           'f'),\
    'userOK',\
    concat($usr,' not in /etc/passwd.')))
]]></sdp_command>
<sdp_description><![CDATA[This rule verifies that the user name of the user who runs this script is in the ``/etc/passwd`` file.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" minimum="userOK" result="PASSED"><![CDATA[The ``/etc/passwd`` file contains the user. No action is required.]]></sdp_action>
<sdp_action result="FAILED"><![CDATA[The ``/etc/passwd`` file does not contain the user or else the file has no read permissions. Add the user to the ``/etc/passwd`` file if the user does not exist in the file.]]></sdp_action>
</sdp_actions>
</sdp_rule>

<sdp_rule id="A00040" mode="VERIFY" name="Group in /etc/group?">
<sdp_command type="RDA"><![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'))
]]></sdp_command>
<sdp_description><![CDATA[This rule verifies that the group to which the user belongs exists in the ``/etc/group`` file.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" minimum="GroupOK" result="PASSED"><![CDATA[The ``/etc/group`` file contains the group of the user. No action required.]]></sdp_action>
<sdp_action result="FAILED"><![CDATA[ALERT:
The ``/etc/group`` file does not contain the group. Add the group to the ``/etc/group`` file.]]></sdp_action>
</sdp_actions>
</sdp_rule>

<sdp_rule id="A00050" mode="RECORD" name="Enter ORACLE_HOME">
<sdp_command default="$ORACLE_HOME" type="PROMPT" variable="$ORACLE_HOME"><![CDATA[Planned ORACLE_HOME location]]></sdp_command>
<sdp_description><![CDATA[This rule prompts the user for the planned Oracle home directory.]]></sdp_description>
</sdp_rule>

<sdp_rule id="A00060" mode="VERIFY" name="ORACLE_HOME Valid?">
<sdp_dependencies>
<sdp_dependency condition="IS" id="A00050" minimum="PASSED|RECORD" result="FAILED"><![CDATA[Requires rule A00050.]]></sdp_dependency>
</sdp_dependencies>
<sdp_command type="RDA"><![CDATA[import $ORACLE_HOME
call setHcveResult(cond(\
  not(defined($ORACLE_HOME)),    'OHNotSpecified',\
  not(testDir('d',$ORACLE_HOME)),'OHnotvalid',\
  not(testDir('l',$ORACLE_HOME)),'OHexists',\
                                 'OHsymlink'))
]]></sdp_command>
<sdp_description><![CDATA[This rule checks for the Oracle home directory.]]></sdp_description>
<sdp_actions>
<sdp_action condition="=~" minimum="OHexists|OHsymlink" result="PASSED"><![CDATA[The Oracle home directory exists. No action required]]></sdp_action>
<sdp_action condition="==" minimum="OHNotSpecified" result="SKIPPED"><![CDATA[No ``ORACLE_HOME`` was provided to enable checking.]]></sdp_action>
<sdp_action result="FAILED" 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 this directory is created and then run this script again|
|OHsymlink|ORACLE_HOME is a symbolic link|]]></sdp_action>
</sdp_actions>
</sdp_rule>

<sdp_rule id="A00070" mode="VERIFY" name="O_H Permissions OK?">
<sdp_dependencies>
<sdp_dependency condition="IS" id="A00050" minimum="PASSED|RECORD" result="FAILED"><![CDATA[Requires rule A00050.]]></sdp_dependency>
</sdp_dependencies>
<sdp_command type="RDA"><![CDATA[import $ORACLE_HOME
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'))
]]></sdp_command>
<sdp_description><![CDATA[This rule checks that the user has the correct privileges to install Oracle Database 11g R2 in the Oracle home directory.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" minimum="CorrectPerms" result="PASSED"><![CDATA[The permissions for the Oracle home directory are correct. No action required.]]></sdp_action>
<sdp_action condition="==" minimum="OHNotSpecified" result="SKIPPED"><![CDATA[No ``ORACLE_HOME`` was provided to enable checking.]]></sdp_action>
<sdp_action result="FAILED" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|NoReadPerm|Ensure that the install user has read permissions for the Oracle home directory|
|NoWritePerm|Ensure that the install user has write permissions for the Oracle home directory|
|NoExecutePerm|Ensure that the install user has execute permissions 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``)|
]]></sdp_action>
</sdp_actions>
</sdp_rule>

<sdp_rule id="A00080" mode="VERIFY" name="oraInventory Permissions">
<sdp_command type="RDA"><![CDATA[call setHcveResult(cond(\
  not(testFile('f','/etc/oraInst.loc')),\
    'oraInventoryNotFound',\
  not(testFile('wr',$INV_LOC = \
    value(grepFile('/etc/oraInst.loc','^inventory_loc','f')))),\
    'oraInventoryNotOK',\
    'oraInventoryOK'))
call setHcveVariable('$INV_LOC')
]]></sdp_command>
<sdp_description><![CDATA[This rule verifies that the user who is installing Oracle Database 11g R2 has sufficient privileges for the ``oraInventory`` directory.]]></sdp_description>
<sdp_actions>
<sdp_action condition="=~" minimum="oraInventoryOK|oraInventoryNotFound" result="PASSED"><![CDATA[Either the user has sufficient privileges for the ``oraInventory`` directory to install Oracle Database 11g R2 or this is the first Oracle product to be installed on the system. In that case, the installer creates the ``oraInventory`` directory. No action required.]]></sdp_action>
<sdp_action result="FAILED" syntax="wiki"><![CDATA[The user, who is logged in, cannot access (write and read) the ``oraInventory`` directory while installing Oracle Database 11g R2. Verify that the user can write to the directory specified in the ``/etc/oraInst.loc`` file.
|*Return Value*|*Action*|
|oraInventoryNotOK|Make sure that the install user has write permissions 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.|]]></sdp_action>
</sdp_actions>
</sdp_rule>

<sdp_rule id="A00090" mode="VERIFY" name="Got Software Tools?">
<sdp_command type="RDA"><![CDATA[var @tbl = ()
macro find_exe
{var (\@tbl,$exe,$ref) = @arg
 if findCommand($exe)
 {var $cmd = readLink(last,last)
  if !compare('eq',$cmd,$ref)
   call push(@tbl,concat(ucfirst($exe),'Elsewhere'))
 }
 else
  call push(@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'))
]]></sdp_command>
<sdp_description><![CDATA[This rule verifies that the required assembly tools for the installation of Oracle Database 11g R2 exist.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" minimum="ld_nm_ar_make_found" result="PASSED"><![CDATA[All required assembly tools for the installation of Oracle Database 11g R2 were found. No action required.]]></sdp_action>
<sdp_action result="FAILED" syntax="wiki"><![CDATA[Some of the required assembly tools for the Oracle Database 11g R2 installation were not found. Check your installation.
|*Return Value*|*Action*|
|ArNotFound|``ar`` is not found in ``PATH``.|
|ArElsewhere|``ar`` is not in ``/usr/bin`` as required.|
|LdNotFound|``ld`` is not found in ``PATH``.|
|LdElsewhere|``ld`` is not in ``/usr/bin`` as required.|
|NmNotFound|``nm`` is not found in ``PATH``.|
|NmElsewhere|``nm`` is not in ``/usr/bin`` as required.|
|MakeNotFound|``make`` is not found in ``PATH``.|
|MakeElsewhere|``make`` is not in ``/usr/bin`` as required.|]]></sdp_action>
</sdp_actions>
</sdp_rule>

<sdp_rule id="A00100" mode="VERIFY" name="Umask Set to 022?">
<sdp_command type="RDA"><![CDATA[call setHcveResult(cond(\
  expr('==','022',command('"umask"')),'UmaskOK','UmaskNotOK')) # Force shell
]]></sdp_command>
<sdp_description><![CDATA[This rule checks that the ``umask`` value is set correctly for installing Oracle Database 11g R2.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" minimum="UmaskOK" result="PASSED"><![CDATA[The ``umask`` value is set correctly for installing Oracle Database 11g R2. No action required.]]></sdp_action>
<sdp_action result="FAILED"><![CDATA[The ``umask`` value is not set correctly. Set the ``umask`` to 022 before installing Oracle Database 11g R2.]]></sdp_action>
</sdp_actions>
</sdp_rule>

<sdp_rule id="A00120" mode="VERIFY" name="Limits Processes">
<sdp_command type="RDA"><![CDATA[var $shl = getEnv('SHELL')
var @tbl = ()
macro chk_low
{var (\@tbl,$err,$cmd,$min,$flg) = @arg
 var ($val) = command($cmd)
 if $flg
  var $val = field('\s+',1,$val)
 if !or(compare('eq',$val,'unlimited'),expr('>=',$val,$min))
  call push(@tbl,$err)
}
macro chk_low_ksh_processes
{var (\@tbl,$err,$cmd,$min) = @arg
 var $val = field('\s',-1,\
   grepCommand($cmd,'^(max user processes|processes|nproc)','if'))
 if !or(compare('eq',$val,'unlimited'),expr('>=',$val,$min))
  call push(@tbl,$err)
}
if match($shl,'csh')
{call chk_low(\@tbl,'SoftLow',concat($shl,' -f -c "limit maxproc"'),2047,true)
 call chk_low(\@tbl,'HardLow',concat($shl,' -f -c "limit -h maxproc"'),16384,\
              true)
}
elsif match($shl,'ksh')
{call chk_low_ksh_processes(\@tbl,'SoftLow',concat($shl,' -c "ulimit -Sa"'),\
   2047)
 call chk_low_ksh_processes(\@tbl,'HardLow',concat($shl,' -c "ulimit -Ha"'),\
   16384)
}
else
{call chk_low(\@tbl,'SoftLow',concat($shl,' -c "ulimit -Su"'),2047,false)
 call chk_low(\@tbl,'HardLow',concat($shl,' -c "ulimit -Hu"'),16384,false)
}
call setHcveResult(cond(scalar(@tbl),join("\012",@tbl),'Adequate'))
]]></sdp_command>
<sdp_description><![CDATA[This rule checks that the soft limit for maximum processes is set to 2047 or higher and the hard limit of maximum processes is set to 16384 or higher. For details about configuring this parameter, see the ''Oracle Database Installation Guide 11g Release 2 (11.2) for Linux''.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" minimum="Adequate" result="PASSED"><![CDATA[The soft limit of maximum processes is set to 2047 or higher and the hard limit of maximum processes is set to 16384 or higher.]]></sdp_action>
<sdp_action result="FAILED" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|SoftLow|Increase the soft limit for maximum processes to 2047 or higher.|
|HardLow|Increase the hard limit for maximum processes to 16384 or higher.|
]]></sdp_action>
</sdp_actions>
</sdp_rule>

<sdp_rule id="A00125" mode="VERIFY" name="Limits Stacksize">
<sdp_command type="RDA"><![CDATA[var $shl = getEnv('SHELL')
var @tbl = ()
macro chk_low
{var (\@tbl,$cmd,$min,$flg) = @arg
 var ($val) = command($cmd)
 if $flg
  var $val = field('\s+',1,$val)
 if !or(compare('eq',$val,'unlimited'),expr('>=',$val,$min))
  call push(@tbl,'SoftLow')
}
macro chk_rng
{var (\@tbl,$cmd,$min,$max,$flg) = @arg
 var ($val) = command($cmd)
 if $flg
  var $val = field('\s+',1,$val)
 if or(compare('eq',$val,'unlimited'),expr('>',$val,$max))
  call push(@tbl,'HardHigh')
 elsif !expr('>=',$val,$min)
  call push(@tbl,'HardLow')
}
if match($shl,'csh')
{call chk_low(\@tbl,concat($shl,' -f -c "limit stacksize"'),10240,true)
 call chk_rng(\@tbl,concat($shl,' -f -c "limit -h stacksize"'),10240,32768,true)
}
else
{call chk_low(\@tbl,concat($shl,' -c "ulimit -Ss"'),10240,false)
 call chk_rng(\@tbl,concat($shl,' -c "ulimit -Hs"'),10240,32768,false)
}
call setHcveResult(cond(scalar(@tbl),join("\012",@tbl),'Adequate'))
]]></sdp_command>
<sdp_description><![CDATA[This rule checks that the soft limit for the size of the stack segment is set to 10240 or higher and the hard limit for the size of the stack segment is set to at least 10240 and not greater than 32768. For details about configuring this parameter, see the ''Oracle Database Installation Guide 11g Release 2 (11.2) for Linux''.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" minimum="Adequate" result="PASSED"><![CDATA[The soft limit of stacksize is set to 10240 or higher and the hard limit of stacksize is set to 10240 or higher and not greater than 32768.]]></sdp_action>
<sdp_action result="FAILED" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|SoftLow|Increase the soft limit for stacksize to 10240 or higher.|
|HardLow|Increase the hard limit for stacksize to 10240 or higher, but not more than 32768.|
|HardHigh|Decrease the hard limit for stacksize to 32768 or lower, but not less than 10240.|
]]></sdp_action>
</sdp_actions>
</sdp_rule>

<sdp_rule id="A00130" mode="VERIFY" name="Limits Descriptors">
<sdp_command type="RDA"><![CDATA[var $shl = getEnv('SHELL')
var @tbl = ()
macro chk_low
{var (\@tbl,$err,$cmd,$min,$flg) = @arg
 var ($val) = command($cmd)
 if $flg
  var $val = field('\s+',1,$val)
 if !or(compare('eq',$val,'unlimited'),expr('>=',$val,$min))
  call push(@tbl,$err)
}
if match($shl,'csh')
{call chk_low(\@tbl,'SoftLow',concat($shl,' -f -c "limit descriptors"'),\
              1024,true)
 call chk_low(\@tbl,'HardLow',concat($shl,' -f -c "limit -h descriptors"'),\
              65536,true)
}
else
{call chk_low(\@tbl,'SoftLow',concat($shl,' -c "ulimit -Sn"'),1024,false)
 call chk_low(\@tbl,'HardLow',concat($shl,' -c "ulimit -Hn"'),65536,false)
}
call setHcveResult(cond(scalar(@tbl),join("\012",@tbl),'Adequate'))
]]></sdp_command>
<sdp_description><![CDATA[This rule checks that the soft limit of file descriptors is set to 1024 or higher and that the hard limit of file descriptors is set to 65536 or higher. For details about configuring this parameter, see the ''Oracle Database Installation Guide 11g Release 2 (11.2) for Linux''.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" minimum="Adequate" result="PASSED"><![CDATA[The soft limit of descriptors is set to 1024 or higher and the hard limit of descriptors is set to 65536 or higher.]]></sdp_action>
<sdp_action result="FAILED" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|SoftLow|Increase the soft limit for file descriptors to 1024 or higher.|
|HardLow|Increase the hard limit for file descriptors to 65536 or higher.|
]]></sdp_action>
</sdp_actions>
</sdp_rule>

<sdp_rule id="A00140" mode="VERIFY" name="LDLIBRARYPATH Unset?">
<sdp_command type="RDA"><![CDATA[call setHcveResult(cond(\
  defined(getEnv('LD_LIBRARY_PATH')),'IsSet','UnSet'))
]]></sdp_command>
<sdp_description><![CDATA[This rule checks that the ``LD_LIBRARY_PATH`` environment variable is not set.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" minimum="UnSet" result="PASSED"><![CDATA[The ``LD_LIBRARY_PATH`` environment variable is not set. No action required.]]></sdp_action>
<sdp_action result="FAILED"><![CDATA[The ``LD_LIBRARY_PATH`` environment variable is set in your environment and must be unset before installing Oracle Database 11g R2.]]></sdp_action>
</sdp_actions>
</sdp_rule>

<sdp_rule id="A00180" mode="VERIFY" name="JAVA_HOME Unset?">
<sdp_command type="RDA"><![CDATA[call setHcveResult(cond(\
  defined(getEnv('JAVA_HOME')),'IsSet','UnSet'))
]]></sdp_command>
<sdp_description><![CDATA[This rule checks that the JAVA_HOME environment variable is not set.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" minimum="UnSet" result="PASSED"><![CDATA[The JAVA_HOME environment variable is not set. No action required.]]></sdp_action>
<sdp_action result="FAILED"><![CDATA[The JAVA_HOME environment variable is set in your environment and must be unset before installing Oracle Database 11g R2.]]></sdp_action>
</sdp_actions>
</sdp_rule>

<sdp_rule id="A00190" mode="RECORD" name="Enter JDK Home">
<sdp_command default="" type="PROMPT" variable="$sdk"><![CDATA[JDK Home]]></sdp_command>
<sdp_description><![CDATA[This rule prompts the user for the JDK home.]]></sdp_description>
</sdp_rule>

<sdp_rule id="A00200" mode="VERIFY" name="JDK Version">
<sdp_dependencies>
<sdp_dependency condition="IS" id="A00190" minimum="PASSED|RECORD" result="FAILED"><![CDATA[Requires rule A00190.]]></sdp_dependency>
</sdp_dependencies>
<sdp_command type="RDA"><![CDATA[import $sdk
if !testDir('d',$sdk)
 return setHcveResult('JDK home is missing')
var $SDK_BIN = catDir($sdk,'bin')
if !testDir('d',$SDK_BIN)
 return setHcveResult('JDK bin directory is missing')
if !grepDir($SDK_BIN,'^javac$')
 return setHcveResult('JDK compiler is missing')
var $ver = field('\s+',3,\
 command(concat(catCommand($SDK_BIN,'java'),' -fullversion 2>&1')))
var $ver = trim(replace($ver,'[\-\_]','.',true),'"')
if !match($ver,'^\d+')
 call setHcveResult(concat('[',$ver,'] not verified'))
elsif compare('valid',$ver,'1.5.0.6.0')
 call setHcveResult('Adequate')
else
 call setHcveResult('Need 1.5 update 6 or later')
]]></sdp_command>
<sdp_description><![CDATA[This rule checks that the installed JDK version is JDK 5.0 update 6 or later. This is required for products like Oracle Java Database Connectivity and Oracle Call Interface drivers.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" minimum="Adequate" result="PASSED"><![CDATA[The correct JDK version is installed.]]></sdp_action>
<sdp_action result="FAILED" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|JDK bin directory is missing|Install full JDK package.|
|JDK compiler is missing|Install full JDK package.|
|... not verified|Cannot verify the version. Make sure JDK 1.5 update 6 or later is installed.|
|JDK home is missing|Provide correct location for JDK home.|
|Need 1.5 update 6 or later|Install JDK 1.5 update 6 or later|]]></sdp_action>
</sdp_actions>
</sdp_rule>

<sdp_rule id="A00210" mode="VERIFY" name="Other O_Hs in PATH?">
<sdp_command type="RDA"><![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')
]]></sdp_command>
<sdp_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.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" minimum="NoneFound" result="PASSED"><![CDATA[The PATH does not contain any of the Oracle home directories in the ``/etc/oratab`` file. No action required.]]></sdp_action>
<sdp_action result="FAILED"><![CDATA[The PATH variable contains one or more references to the Oracle home directories in the ``/etc/oratab`` file. Remove these references for the PATH variable before installing Oracle Database 11g R2.]]></sdp_action>
</sdp_actions>
</sdp_rule>

<sdp_rule id="A00220" mode="VERIFY" name="Other OUI Up?">
<sdp_command type="RDA"><![CDATA[call setHcveResult(cond(\
  grepCommand('/bin/ps -ef','runInstaller','i'),'AnotherOUIup','NoOtherOUI'))
]]></sdp_command>
<sdp_description><![CDATA[This rule checks for another active ``runInstaller`` process on the system.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" minimum="NoOtherOUI" result="PASSED"><![CDATA[No other ``runInstaller`` process is running. No action required.]]></sdp_action>
<sdp_action result="FAILED"><![CDATA[Stop the other instance of ``runInstaller`` that is active on your system.]]></sdp_action>
</sdp_actions>
</sdp_rule>

<sdp_rule id="A00230" mode="VERIFY" name="Temp Adequate?">
<sdp_command type="RDA"><![CDATA[
var ($flg,$tmp,@tbl) = (true,{'/tmp','/tmp'})
loop $key ('TMP','TMPDIR')
{if getEnv($key)
  var $tmp->{$key} = last
}
loop $key (keys(%tmp))
{if !testDir('d',$tmp->{$key})
  call push(@tbl,concat($key,' invalidDir'))
 else
 {if !testDir('w',$tmp->{$key})
   call push(@tbl,concat($key,' NoWrite'))
  if and($flg,expr('>=',get_df($tmp->{$key}),1048576))
   var $flg = false
 }
}
if $flg
{loop $key (keys(%tmp))
  call push(@tbl,concat($key,' tooSmall'))
}
call setHcveParameter('RULE.A00230',$tmp)
call setHcveVariable('$TMPDIR')
var $TMPDIR = getEnv('TMPDIR','/var/tmp')
if expr('<',get_df($TMPDIR),1048576)
 call push(@tbl,concat('TMPDIR lessThan1'))
call setHcveResult(cond(scalar(@tbl),join("\012",@tbl),'TempSpaceOK'))
]]></sdp_command>
<sdp_description><![CDATA[This rule checks that there is sufficient space available for storing temporary files during the Oracle Database 10g installation.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" minimum="TempSpaceOK" result="PASSED"><![CDATA[There is sufficient temporary disk space available for installing Oracle Database 10g. No action required.]]></sdp_action>
<sdp_action result="FAILED" syntax="wiki"><![CDATA[The temporary space is not configured correctly.
|*Return Value*|*Action*|
|/tmp invalidDir|ALERT - ``/tmp`` is not a valid directory. ``/tmp`` needs to be a directory.|
|/tmp NoWrite|ALERT - The user does not have write permissions to the ``/tmp`` directory.|
|/tmp tooSmall|ALERT - There is less than the needed 1 GB of free space in the ``/tmp`` directory.|
|TMP invalidDir|ALERT - ``TMP`` is set to ${`RULE.A00230.TMP} in the environment; however, ${`RULE.A00230.TMP} is an invalid directory. Take appropriate action.|
|TMP NoWrite|ALERT - ``TMP`` is set to ${`RULE.A00230.TMP} in the environment; however, the user does not have write permissions to ${`RULE.A00230.TMP}.|
|TMP tooSmall|ALERT - ``TMP`` is set to ${`RULE.A00230.TMP} in the environment; however, ${`RULE.A00230.TMP} has less than the required 1 GB of free space. Make sure your temporary space has at least 1 GB of free space.|
|TMPDIR invalidDir|ALERT - ``TMPDIR`` is set to ${`RULE.A00230.TMPDIR} in the environment; however, ${`RULE.A00230.TMPDIR} is an invalid directory. Take appropriate action.|
|TMPDIR NoWrite|ALERT - ``TMPDIR`` is set to ${`RULE.A00230.TMPDIR} in the environment; however, the user does not have write permissions to ${`RULE.A00230.TMPDIR}.|
|TMPDIR tooSmall|ALERT - ``TMPDIR`` is set to ${`RULE.A00230.TMPDIR} in the environment; however, ${`RULE.A00230.TMPDIR} has less than the required 1 GB of free space. Make sure your temporary space has at least 1 GB of free space.|
|TMPDIR lessThan1|ALERT - ${`TMPDIR} has less than the required 1 GB of free space. Make sure your ${`TMPDIR} has at least 1 GB of free space.|
Note: The ``runInstaller`` (OUI) uses or checks for temporary space by checking for the ``TEMP`` environment variable first, then the ``TMP`` environment variable, and finally the ``/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.]]></sdp_action>
</sdp_actions>
</sdp_rule>

<sdp_rule id="A00240" mode="VERIFY" name="Disk Space OK?">
<sdp_dependencies>
<sdp_dependency condition="IS" id="A00050" minimum="PASSED|RECORD" result="FAILED"><![CDATA[Requires rule A00050.]]></sdp_dependency>
</sdp_dependencies>
<sdp_command type="RDA"><![CDATA[import $ORACLE_HOME,$OS_BIT
call setHcveVariable('$ORACLE_HOME')
if !length($ORACLE_HOME)
 return setHcveResult('OHNotSpecified')
if !testDir('d',$ORACLE_HOME)
 return setHcveResult('OHNotValid')
var $dsk = expr('/',get_df($ORACLE_HOME),1024)
call setHcveResult(cond(expr('==',$OS_BIT,64),\
                     cond(expr('>=',$dsk,6175),   'DiskSpaceOK',\
                          expr('>=',$dsk,4455),   'OnlySpaceForOne',\
                                                  'NoSpace'),\
                     cond('==',$OS_BIT,32),\
                       cond(expr('>=',$dsk,5876), 'DiskSpaceOK',\
                            expr('>=',$dsk,4045), 'OnlySpaceForOne',\
                                                  'NoSpace'),\
                                                  'OsBitUnknown'))
]]></sdp_command>
<sdp_description><![CDATA[This rule verifies that the amount of disk space in the Oracle home directory is sufficient for installing Oracle Database 11g R2.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" minimum="DiskSpaceOK" result="PASSED"><![CDATA[The Oracle home directory has sufficient disk space to install Oracle Database software, and create a database. No action required.]]></sdp_action>
<sdp_action condition="==" minimum="OHNotSpecified" result="SKIPPED"><![CDATA[No ``ORACLE_HOME`` was provided to enable checking.]]></sdp_action>
<sdp_action result="FAILED" syntax="wiki"><![CDATA[The Oracle home directory has insufficient disk space for installing any type of Oracle Database 11g R2 architecture. Verify the specifications.
|*Return Value*|*Action*|
|NoSpace|${`ORACLE_HOME} has insufficient free disk space for an Oracle Database 11g R2 installation.|
|OHNotValid|Disk space calculations cannot be performed since ${`ORACLE_HOME} is not a valid directory|
|OnlySpaceForOne|${`ORACLE_HOME} has sufficient free disk space to install the Oracle Database 11g R2 software but not enough to create a database.|
|OsBitUnknown|Disk space calculations cannot be performed since this is an unknown architecture|]]></sdp_action>
</sdp_actions>
</sdp_rule>

<sdp_rule id="A00250" mode="RECORD" name="Swap (in MB)">
<sdp_command type="RDA"><![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'))
]]></sdp_command>
<sdp_description><![CDATA[This rule shows the amount of free swap space.]]></sdp_description>
</sdp_rule>

<sdp_rule id="A00260" mode="VERIFY" name="RAM (in MB)">
<sdp_command type="RDA"><![CDATA[call setHcveResult(nvl(\
  field('\s+',1,grepCommand('/usr/bin/free -m','Mem','f')),\
  0))
]]></sdp_command>
<sdp_description><![CDATA[This rule verifies that your system has sufficient physical memory installed to install Oracle Database 11g R2.]]></sdp_description>
<sdp_actions>
<sdp_action condition=">=" minimum="2048" result="PASSED"><![CDATA[You have sufficient physical memory (MB) installed to install Oracle Database 11g R2. No action required.]]></sdp_action>
<sdp_action condition=">=" minimum="1024" result="FAILED"><![CDATA[You have sufficient physical memory (MB) installed to install Oracle Database 11g R2. However, you have less than the 2GB or more of physical memory recommended by Oracle.]]></sdp_action>
<sdp_action result="FAILED"><![CDATA[ALERT:
You do not have sufficient physical memory in your system to install Oracle Database 11g R2.]]></sdp_action>
</sdp_actions>
</sdp_rule>

<sdp_rule id="A00270" mode="VERIFY" name="Swap OK?">
<sdp_dependencies>
<sdp_dependency condition="!~" id="A00250" minimum="SWAP" result="SKIPPED" value="The amount of swap must be known"><![CDATA[Requires the amount of swap space.]]></sdp_dependency>
<sdp_dependency condition=">=" id="A00260" minimum="1024" result="SKIPPED" value="The amount of physical memory must be known and must be at least the minimum for installation."><![CDATA[The required swap is not defined unless the amount of physical memory is known and is at least the minimum required for installation.]]></sdp_dependency>
</sdp_dependencies>
<sdp_command type="RDA"><![CDATA[var $swp = "%A00250%"
var $mem = "%A00260%"
call setHcveResult(cond(\
  expr('<',$mem,1024),                     'LowMem',\
  expr('<',$mem,2048),\
    cond(expr('<',$swp,expr('*',$mem,1.5)),'SwapLessThanRAM','SwapToRAMOK'),\
  expr('<',$mem,16384),\
    cond(expr('<',$swp,$mem),              'SwapLessThanRAM','SwapToRAMOK'),\
  expr('<',$swp,16384),                    'SwapLessThanRAM',\
                                           'SwapToRAMOK'))
]]></sdp_command>
<sdp_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 2 (11.2) for Linux''.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" minimum="SwapToRAMOK" result="PASSED"><![CDATA[The amount of swap space meets the minimum requirement for installing Oracle Database 11g R2. No action required.]]></sdp_action>
<sdp_action condition="==" minimum="LowMem" result="SKIPPED"><![CDATA[The amount of physical memory is inadequate; therefore, ratio to swap space is not defined.]]></sdp_action>
<sdp_action result="FAILED" syntax="wiki"><![CDATA[The amount of swap space is less than the amount recommended by the ${'BOOK}. Verify the requirements and adjust your system accordingly.
|*Return Value*|*Action*|
|SwapLessThanRAM|If physical memory is between 1 GB and 2 GB, then the swap space is to be at least 1.5 times the physical memory. If physical memory is between 2 GB and 16 GB, then the swap space is to be at least equal to physical memory. If physical memory is more than 16 GB, then the swap space is to be at least 16 GB.|]]></sdp_action>
</sdp_actions>
</sdp_rule>

<sdp_rule id="A00275" mode="VERIFY" name="Processor Speed?">
<sdp_command type="RDA"><![CDATA[if !testFile('r','/proc/cpuinfo')
 return setHcveResult('Cannot access /proc/cpuinfo')
var @CPU = grepFile('/proc/cpuinfo','.')
var $MHZ = field('\s+:\s+',1,grep(@CPU,'cpu MHz','f'))
call setHcveResult($MHZ)]]></sdp_command>
<sdp_description><![CDATA[This rule checks for the processor speed. The minimum requirement for the processor speed is 2 GHz.]]></sdp_description>
<sdp_actions>
<sdp_action condition=">=" minimum="2000" result="PASSED"><![CDATA[The minimum r
equirement for the processor speed is met.]]></sdp_action>
<sdp_action result="FAILED"><![CDATA[The processor speed must be 2 GHz or faster.]]></sdp_action>
</sdp_actions>
</sdp_rule>

<sdp_rule id="A00280" mode="VERIFY" name="Network">
<sdp_command type="RDA"><![CDATA[call setHcveResult(cond(\
  not(testFile('x','/sbin/ifconfig')),     'Cannot access /sbin/ifconfig',\
  grepCommand('/sbin/ifconfig','eth','f'), 'Connected',\
                                           'Not connected. Check log.'))
]]></sdp_command>
<sdp_description><![CDATA[This rule checks that the system is connected to a network. You can install Oracle Database 11g R2 on a standalone system that is not connected to a network or on a system that is connected to a network. Although both cases are supported, when the system is not connected to a network, you must configure the system to resolve the host name of the computer to either a static IP address or a loopback IP address. To access Oracle Database 11g R2, you must use a local browser. For more information, see the ''Oracle Database Installation Guide 11g Release 2 (11.2) for Linux''.]]></sdp_description>
<sdp_actions>
<sdp_action condition="=~" minimum="Connected|Not connected. Check log." result="PASSED"><![CDATA[The system is connected to a network.]]></sdp_action>
<sdp_action result="FAILED" syntax="wiki"><![CDATA[|*Return Value*|*Action*|
|Cannot access /sbin/ifconfig|Grant execute permissions on ``/sbin/ifconfig`` to the user who is logged in.|]]></sdp_action>
</sdp_actions>
</sdp_rule>

<sdp_rule id="A00290" mode="RECORD" name="IP Address">
<sdp_command type="RDA"><![CDATA[var $hst = field('\.',0,command('hostname'))
var ($lin) = grepFile('/etc/hosts',\
 concat('^[^#]+\s\<?',quote($hst),'\>?($|\.|\s)'),'f')
call setHcveResult(field('\s+',0,$lin))
]]></sdp_command>
<sdp_description><![CDATA[This rule gets the host IP address.]]></sdp_description>
</sdp_rule>

<sdp_rule id="A00300" mode="RECORD" name="Domain Name">
<sdp_dependencies>
<sdp_dependency condition="IS" id="A00290" minimum="PASSED|RECORD" result="FAILED"><![CDATA[Requires rule A00290.]]></sdp_dependency>
</sdp_dependencies>
<sdp_command type="RDA"><![CDATA[var $ip = "%A00290%"
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'))
]]></sdp_command>
<sdp_description><![CDATA[This rule gets the host domain name.]]></sdp_description>
</sdp_rule>

<sdp_rule id="A00310" mode="VERIFY" name="DNS Lookup">
<sdp_dependencies>
<sdp_dependency condition="IS" id="A00300" minimum="PASSED|RECORD" result="FAILED"><![CDATA[Requires rule A00300.]]></sdp_dependency>
<sdp_dependency condition="IS" id="A00290" minimum="PASSED|RECORD" result="FAILED"><![CDATA[Requires rule A00290.]]></sdp_dependency>
</sdp_dependencies>
<sdp_command type="RDA"><![CDATA[var $dom = "%A00300%"
var $ip  = "%A00290%"
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'))
]]></sdp_command>
<sdp_description><![CDATA[This rule checks that the host is registered correctly in the DNS.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" minimum="Host correctly registered in DNS" result="PASSED"><![CDATA[The host is registered correctly in the DNS.]]></sdp_action>
<sdp_action result="FAILED" 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 permissions on ``/usr/bin/nslookup`` to the user who is logged in.|]]></sdp_action>
</sdp_actions>
</sdp_rule>

<sdp_rule id="A00320" mode="VERIFY" name="/etc/hosts Format">
<sdp_dependencies>
<sdp_dependency condition="IS" id="A00300" minimum="PASSED|RECORD" result="FAILED"><![CDATA[Requires domain name.]]></sdp_dependency>
</sdp_dependencies>
<sdp_command type="RDA"><![CDATA[
if !testFile('r','/etc/hosts')
 return setHcveResult('Cannot access /etc/hosts')
if !@tbl = grepFile('/etc/hosts',\
  concat('^([^\s\#]+\s+)+',quote(${RDA.HOST}),\
         '\s+([^\s\#]+\s+)*',quote(${RDA.NODE}),'(\s|\z|\#)'))
 return setHcveResult('no entry found')

# Test that line begins with IPv4 IP address
if grep(@tbl,'^(\d{1,3}\.){3}\d{1,3}\s','f')
 return setHcveResult('Adequate IPv4 entry')

# Tests that line begins with IPv6 IP address, first that all eight groups are populated, then situations where groups that are all zero are omitted (two colons together).
if grep(@tbl,'^([A-F\d]{1,4}(:[A-F\d]{1,4}){7}\s|\
                :(:[A-F\d]{1,4}){1,6}\s|\
                ([A-F\d]{1,4}:){1,5}(:[A-F\d]{1,4}){1,5}\s|\
                ([A-F\d]{1,4}:){1,6}:\s)','f')
 return setHcveResult('Adequate IPv6 entry')
return setHcveResult('no correct entry found')
]]></sdp_command>
<sdp_description><![CDATA[This rule checks that the ``/etc/hosts`` file contains a line with ``ip_address fully_qualified_domainname short_hostname``.]]></sdp_description>
<sdp_actions>
<sdp_action condition="=~" minimum="^Adequate" result="PASSED"><![CDATA[The ``/etc/hosts`` entry for the fully qualified domain name and host name is adequate.]]></sdp_action>
<sdp_action condition="==" minimum="Cannot access /etc/hosts" result="FAILED"><![CDATA[Grant read permissions on ``/etc/hosts`` to the current user.]]></sdp_action>
<sdp_action result="FAILED" syntax="wiki"><![CDATA[The fully qualified host name and host name are not configured correctly. Ensure that there is an IP address entry for the fully qualified domain name with the host name as one of the aliases.
|*Return Value*|*Action"|
|no entry found|No entry with the fully qualified domain name followed by the host name was found.|
|no correct entry found|No entry beginning with an IP address with the fully qualified domain name followed by the host name was found.|]]></sdp_action>
</sdp_actions>
</sdp_rule>

<sdp_rule id="A00330" mode="VERIFY" name="Kernel Parameters OK?">
<sdp_dependencies>
<sdp_dependency condition="IS" id="A00260" minimum="PASSED|RECORD" result="FAILED"><![CDATA[Requires rule A00260.]]></sdp_dependency>
</sdp_dependencies>
<sdp_command type="RDA"><![CDATA[
var @tbl = ()
var $AIOMAXREQD  = 1048576
var $FILEMAXREQD = 65536
var $RMEMDFTREQD = 262144
var $RMEMREQD    = 4194304
var $SEMMNIREQD  = 128
var $SEMMNSREQD  = 32000
var $SEMMSLREQD  = 250
var $SEMOPMREQD  = 100
var $SHMALLREQD  = 2097152
var $SHMMAXREQD  = expr('*',%A00260%,524288)
var $SHMMAXREQD  = min(4294967295,$SHMMAXREQD)
var $SHMMNIREQD  = 4096
var $WMEMDFTREQD = 262144
var $WMEMREQD    = 1048576
call setHcveVariable('$AIOMAXREQD','$FILEMAXREQD','$RMEMDFTREQD','$RMEMREQD',\
       '$SEMMNIREQD','$SEMMNSREQD','$SEMMSLREQD','$SEMOPMREQD','$SHMALLREQD',\
       'SHMMAXREQD','$SHMMNIREQD','$WMEMDFTREQD','$WMEMREQD')
macro chk_minimum
{var (\@tbl,$nam,$max,$val) = @arg
 if !defined($val)
 {call push(@tbl,concat($nam,'Undef'))
  return
 }
 if expr('<',$val,$max)
  call push(@tbl,concat($nam,'TooSmall'))
}
call chk_minimum(\@tbl,'AIOMAX',$AIOMAXREQD,\
                 grepFile('/proc/sys/fs/aio-max-nr','.','f'))
call chk_minimum(\@tbl,'FILEMAX',$FILEMAXREQD,\
                 grepFile('/proc/sys/fs/file-max','.','f'))
call chk_minimum(\@tbl,'RMEM_DEFAULT',$RMEMDFTREQD,\
      grepCommand('/sbin/sysctl -e net.core.rmem_default','=\s*(\d+)','f1'))
call chk_minimum(\@tbl,'RMEM_MAX',$RMEMREQD,\
      grepCommand('/sbin/sysctl -e net.core.rmem_max','=\s*(\d+)','f1'))
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',$WMEMDFTREQD,\
      grepCommand('/sbin/sysctl -e net.core.wmem_default','=\s*(\d+)','f1'))
call chk_minimum(\@tbl,'WMEM_MAX',$WMEMREQD,\
      grepCommand('/sbin/sysctl -e net.core.wmem_max','=\s*(\d+)','f1'))
call setHcveResult(cond(scalar(@tbl),join("\012",@tbl),'KernelOK'))
]]></sdp_command>
<sdp_description><![CDATA[This rule verifies that the kernel parameters are set according to the ''Oracle Database Installation Guide 11g Release 2 (11.2) for Linux''.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" minimum="KernelOK" result="PASSED" syntax="wiki"><![CDATA[The kernel parameters are set according to the ${'BOOK}. No action required.]]></sdp_action>
<sdp_action result="FAILED" syntax="wiki"><![CDATA[The kernel parameters are not set according to the ${'BOOK}.
|*Return Value*|*Action*|
|AIOMAXTooSmall|Increase the kernel parameter AIO-MAX-NR to at least ${AIOMAXREQD}|
|AIOMAXUndef|AIO-MAX-NR is not defined and must be set to ${AIOMAXREQD}|
|FILEMAXTooSmall|Increase the kernel parameter FILE-MAX to at least ${FILEMAXREQD}|
|FILEMAXUndef|FILE-MAX is not defined and must be set to ${FILEMAXREQD}|
|RMEM_DEFAULTTooSmall|Increase the kernel parameter RMEM_DEFAULT to at least ${RMEMDFTREQD}|
|RMEM_DEFAULTUndef|RMEM_DEFAULT is not defined and must be set to ${RMEMDFTREQD}|
|RMEM_MAXTooSmall|Increase the kernel parameter RMEM_MAX to at least ${RMEMREQD}|
|RMEM_MAXUndef|RMEM_MAX is not defined and must be set to ${RMEMREQD}|
|SEMMNIUndef|SEMMNI is not defined and must be set to ${SEMMNIREQD}|
|SEMMNITooSmall|Increase the kernel parameter SEMMNI to at least ${SEMMNIREQD}|
|SEMMSLUndef|SEMMSL is not defined and must be set to ${SEMMSLREQD}|
|SEMMSLTooSmall|Increase the kernel parameter SEMMSL to at least ${SEMMSLREQD}|
|SEMMNSUndef|SEMMNS is not defined and must be set to ${SEMMNSREQD}|
|SEMMNSTooSmall|Increase the kernel parameter SEMMNS to at least ${SEMMNSREQD}|
|SEMOPMUndef|SEMOPM is not defined and must be set to ${SEMOPMREQD}|
|SEMOPMTooSmall|Increase the kernel parameter SEMOPM to at least ${SEMOPMREQD}|
|SHMALLUndef|SHMALL is not defined and must be set to ${SHMALLREQD} or more|
|SHMALLTooSmall|Increase the kernel parameter SHMALL to at least ${SHMALLREQD}|
|SHMMAXUndef|SHMMAX is not defined and must be set to ${SHMMAXREQD} or more|
|SHMMAXTooSmall|Increase the kernel parameter SHMMAX to at least ${SHMMAXREQD}|
|SHMMNIUndef|SHMMNI is not 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 ${WMEMDFTREQD}|
|WMEM_DEFAULTUndef|WMEM_DEFAULT is not defined and must be set to ${WMEMDFTREQD}|
|WMEM_MAXTooSmall|Increase the kernel parameter WMEM_MAX to at least ${WMEMREQD}|
|WMEM_MAXUndef|WMEM_MAX is not defined and must be set to ${WMEMREQD}|]]></sdp_action>
</sdp_actions>
</sdp_rule>

<sdp_rule id="A00380" mode="VERIFY" name="Tainted Kernel?">
<sdp_command type="RDA"><![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'))
]]></sdp_command>
<sdp_description><![CDATA[This rule determines if the kernel contains tainted modules.]]></sdp_description>
<sdp_actions>
<sdp_action condition="=~" minimum="NotTainted|NotVerifiable" result="PASSED"><![CDATA[The Linux kernel is not tainted.  No action is required.]]></sdp_action>
<sdp_action result="FAILED"><![CDATA[The Linux kernel is tainted. For clarification about what action is required, see Knowledge Article 225710.1.]]></sdp_action>
</sdp_actions>
</sdp_rule>

<sdp_rule id="A00400" mode="VERIFY" name="ip_local_port_range OK?">
<sdp_command type="RDA"><![CDATA[var @tbl = ()
if !testFile('f','/proc/sys/net/ipv4/ip_local_port_range')
 return setHcveResult('iplocalNotFound')
macro chk_port_range
{var (\@tbl,$min,$max) = @arg
 if !?$min
  return push(@tbl,'iplocalNotFound')
 if !?$max
  return push(@tbl,'iplocalNotFound')
 if !expr('==',$min,9000)
  call push(@tbl,'LowValue')
 if !expr('==',$max,65500)
  call push(@tbl,'HighValue')
}
call chk_port_range(\@tbl,split('\s+',\
  grepFile('/proc/sys/net/ipv4/ip_local_port_range','\d+','f'),2))
call setHcveResult(cond(scalar(@tbl),join("\012",@tbl),'RangeOK'))
]]></sdp_command>
<sdp_description><![CDATA[This rule checks that the ``ip_local_port_range`` kernel parameter is set according to the ''Oracle Database Installation Guide 11g Release 2 (11.2) for Linux''.]]></sdp_description>
<sdp_actions>
<sdp_action condition="==" minimum="RangeOK" result="PASSED"><![CDATA[The sockets defined in ``/proc/sys/net/ipv4/ip_local_port_range`` are adequate for installing Oracle Database 11g R2. No action required.]]></sdp_action>
<sdp_action result="FAILED" syntax="wiki"><![CDATA[The values in ``/proc/sys/net/ipv4/ip_local_port_range`` are not set as recommended for installing Oracle Database 11g. Change the values according to the latest recommendations:
%BR%``$ /bin/echo 9000 65500 > /proc/sys/net/ipv4/ip_local_port_range``

|*Return Value*|*Action*|
|LowValue|The recommended low end value for ``ip_local_port_range`` is 9000|
|HighValue|The recommended high end value for ``ip_local_port_range`` is 65500|
|iplocalNotFound|``ip_local_port_range`` is not present in the ``/proc/sys/net/ipv4`` directory as required|]]></sdp_action>
</sdp_actions>
</sdp_rule>

<sdp_rule id="A00480" mode="VERIFY" name="OL4 RPMs OK?">
<sdp_command type="RDA"><![CDATA[import $OS_BIT,$OS_NAM,$OS_TYP
if !match($OS_TYP,'Oracle')
 call setHcveResult('NotOracle')
elsif !match($OS_NAM,'october',true)
 call setHcveResult('NotOL4')
else
{var @tbl = ()
 if expr('==',$OS_BIT,32)
 {# OL4 - 32 bit
  call cmp_os_pkg(\@tbl,'binutils',['2.15.92.0.2','25'])
  call cmp_os_pkg(\@tbl,'compat-libstdc++-33',['3.2.3','47.3'])
  call cmp_os_pkg(\@tbl,'elfutils-libelf',['0.97.1','5'])
  call cmp_os_pkg(\@tbl,'elfutils-libelf-devel',['0.97.1','5'],'i386')
  call cmp_os_pkg(\@tbl,'gcc',['3.4.6','10'],'i386')
  call cmp_os_pkg(\@tbl,'gcc-c++',['3.4.6','10'],'i386')
  call cmp_os_pkg(\@tbl,'glibc',['2.3.4','2.41'])
  call cmp_os_pkg(\@tbl,'glibc-common',['2.3.4','2.41'])
  call cmp_os_pkg(\@tbl,'glibc-devel',['2.3.4','2.41'],'i386')
  call cmp_os_pkg(\@tbl,'glibc-headers',['2.3.4','2.41'],'i386')
  call cmp_os_pkg(\@tbl,'glibc-kernheaders',['2.4','9.1.103.EL'],'i386')
  call cmp_os_pkg(\@tbl,'libaio',['0.3.105','2'])
  call cmp_os_pkg(\@tbl,'libaio-devel',['0.3.105','2'],'i386')
  call cmp_os_pkg(\@tbl,'libgcc',['3.4.6','10'])
  call cmp_os_pkg(\@tbl,'libstdc++',['3.4.6','10'])
  call cmp_os_pkg(\@tbl,'libstdc++-devel',['3.4.6','10'],'i386')
  call cmp_os_pkg(\@tbl,'make',['3.80','7.EL4'])
  call cmp_os_pkg(\@tbl,'pdksh',['5.2.14','30.6'])
  call cmp_os_pkg(\@tbl,'sysstat',['5.0.5','19.el4'],'i386')
  call cmp_os_pkg(\@tbl,'unixODBC',['2.2.11','1.RHEL4.1'])
  call cmp_os_pkg(\@tbl,'unixODBC-devel',['2.2.11','1.RHEL4.1'],'i386')
 }
 else
 {# OL4 - 64 bit
  call cmp_os_pkg(\@tbl,'binutils',['2.15.92.0.2','25'],'x86_64')
  call cmp_os_pkg(\@tbl,'compat-libstdc++-33',['3.2.3','47.3'],'i386')
  call cmp_os_pkg(\@tbl,'compat-libstdc++-33',['3.2.3','47.3'],'x86_64')
  call cmp_os_pkg(\@tbl,'elfutils-libelf',['0.97.1','5'],'x86_64')
  call cmp_os_pkg(\@tbl,'elfutils-libelf-devel',['0.97.1','5'],'x86_64')
  call cmp_os_pkg(\@tbl,'expat',['1.95.7','4'],'x86_64')
  call cmp_os_pkg(\@tbl,'gcc',['3.4.6','10'],'x86_64')
  call cmp_os_pkg(\@tbl,'gcc-c++',['3.4.6','10'],'x86_64')
  call cmp_os_pkg(\@tbl,'glibc',['2.3.4','2.41'],'i686')
  call cmp_os_pkg(\@tbl,'glibc',['2.3.4','2.41'],'x86_64')
  call cmp_os_pkg(\@tbl,'glibc-common',['2.3.4','2.41'],'x86_64')
  call cmp_os_pkg(\@tbl,'glibc-devel',['2.3.4','2.41'],'x86_64')
  call cmp_os_pkg(\@tbl,'glibc-headers',['2.3.4','2.41'],'x86_64')
  call cmp_os_pkg(\@tbl,'glibc-kernheaders',['2.4','9.1.103.EL'],'x86_64')
  call cmp_os_pkg(\@tbl,'libaio',['0.3.105','2'],'i386')
  call cmp_os_pkg(\@tbl,'libaio',['0.3.105','2'],'x86_64')
  call cmp_os_pkg(\@tbl,'libaio-devel',['0.3.105','2'],'i386')
  call cmp_os_pkg(\@tbl,'libaio-devel',['0.3.105','2'],'x86_64')
  call cmp_os_pkg(\@tbl,'libgcc',['3.4.6','10'],'x86_64')
  call cmp_os_pkg(\@tbl,'libgcc',['3.4.6','10'],'i386')
  call cmp_os_pkg(\@tbl,'libstdc++',['3.4.6','10'],'i386')
  call cmp_os_pkg(\@tbl,'libstdc++',['3.4.6','10'],'x86_64')
  call cmp_os_pkg(\@tbl,'libstdc++-devel',['3.4.6','10'],'x86_64')
  call cmp_os_pkg(\@tbl,'make',['3.80','7.EL4'],'x86_64')
  call cmp_os_pkg(\@tbl,'pdksh',['5.2.14','30.6'],'x86_64')
  call cmp_os_pkg(\@tbl,'sysstat',['5.0.5','19.el4'],'x86_64')
  call cmp_os_pkg(\@tbl,'unixODBC',['2.2.11','1.RHEL4.1'],'x86_64')
  call cmp_os_pkg(\@tbl,'unixODBC',['2.2.11','1.RHEL4.1'],'i386')
  call cmp_os_pkg(\@tbl,'unixODBC-devel',['2.2.11','1.RHEL4.1'],'x86_64')
  call cmp_os_pkg(\@tbl,'unixODBC-devel',['2.2.11','1.RHEL4.1'],'i386')
 }
 call setHcveResult(cond(scalar(@tbl),join("\012",@tbl),'OL4rpmsOK'))
}]]></sdp_command>
<sdp_description><![CDATA[This rule verifies that the correct versions of the required RPMs are installed on an Oracle Linux 4 system.]]></sdp_description>
<sdp_actions>
<sdp_action condition="=~" minimum="OL4rpmsOK" result="PASSED"><![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 Oracle Linux 4 system. No action required.]]></sdp_action>
<sdp_action condition="=~" minimum="NotOL4|NotOracle" result="SKIPPED"><![CDATA[Not applicable on this system]]></sdp_action>
<sdp_action result="FAILED"><![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 Knowledge Article 169706.1.]]></sdp_action>
</sdp_actions>
</sdp_rule>

<sdp_rule id="A00490" mode="VERIFY" name="OL5 RPMs OK?">
<sdp_command type="RDA"><![CDATA[import $OS_BIT,$OS_NAM,$OS_TYP
if !match($OS_TYP,'Oracle')
 call setHcveResult('NotOracle')
elsif !match($OS_NAM,'(carthage|^oracle.*release\s5\.\d+$)',true)
 call setHcveResult('NotOL5')
else
{var @tbl = ()
 if expr('==',$OS_BIT,32)
 {# OL5.0 32-bit
  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'],'i386')
  call cmp_os_pkg(\@tbl,'elfutils-libelf-devel-static',['0.125','3.el5'],'i386')
  call cmp_os_pkg(\@tbl,'gcc',['4.1.2','42.el5'],'i386')
  call cmp_os_pkg(\@tbl,'gcc-c++',['4.1.2','42.el5'],'i386')
  call cmp_os_pkg(\@tbl,'glibc',['2.5','24'])
  call cmp_os_pkg(\@tbl,'glibc-common',['2.5','12'])
  call cmp_os_pkg(\@tbl,'glibc-devel',['2.5','24'],'i386')
  call cmp_os_pkg(\@tbl,'glibc-headers',['2.5','24'],'i386')
  call cmp_os_pkg(\@tbl,'kernel-headers',['2.6.18','92.el5'],'i386')
  call cmp_os_pkg(\@tbl,'ksh',['20060214','1.7'])
  call cmp_os_pkg(\@tbl,'libaio',['0.3.106'])
  call cmp_os_pkg(\@tbl,'libaio-devel',['0.3.106','3.2'],'i386')
  call cmp_os_pkg(\@tbl,'libgcc',['4.1.2','42.el5'])
  call cmp_os_pkg(\@tbl,'libgomp',['4.1.2','42.el5'],'i386')
  call cmp_os_pkg(\@tbl,'libstdc++',['4.1.2','42'])
  call cmp_os_pkg(\@tbl,'libstdc++-devel',['4.1.2','42.el5'],'i386')
  call cmp_os_pkg(\@tbl,'make',['3.81','1.1'])
  call cmp_os_pkg(\@tbl,'sysstat',['7.0.2','1.el5'],'i386')
  call cmp_os_pkg(\@tbl,'unixODBC',['2.2.11','7.1'],'i386')
  call cmp_os_pkg(\@tbl,'unixODBC-devel',['2.2.11','7.1'],'i386')
 }
 else
 {# OL5.0 64-bit
  call cmp_os_pkg(\@tbl,'binutils',['2.17.50.0.6','6.el5'],'x86_64')
  call cmp_os_pkg(\@tbl,'compat-libstdc++-33',['3.2.3','61'],'i386')
  call cmp_os_pkg(\@tbl,'compat-libstdc++-33',['3.2.3','61'],'x86_64')
  call cmp_os_pkg(\@tbl,'elfutils-libelf',['0.125','3.el5'],'x86_64')
  call cmp_os_pkg(\@tbl,'elfutils-libelf-devel',['0.125','3.el5'],'x86_64')
  call cmp_os_pkg(\@tbl,'elfutils-libelf-devel-static',['0.125','3.el5'],'x86_64')
  call cmp_os_pkg(\@tbl,'gcc',['4.1.2','42.el5'],'x86_64')
  call cmp_os_pkg(\@tbl,'gcc-c++',['4.1.2','42.el5'],'x86_64')
  call cmp_os_pkg(\@tbl,'glibc',['2.5','24'],'i686')
  call cmp_os_pkg(\@tbl,'glibc',['2.5','24'],'x86_64')
  call cmp_os_pkg(\@tbl,'glibc-common',['2.5','24'],'x86_64')
  call cmp_os_pkg(\@tbl,'glibc-devel',['2.5','24'],'i386')
  call cmp_os_pkg(\@tbl,'glibc-headers',['2.5','24'],'x86_64')
  var @tmp = ()
  call cmp_os_pkg(\@tmp,'kernel-uek-headers',['2.6.30'],'x86_64')
  if (@tmp)
  {if match($tmp[0],' not installed$')
    call cmp_os_pkg(\@tbl,'kernel-headers',['2.6.18','92.el5'],'x86_64')
   else
    call push(@tbl,@tmp)
  }
  call cmp_os_pkg(\@tbl,'ksh',['20060214','1.7'],'x86_64')
  call cmp_os_pkg(\@tbl,'libaio',['0.3.106','3.2'],'i386')
  call cmp_os_pkg(\@tbl,'libaio',['0.3.106','3.2'],'x86_64')
  call cmp_os_pkg(\@tbl,'libaio-devel',['0.3.106','3.2'],'i386')
  call cmp_os_pkg(\@tbl,'libaio-devel',['0.3.106','3.2'],'x86_64')
  call cmp_os_pkg(\@tbl,'libgcc',['4.1.2','42.el5'],'i386')
  call cmp_os_pkg(\@tbl,'libgcc',['4.1.2','42.el5'],'x86_64')
  call cmp_os_pkg(\@tbl,'libgomp',['4.1.2','42.el5'],'x86_64')
  call cmp_os_pkg(\@tbl,'libstdc++',['4.1.2','42.el5'],'i386')
  call cmp_os_pkg(\@tbl,'libstdc++',['4.1.2','42.el5'],'x86_64')
  call cmp_os_pkg(\@tbl,'libstdc++-devel',['4.1.2','42.el5'],'x86_64')
  call cmp_os_pkg(\@tbl,'make',['3.81','3.el5'],'x86_64')
  call cmp_os_pkg(\@tbl,'sysstat',['7.0.2','1.el5'],'x86_64')
  call cmp_os_pkg(\@tbl,'unixODBC',['2.2.11','7.1'],'i386')
  call cmp_os_pkg(\@tbl,'unixODBC',['2.2.11','7.1'],'x86_64')
  call cmp_os_pkg(\@tbl,'unixODBC-devel',['2.2.11','7.1'],'i386')
  call cmp_os_pkg(\@tbl,'unixODBC-devel',['2.2.11','7.1'],'x86_64')
 }
 call setHcveResult(cond(scalar(@tbl),join("\012",@tbl),'OL5rpmsOK'))
}]]></sdp_command>
<sdp_description><![CDATA[This rule verifies that the correct versions of the required RPMs are installed on an Oracle Linux 5 system.]]></sdp_description>
<sdp_actions>
<sdp_action condition="=~" minimum="OL5rpmsOK" result="PASSED"><![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 Oracle Linux 5 system. No action required.]]></sdp_action>
<sdp_action condition="=~" minimum="NotOL5|NotOracle" result="SKIPPED"><![CDATA[Not applicable on this system]]></sdp_action>
<sdp_action result="FAILED"><![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 Knowledge Article 169706.1.]]></sdp_action>
</sdp_actions>
</sdp_rule>

<sdp_rule id="A00500" mode="VERIFY" name="OL6 RPMs OK?">
<sdp_command type="RDA"><![CDATA[import $OS_BIT,$OS_NAM,$OS_TYP
if !match($OS_TYP,'Oracle')
 call setHcveResult('NotOracle')
elsif !match($OS_NAM,'^oracle.*release\s6\.\d+$',true)
 call setHcveResult('NotOL6')
else
{var @tbl = ()
 if expr('==',$OS_BIT,64)
 {# OL6 64-bit
  call cmp_os_pkg(\@tbl,'binutils',['2.20.51.0.2','5.11.el6'],'x86_64')
  call cmp_os_pkg(\@tbl,'compat-libcap1',['1.10','1'],'x86_64')
  call cmp_os_pkg(\@tbl,'compat-libstdc++-33',['3.2.3','69.el6'],'i686')
  call cmp_os_pkg(\@tbl,'compat-libstdc++-33',['3.2.3','69.el6'],'x86_64')
  call cmp_os_pkg(\@tbl,'gcc',['4.4.4','13.el6'],'x86_64')
  call cmp_os_pkg(\@tbl,'gcc-c++',['4.4.4','13.el6'],'x86_64')
  call cmp_os_pkg(\@tbl,'glibc',['2.12','1.7.el6'],'i686')
  call cmp_os_pkg(\@tbl,'glibc',['2.12','1.7.el6'],'x86_64')
  call cmp_os_pkg(\@tbl,'glibc-devel',['2.12','1.7.el6'],'i686')
  call cmp_os_pkg(\@tbl,'glibc-devel',['2.12','1.7.el6'],'x86_64')
  call cmp_os_pkg(\@tbl,'ksh',['20100621','12.el6'],'x86_64')
  call cmp_os_pkg(\@tbl,'libaio',['0.3.107','10.el6'],'i686')
  call cmp_os_pkg(\@tbl,'libaio',['0.3.107','10.el6'],'x86_64')
  call cmp_os_pkg(\@tbl,'libaio-devel',['0.3.107','10.el6'],'i686')
  call cmp_os_pkg(\@tbl,'libaio-devel',['0.3.107','10.el6'],'x86_64')
  call cmp_os_pkg(\@tbl,'libgcc',['4.4.4','13.el6'],'i686')
  call cmp_os_pkg(\@tbl,'libgcc',['4.4.4','13.el6'],'x86_64')
  call cmp_os_pkg(\@tbl,'libstdc++',['4.4.4','13.el6'],'i686')
  call cmp_os_pkg(\@tbl,'libstdc++',['4.4.4','13.el6'],'x86_64')
  call cmp_os_pkg(\@tbl,'libstdc++devel',['4.4.4','13.el6'],'i686')
  call cmp_os_pkg(\@tbl,'libstdc++devel',['4.4.4','13.el6'],'x86_64')
  call cmp_os_pkg(\@tbl,'make',['3.81','19.el6'])
  call cmp_os_pkg(\@tbl,'sysstat',['9.0.4','11.el6'],'x86_64')
 }
 call setHcveResult(cond(scalar(@tbl),join("\012",@tbl),'OL6rpmsOK'))
}]]></sdp_command>
<sdp_description><![CDATA[This rule verifies that the correct versions of the required RPMs are installed on an Oracle Linux 6 system.]]></sdp_description>
<sdp_actions>
<sdp_action condition="=~" minimum="OL5rpmsOK" result="PASSED"><![CDATA[The correct ``binutils``, ``compat_libcap1``, ``compat-libstdc++-33``, ``gcc``, ``gcc-c++``, ``glibc``, ``glibc-devel``, ``ksh``, ``libaio``, ``libaio-devel``, ``libgcc``, ``libstdc++``, ``libstdc++-devel``, ``make``, and ``sysstat`` packages are installed on your Oracle Linux 6 system. No action required.]]></sdp_action>
<sdp_action condition="=~" minimum="NotOL6|NotOracle" result="SKIPPED"><![CDATA[Not applicable on this system]]></sdp_action>
<sdp_action result="FAILED"><![CDATA[You have incorrect versions of ``binutils``, ``compat_libcap1``, ``compat-libstdc++-33``, ``gcc``, ``gcc-c++``, ``glibc``, ``glibc-devel``, ``ksh``, ``libaio``, ``libaio-devel``, ``libgcc``, ``libstdc++``, ``libstdc++-devel``, ``make``, or ``sysstat`` installed on your system. Make sure that the correct versions are installed. For the required versions, see Knowledge Article 169706.1.]]></sdp_action>
</sdp_actions>
</sdp_rule>

<sdp_rule id="A00530" mode="VERIFY" name="RHEL4 RPMs OK?">
<sdp_command type="RDA"><![CDATA[import $OS_BIT,$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 = ()
 if expr('==',$OS_BIT,32)
 {# EL4 - 32 bit
  call cmp_os_pkg(\@tbl,'binutils',['2.15.92.0.2','25'])
  call cmp_os_pkg(\@tbl,'compat-libstdc++-33',['3.2.3','47.3'])
  call cmp_os_pkg(\@tbl,'elfutils-libelf',['0.97.1','5'])
  call cmp_os_pkg(\@tbl,'elfutils-libelf-devel',['0.97.1','5'],'i386')
  call cmp_os_pkg(\@tbl,'gcc',['3.4.6','10'],'i386')
  call cmp_os_pkg(\@tbl,'gcc-c++',['3.4.6','10'],'i386')
  call cmp_os_pkg(\@tbl,'glibc',['2.3.4','2.41'])
  call cmp_os_pkg(\@tbl,'glibc-common',['2.3.4','2.41'])
  call cmp_os_pkg(\@tbl,'glibc-devel',['2.3.4','2.41'],'i386')
  call cmp_os_pkg(\@tbl,'glibc-headers',['2.3.4','2.41'],'i386')
  call cmp_os_pkg(\@tbl,'glibc-kernheaders',['2.4','9.1.103.EL'],'i386')
  call cmp_os_pkg(\@tbl,'libaio',['0.3.105','2'])
  call cmp_os_pkg(\@tbl,'libaio-devel',['0.3.105','2'],'i386')
  call cmp_os_pkg(\@tbl,'libgcc',['3.4.6','10'])
  call cmp_os_pkg(\@tbl,'libstdc++',['3.4.6','10'])
  call cmp_os_pkg(\@tbl,'libstdc++-devel',['3.4.6','10'],'i386')
  call cmp_os_pkg(\@tbl,'make',['3.80','7.EL4'])
  call cmp_os_pkg(\@tbl,'pdksh',['5.2.14','30.6'])
  call cmp_os_pkg(\@tbl,'sysstat',['5.0.5','19.el4'],'i386')
  call cmp_os_pkg(\@tbl,'unixODBC',['2.2.11','1.RHEL4.1'])
  call cmp_os_pkg(\@tbl,'unixODBC-devel',['2.2.11','1.RHEL4.1'],'i386')
 }
 else
 {# EL4 - 64 bit
  call cmp_os_pkg(\@tbl,'binutils',['2.15.92.0.2','25'],'x86_64')
  call cmp_os_pkg(\@tbl,'compat-libstdc++-33',['3.2.3','47.3'],'i386')
  call cmp_os_pkg(\@tbl,'compat-libstdc++-33',['3.2.3','47.3'],'x86_64')
  call cmp_os_pkg(\@tbl,'elfutils-libelf',['0.97.1','5'],'x86_64')
  call cmp_os_pkg(\@tbl,'elfutils-libelf-devel',['0.97.1','5'],'x86_64')
  call cmp_os_pkg(\@tbl,'expat',['1.95.7','4'],'x86_64')
  call cmp_os_pkg(\@tbl,'gcc',['3.4.6','10'],'x86_64')
  call cmp_os_pkg(\@tbl,'gcc-c++',['3.4.6','10'],'x86_64')
  call cmp_os_pkg(\@tbl,'glibc',['2.3.4','2.41'],'i686')
  call cmp_os_pkg(\@tbl,'glibc',['2.3.4','2.41'],'x86_64')
  call cmp_os_pkg(\@tbl,'glibc-common',['2.3.4','2.41'],'x86_64')
  call cmp_os_pkg(\@tbl,'glibc-devel',['2.3.4','2.41'],'x86_64')
  call cmp_os_pkg(\@tbl,'glibc-headers',['2.3.4','2.41'],'x86_64')
  call cmp_os_pkg(\@tbl,'glibc-kernheaders',['2.4','9.1.103.EL'],'x86_64')
  call cmp_os_pkg(\@tbl,'libaio',['0.3.105','2'],'i386')
  call cmp_os_pkg(\@tbl,'libaio',['0.3.105','2'],'x86_64')
  call cmp_os_pkg(\@tbl,'libaio-devel',['0.3.105','2'],'i386')
  call cmp_os_pkg(\@tbl,'libaio-devel',['0.3.105','2'],'x86_64')
  call cmp_os_pkg(\@tbl,'libgcc',['3.4.6','10'],'x86_64')
  call cmp_os_pkg(\@tbl,'libgcc',['3.4.6','10'],'i386')
  call cmp_os_pkg(\@tbl,'libstdc++',['3.4.6','10'],'i386')
  call cmp_os_pkg(\@tbl,'libstdc++',['3.4.6','10'],'x86_64')
  call cmp_os_pkg(\@tbl,'libstdc++-devel',['3.4.6','10'],'x86_64')
  call cmp_os_pkg(\@tbl,'make',['3.80','7.EL4'],'x86_64')
  call cmp_os_pkg(\@tbl,'pdksh',['5.2.14','30.6'],'x86_64')
  call cmp_os_pkg(\@tbl,'sysstat',['5.0.5','19.el4'],'x86_64')
  call cmp_os_pkg(\@tbl,'unixODBC',['2.2.11','1.RHEL4.1'],'x86_64')
  call cmp_os_pkg(\@tbl,'unixODBC',['2.2.11','1.RHEL4.1'],'i386')
  call cmp_os_pkg(\@tbl,'unixODBC-devel',['2.2.11','1.RHEL4.1'],'x86_64')
  call cmp_os_pkg(\@tbl,'unixODBC-devel',['2.2.11','1.RHEL4.1'],'i386')
 }
 call setHcveResult(cond(scalar(@tbl),join("\012",@tbl),'RHEL4rpmsOK'))
}]]></sdp_command>
<sdp_description><![CDATA[This rule verifies that the correct versions of the required RPMs are installed on a Red Hat Enterprise Linux 4 system.]]></sdp_description>
<sdp_actions>
<sdp_action condition="=~" minimum="RHEL4rpmsOK" result="PASSED"><![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.]]></sdp_action>
<sdp_action condition="=~" minimum="NotRHEL4|NotRedHat" result="SKIPPED"><![CDATA[Not applicable on this system]]></sdp_action>
<sdp_action result="FAILED"><![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 Knowledge Article 169706.1.]]></sdp_action>
</sdp_actions>
</sdp_rule>

<sdp_rule id="A00540" mode="VERIFY" name="RHEL5 RPMs OK?">
<sdp_command type="RDA"><![CDATA[import $OS_BIT,$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 = ()
 if expr('==',$OS_BIT,32)
 {# RHEL5.0 32-bit
  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'],'i386')
  call cmp_os_pkg(\@tbl,'elfutils-libelf-devel-static',['0.125','3.el5'],'i386')
  call cmp_os_pkg(\@tbl,'gcc',['4.1.2','42.el5'],'i386')
  call cmp_os_pkg(\@tbl,'gcc-c++',['4.1.2','42.el5'],'i386')
  call cmp_os_pkg(\@tbl,'glibc',['2.5','24'])
  call cmp_os_pkg(\@tbl,'glibc-common',['2.5','12'])
  call cmp_os_pkg(\@tbl,'glibc-devel',['2.5','24'],'i386')
  call cmp_os_pkg(\@tbl,'glibc-headers',['2.5','24'],'i386')
  call cmp_os_pkg(\@tbl,'kernel-headers',['2.6.18','92.el5'],'i386')
  call cmp_os_pkg(\@tbl,'ksh',['20060214','1.7'])
  call cmp_os_pkg(\@tbl,'libaio',['0.3.106'])
  call cmp_os_pkg(\@tbl,'libaio-devel',['0.3.106','3.2'],'i386')
  call cmp_os_pkg(\@tbl,'libgcc',['4.1.2','42.el5'])
  call cmp_os_pkg(\@tbl,'libgomp',['4.1.2','42.el5'],'i386')
  call cmp_os_pkg(\@tbl,'libstdc++',['4.1.2','42'])
  call cmp_os_pkg(\@tbl,'libstdc++-devel',['4.1.2','42.el5'],'i386')
  call cmp_os_pkg(\@tbl,'make',['3.81','1.1'])
  call cmp_os_pkg(\@tbl,'sysstat',['7.0.2','1.el5'],'i386')
  call cmp_os_pkg(\@tbl,'unixODBC',['2.2.11','7.1'],'i386')
  call cmp_os_pkg(\@tbl,'unixODBC-devel',['2.2.11','7.1'],'i386')
 }
 else
 {# RHEL5.0 64-bit
  call cmp_os_pkg(\@tbl,'binutils',['2.17.50.0.6','6.el5'],'x86_64')
  call cmp_os_pkg(\@tbl,'compat-libstdc++-33',['3.2.3','61'],'i386')
  call cmp_os_pkg(\@tbl,'compat-libstdc++-33',['3.2.3','61'],'x86_64')
  call cmp_os_pkg(\@tbl,'elfutils-libelf',['0.125','3.el5'],'x86_64')
  call cmp_os_pkg(\@tbl,'elfutils-libelf-devel',['0.125','3.el5'],'x86_64')
  call cmp_os_pkg(\@tbl,'elfutils-libelf-devel-static',['0.125','3.el5'],\
                  'x86_64')
  call cmp_os_pkg(\@tbl,'gcc',['4.1.2','42.el5'],'x86_64')
  call cmp_os_pkg(\@tbl,'gcc-c++',['4.1.2','42.el5'],'x86_64')
  call cmp_os_pkg(\@tbl,'glibc',['2.5','24'],'i686')
  call cmp_os_pkg(\@tbl,'glibc',['2.5','24'],'x86_64')
  call cmp_os_pkg(\@tbl,'glibc-common',['2.5','24'],'x86_64')
  call cmp_os_pkg(\@tbl,'glibc-devel',['2.5','24'],'i386')
  call cmp_os_pkg(\@tbl,'glibc-headers',['2.5','24'],'x86_64')
  var @tmp = ()
  call cmp_os_pkg(\@tmp,'kernel-uek-headers',['2.6.30'],'x86_64')
  if (@tmp)
  {if match($tmp[0],' not installed$')
    call cmp_os_pkg(\@tbl,'kernel-headers',['2.6.18','92.el5'],'x86_64')
   else
    call push(@tbl,@tmp)
  }
  call cmp_os_pkg(\@tbl,'ksh',['20060214','1.7'],'x86_64')
  call cmp_os_pkg(\@tbl,'libaio',['0.3.106','3.2'],'i386')
  call cmp_os_pkg(\@tbl,'libaio',['0.3.106','3.2'],'x86_64')
  call cmp_os_pkg(\@tbl,'libaio-devel',['0.3.106','3.2'],'i386')
  call cmp_os_pkg(\@tbl,'libaio-devel',['0.3.106','3.2'],'x86_64')
  call cmp_os_pkg(\@tbl,'libgcc',['4.1.2','42.el5'],'i386')
  call cmp_os_pkg(\@tbl,'libgcc',['4.1.2','42.el5'],'x86_64')
  call cmp_os_pkg(\@tbl,'libgomp',['4.1.2','42.el5'],'x86_64')
  call cmp_os_pkg(\@tbl,'libstdc++',['4.1.2','42.el5'],'i386')
  call cmp_os_pkg(\@tbl,'libstdc++',['4.1.2','42.el5'],'x86_64')
  call cmp_os_pkg(\@tbl,'libstdc++-devel',['4.1.2','42.el5'],'x86_64')
  call cmp_os_pkg(\@tbl,'make',['3.81','3.el5'],'x86_64')
  call cmp_os_pkg(\@tbl,'sysstat',['7.0.2','1.el5'],'x86_64')
  call cmp_os_pkg(\@tbl,'unixODBC',['2.2.11','7.1'],'i386')
  call cmp_os_pkg(\@tbl,'unixODBC',['2.2.11','7.1'],'x86_64')
  call cmp_os_pkg(\@tbl,'unixODBC-devel',['2.2.11','7.1'],'i386')
  call cmp_os_pkg(\@tbl,'unixODBC-devel',['2.2.11','7.1'],'x86_64')
 }
 call setHcveResult(cond(scalar(@tbl),join("\012",@tbl),'RHEL5rpmsOK'))
}]]></sdp_command>
<sdp_description><![CDATA[This rule verifies that the correct versions of the required RPMs are installed on a Red Hat Enterprise Linux 5 system.]]></sdp_description>
<sdp_actions>
<sdp_action condition="=~" minimum="RHEL5rpmsOK" result="PASSED"><![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.]]></sdp_action>
<sdp_action condition="=~" minimum="NotRHEL5|NotRedHat" result="SKIPPED"><![CDATA[Not applicable on this system]]></sdp_action>
<sdp_action result="FAILED"><![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 Knowledge Article 169706.1.]]></sdp_action>
</sdp_actions>
</sdp_rule>

<sdp_rule id="A00550" mode="VERIFY" name="RHEL6 RPMs OK?">
<sdp_command type="RDA"><![CDATA[import $OS_BIT,$OS_NAM,$OS_TYP
if !match($OS_TYP,'Red Hat')
 call setHcveResult('NotRedHat')
elsif !match($OS_NAM,'santiago',true)
 call setHcveResult('NotRHEL6')
else
{var @tbl = ()
 if expr('==',$OS_BIT,64)
 {# RHEL6 64-bit
  call cmp_os_pkg(\@tbl,'binutils',['2.20.51.0.2','5.11.el6'],'x86_64')
  call cmp_os_pkg(\@tbl,'compat-libcap1',['1.10','1'],'x86_64')
  call cmp_os_pkg(\@tbl,'compat-libstdc++-33',['3.2.3','69.el6'],'i686')
  call cmp_os_pkg(\@tbl,'compat-libstdc++-33',['3.2.3','69.el6'],'x86_64')
  call cmp_os_pkg(\@tbl,'gcc',['4.4.4','13.el6'],'x86_64')
  call cmp_os_pkg(\@tbl,'gcc-c++',['4.4.4','13.el6'],'x86_64')
  call cmp_os_pkg(\@tbl,'glibc',['2.12','1.7.el6'],'i686')
  call cmp_os_pkg(\@tbl,'glibc',['2.12','1.7.el6'],'x86_64')
  call cmp_os_pkg(\@tbl,'glibc-devel',['2.12','1.7.el6'],'i686')
  call cmp_os_pkg(\@tbl,'glibc-devel',['2.12','1.7.el6'],'x86_64')
  call cmp_os_pkg(\@tbl,'ksh',['20100621','12.el6'],'x86_64')
  call cmp_os_pkg(\@tbl,'libaio',['0.3.107','10.el6'],'i686')
  call cmp_os_pkg(\@tbl,'libaio',['0.3.107','10.el6'],'x86_64')
  call cmp_os_pkg(\@tbl,'libaio-devel',['0.3.107','10.el6'],'i686')
  call cmp_os_pkg(\@tbl,'libaio-devel',['0.3.107','10.el6'],'x86_64')
  call cmp_os_pkg(\@tbl,'libgcc',['4.4.4','13.el6'],'i686')
  call cmp_os_pkg(\@tbl,'libgcc',['4.4.4','13.el6'],'x86_64')
  call cmp_os_pkg(\@tbl,'libstdc++',['4.4.4','13.el6'],'i686')
  call cmp_os_pkg(\@tbl,'libstdc++',['4.4.4','13.el6'],'x86_64')
  call cmp_os_pkg(\@tbl,'libstdc++devel',['4.4.4','13.el6'],'i686')
  call cmp_os_pkg(\@tbl,'libstdc++devel',['4.4.4','13.el6'],'x86_64')
  call cmp_os_pkg(\@tbl,'make',['3.81','19.el6'])
  call cmp_os_pkg(\@tbl,'sysstat',['9.0.4','11.el6'],'x86_64')
 }
 call setHcveResult(cond(scalar(@tbl),join("\012",@tbl),'RHEL6rpmsOK'))
}]]></sdp_command>
<sdp_description><![CDATA[This rule verifies that the correct versions of the required RPMs are installed on an Red Hat Linux 6 system.]]></sdp_description>
<sdp_actions>
<sdp_action condition="=~" minimum="RHEL6rpmsOK" result="PASSED"><![CDATA[The correct ``binutils``, ``compat_libcap1``, ``compat-libstdc++-33``, ``gcc``, ``gcc-c++``, ``glibc``, ``glibc-devel``, ``ksh``, ``libaio``, ``libaio-devel``, ``libgcc``, ``libstdc++``, ``libstdc++-devel``, ``make``, and ``sysstat`` packages are installed on your Red Hat Linux 6 system. No action required.]]></sdp_action>
<sdp_action condition="=~" minimum="NotRHEL6|NotRedHat" result="SKIPPED"><![CDATA[Not applicable on this system]]></sdp_action>
<sdp_action result="FAILED"><![CDATA[You have incorrect versions of ``binutils``, ``compat_libcap1``, ``compat-libstdc++-33``, ``gcc``, ``gcc-c++``, ``glibc``, ``glibc-devel``, ``ksh``, ``libaio``, ``libaio-devel``, ``libgcc``, ``libstdc++``, ``libstdc++-devel``, ``make``, or ``sysstat`` installed on your system. Make sure that the correct versions are installed. For the required versions, see Knowledge Article 169706.1.]]></sdp_action>
</sdp_actions>
</sdp_rule>

<sdp_rule id="A00570" mode="VERIFY" name="SLES10 RPMs OK?">
<sdp_command type="RDA"><![CDATA[import $OS_BIT,$OS_NAM,$OS_TYP
# Check presence of ksh-93<string>-<release> (Example: ksh-93r-12.9)
macro chk_ksh_93
{var (\@tbl,$spc,$ref,$arc) = @arg
 if !chk_os_pkg('ksh',$arc)
  return push(@tbl,concat('[ksh',\
                          cond($arc,concat('(',$arc,')'),''),'] not installed'))
 while get_os_pkg()
 {var ($ver,$rel) = (last)
  var ($sub) = match($ver,'^93(\w+)$')
  if !or(and(compare('eq',$sub,$spc),compare('VALID',version($rel), $ref)),\
         compare('gt',$sub,$spc))
   call push(@tbl,concat('[ksh-',$ver,'-',$rel,\
                         cond($arc,concat('(',$arc,')'),''),'] found'))
 }
}
if !match($OS_TYP,'SuSE')
 call setHcveResult('NotSuSE')
elsif !match($OS_NAM,'SLES-10')
 call setHcveResult('NotSLES10')
else
{var @tbl = ()
 if expr('==',$OS_BIT,32)
 {# SLES10-32bit
  call cmp_os_pkg(\@tbl,'binutils','2.16.91.0.5')
  call cmp_os_pkg(\@tbl,'compat-libstdc++','5.0.7')
  call cmp_os_pkg(\@tbl,'cvuqdisk',['1.0.2','1'])
  call cmp_os_pkg(\@tbl,'gcc','4.1.2')
  call cmp_os_pkg(\@tbl,'gcc-c++','4.1.2')
  call cmp_os_pkg(\@tbl,'glibc',['2.5','24'])
  call cmp_os_pkg(\@tbl,'glibc-devel','2.4')
  call chk_ksh_93(\@tbl,'r','12.9')
  call cmp_os_pkg(\@tbl,'libaio','0.3.104')
  call cmp_os_pkg(\@tbl,'libaio-devel','0.3.104')
  call cmp_os_pkg(\@tbl,'libelf','0.8.5')
  call cmp_os_pkg(\@tbl,'libgcc','4.1.2')
  call cmp_os_pkg(\@tbl,'libmudflap','4.1.2.0.21')
  call cmp_os_pkg(\@tbl,'libstdc++','4.1.2')
  call cmp_os_pkg(\@tbl,'libstdc++-devel','4.1.2')
  call cmp_os_pkg(\@tbl,'make','3.80')
  call cmp_os_pkg(\@tbl,'sysstat','8.0.4')
  call cmp_os_pkg(\@tbl,'unixODBC','2.2.11')
  call cmp_os_pkg(\@tbl,'unixODBC-devel','2.2.11') 
 }
 else
 {# SLES10-64bit
  call cmp_os_pkg(\@tbl,'binutils',['2.16.91.0.5','23.31'],'x86_64')
  call cmp_os_pkg(\@tbl,'compat-libstdc++',['5.0.7','22.2'],'x86_64')
  call cmp_os_pkg(\@tbl,'gcc','4.1.2.0.21','x86_64')
  call cmp_os_pkg(\@tbl,'gcc-c++','4.1.2.0.21','x86_64')
  call cmp_os_pkg(\@tbl,'glibc-devel',['2.4','31.54'],'x86_64')
  call cmp_os_pkg(\@tbl,'glibc-devel-32bit',['2.4','31.54'],'x86_64')
  call cmp_os_pkg(\@tbl,'libaio',['0.3.104','14.2'],'x86_64')
  call cmp_os_pkg(\@tbl,'libaio-32bit',['0.3.104','14.2'],'x86_64')
  call cmp_os_pkg(\@tbl,'libaio-devel','0.3.104.0.21','x86_64')
  call cmp_os_pkg(\@tbl,'libaio-devel-32bit','0.3.104.0.21','x86_64')
  call cmp_os_pkg(\@tbl,'libelf',['0.8.5','47.2'],'x86_64')
  call cmp_os_pkg(\@tbl,'libgcc','4.1.2.0.21','x86_64')
  call cmp_os_pkg(\@tbl,'libmudflap','4.1.2.0.21','x86_64')
  call cmp_os_pkg(\@tbl,'libstdc++','4.1.2.0.21','x86_64')
  call cmp_os_pkg(\@tbl,'libstdc++-devel','4.1.2.0.21','x86_64')
  call cmp_os_pkg(\@tbl,'make',['3.80','202.2'],'x86_64')
  call cmp_os_pkg(\@tbl,'sysstat',['8.0.4'],'x86_64')
  call cmp_os_pkg(\@tbl,'unixODBC',['2.2.11'],'x86_64')
  call cmp_os_pkg(\@tbl,'unixODBC-devel',['2.2.11'],'x86_64') 
  if chk_os_pkg('glibc','x86_64')
  {while get_os_pkg()
   {var ($ver,$rel) = (last)
    var $ver2 = version($ver,$rel)
    if compare('OLDER',$ver2,version('2.4','31.54'))
     push(@tbl,concat('[glibc ',$ver,'-',$rel,'] found'))
    elsif and(not(compare('NEWER',$ver2,version('2.5','23'))),\
              compare('VALID',$ver2,version('2.5','18')))
      push(@tbl,concat('[glibc ',$ver,'-',$rel,'] found'))
   }
  }
  else
   var @tbl = push(@tbl,'[glibc(x86_64)] not installed')
 }

 # Set the HCVE result 
 call setHcveResult(cond(scalar(@tbl),join("\012",@tbl),'SLES10rpmsOK'))
}]]></sdp_command>
<sdp_description><![CDATA[This rule verifies that the correct versions of the required RPMs are installed on a SuSE Linux Enterprise Server 10 system.]]></sdp_description>
<sdp_actions>
<sdp_action condition="=~" minimum="SLES10rpmsOK" result="PASSED"><![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 Linux Enterprise Server 10 system. No action required.]]></sdp_action>
<sdp_action condition="=~" minimum="NotSLES10|NotSuSE" result="SKIPPED"><![CDATA[Not applicable on this system]]></sdp_action>
<sdp_action result="FAILED"><![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 Linux Enterprise Server 10 system. Make sure that the correct versions are installed. For information about the correct version, see Knowledge Article 169706.1.]]></sdp_action>
</sdp_actions>
</sdp_rule>

<sdp_rule id="A00580" mode="VERIFY" name="SLES11 RPMs OK?">
<sdp_command type="RDA"><![CDATA[import $OS_BIT,$OS_NAM,$OS_TYP
# Check presence of ksh-93<string>-<release> (Example: ksh-93r-12.9)
macro chk_ksh_93
{var (\@tbl,$spc,$ref,$arc) = @arg
 if !chk_os_pkg('ksh',$arc)
  return push(@tbl,concat('[ksh',\
                          cond($arc,concat('(',$arc,')'),''),'] not installed'))
 while get_os_pkg()
 {var ($ver,$rel) = (last)
  var ($sub) = match($ver,'^93(\w+)$')
  if !or(and(compare('eq',$sub,$spc),compare('VALID',version($rel), $ref)),\
         compare('gt',$sub,$spc))
   call push(@tbl,concat('[ksh-',$ver,'-',$rel,\
                         cond($arc,concat('(',$arc,')'),''),'] found'))
 }
}
if !match($OS_TYP,'SuSE')
 call setHcveResult('NotSuSE')
elsif !match($OS_NAM,'SLES-11')
 call setHcveResult('NotSLES11')
else
{var @tbl = ()
 if expr('==',$OS_BIT,32)
 {# SLES11 32 bit
  call cmp_os_pkg(\@tbl,'binutils',['2.19','11.28'])
  call cmp_os_pkg(\@tbl,'gcc',['4.3','62.198'],'i586')
  call cmp_os_pkg(\@tbl,'gcc43','4.3.3.11.18','i586')
  call cmp_os_pkg(\@tbl,'gcc-c++',['4.3','62.198'],'i586')
  call cmp_os_pkg(\@tbl,'gcc43-c++','4.3.3.11.18','i586')
  call cmp_os_pkg(\@tbl,'glibc',['2.9','13.2'])
  call cmp_os_pkg(\@tbl,'glibc-devel',['2.9','13.2'],'i586')
  call chk_ksh_93(\@tbl,'t','9.4')
  call cmp_os_pkg(\@tbl,'libaio',['0.3.104','140.22'])
  call cmp_os_pkg(\@tbl,'libaio-devel',['0.3.104','140.22'],'i586')
  call cmp_os_pkg(\@tbl,'libgcc43','4.3.3.11.18')
  call cmp_os_pkg(\@tbl,'libstdc++-devel',['4.3','62.198'],'i586')
  call cmp_os_pkg(\@tbl,'libstdc++33',['3.3.3','11.9'])
  call cmp_os_pkg(\@tbl,'libstdc++43','4.3.3.11.18')
  call cmp_os_pkg(\@tbl,'libstdc++43-devel','4.3.3.11.18','i586')
  call cmp_os_pkg(\@tbl,'linux-kernel-headers',['2.6.27','2.22'],'noarch')
  call cmp_os_pkg(\@tbl,'make',['3.81','128.20'])
  call cmp_os_pkg(\@tbl,'sysstat',['8.1.5','7.8'],'i586')
 }
 else
 {# SLES 11 64 bit
  call cmp_os_pkg(\@tbl,'binutils',['2.19','11.28'],'x86_64')
  call cmp_os_pkg(\@tbl,'gcc',['4.3','62.198'],'x86_64')
  call cmp_os_pkg(\@tbl,'gcc-32bit',['4.3','62.198'],'x86_64')
  call cmp_os_pkg(\@tbl,'gcc-c++',['4.3','62.198'],'x86_64')
  call cmp_os_pkg(\@tbl,'gcc43',['4.3.3','11.18'],'x86_64')
  call cmp_os_pkg(\@tbl,'gcc43-32bit',['4.3.3','11.18'],'x86_64')
  call cmp_os_pkg(\@tbl,'gcc43-c++',['4.3.3','11.18'],'x86_64')
  call cmp_os_pkg(\@tbl,'glibc',['2.9','13.2'],'x86_64')
  call cmp_os_pkg(\@tbl,'glibc-32bit',['2.9','13.2'],'x86_64')
  call cmp_os_pkg(\@tbl,'glibc-devel',['2.9','13.2'],'x86_64')
  call cmp_os_pkg(\@tbl,'glibc-devel-32bit',['2.9','13.2'],'x86_64')
  call chk_ksh_93(\@tbl,'t','9.4','x86_64')
  call cmp_os_pkg(\@tbl,'libaio',['0.3.104','140.22'],'x86_64')
  call cmp_os_pkg(\@tbl,'libaio-32bit',['0.3.104','140.22'],'x86_64')
  call cmp_os_pkg(\@tbl,'libaio-devel',['0.3.104','140.22'],'x86_64')
  call cmp_os_pkg(\@tbl,'libaio-devel-32bit',['0.3.104','140.22'],'x86_64')
  call cmp_os_pkg(\@tbl,'libgcc43',['4.3.3','11.18'],'x86_64')
  call cmp_os_pkg(\@tbl,'libgomp43-32bit',['4.3.3','11.18'],'x86_64')
  call cmp_os_pkg(\@tbl,'libstdc++-devel',['4.3','62.198'],'x86_64')
  call cmp_os_pkg(\@tbl,'libstdc++33',['3.3.3','11.9'],'x86_64')
  call cmp_os_pkg(\@tbl,'libstdc++33-32bit',['3.3.3','11.9'],'x86_64')
  call cmp_os_pkg(\@tbl,'libstdc++43',['4.3.3','11.18'],'x86_64')
  call cmp_os_pkg(\@tbl,'libstdc++43-32bit',['4.3.3','11.18'],'x86_64')
  call cmp_os_pkg(\@tbl,'libstdc++43-devel',['4.3.3','11.18'],'x86_64')
  call cmp_os_pkg(\@tbl,'libstdc++43-devel-32bit',['4.3.3','11.18'],\
   'x86_64')
  call cmp_os_pkg(\@tbl,'linux-kernel-headers',['2.6.27','2.22'],'noarch')
  call cmp_os_pkg(\@tbl,'make',['3.81','128.20'],'x86_64')
  call cmp_os_pkg(\@tbl,'sysstat',['8.1.5','7.8'],'x86_64')
 }
 call setHcveResult(cond(scalar(@tbl),join("\012",@tbl),'SLES11rpmsOK'))
}]]></sdp_command>
<sdp_description><![CDATA[This rule verifies that the correct versions of the required RPMs are installed on a SuSE Linux Enterprise Server 11 system.]]></sdp_description>
<sdp_actions>
<sdp_action condition="=~" minimum="SLES11rpmsOK" result="PASSED"><![CDATA[The correct ``binutils``, ``gcc``, ``gcc-c++``, ``gcc43``, ``gcc43``, ``gcc43-c++``, ``gcc43-c++``, ``glibc``, ``glibc-devel``, ``ksh``, ``libaio``, ``libaio-devel``, ``libgcc43``, ``libstdc++-devel``, ``libstdc++33``, ``libstdc++43``, ``libstdc++43-devel``, ``linux-kernel-headers``, ``linux-kernel-headers``, ``make``, and ``sysstat`` packages are installed on your SuSE Linux Enterprise Server 11 system. No action required.]]></sdp_action>
<sdp_action condition="=~" minimum="NotSLES11|NotSuSE" result="SKIPPED"><![CDATA[Not applicable on this system]]></sdp_action>
<sdp_action result="FAILED"><![CDATA[You have incorrect versions of ``binutils``, ``gcc``, ``gcc-c++``, ``gcc43``, ``gcc43``, ``gcc43-c++``, ``gcc43-c++``, ``glibc``, ``glibc-devel``, ``ksh``, ``libaio``, ``libaio-devel``, ``libgcc43``, ``libstdc++-devel``, ``libstdc++33``, ``libstdc++43``, ``libstdc++43-devel``, ``linux-kernel-headers``, ``linux-kernel-headers``, ``make``, ``and sysstat packages installed on your SuSE Linux Enterprise Server 11 system. Make sure that the correct versions are installed. For information about the correct version, see Knowledge Article 169706.1.]]></sdp_action>
</sdp_actions>
</sdp_rule>
</sdp_group>
</sdp_content>
</sdp_diaglet>
