Skip to content
This repository has been archived by the owner on Sep 12, 2024. It is now read-only.

OSShortName for Oracle Linux #794

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ nxOMSGenerateInventoryMof:

nxOMSPlugin:
rm -rf output/staging; \
VERSION="3.57"; \
VERSION="3.58"; \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seth Rait just made changes to nxOMSPlugin and version is bumped to 3.58. Please work with him to ensure smooth rollout of combined changes

PROVIDERS="nxOMSPlugin"; \
STAGINGDIR="output/staging/$@/DSCResources"; \
cat Providers/Modules/$@.psd1 | sed "s@<MODULE_VERSION>@$${VERSION}@" > intermediate/Modules/$@.psd1; \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,14 @@ def getHostOSDetails()
def getOSShortName(os_short_name = nil, os_version=nil)
version = ""
hostOSDetailsMap = getHostOSDetails()
#os short name is not proper for oracle linux at /etc/opt/microsoft/scx/conf/scx-release. this is to return proper short name till scx fixes the issue.
if hostOSDetailsMap.key?("OSFullName") && hostOSDetailsMap.key?("OSShortName")
osFullName = hostOSDetailsMap["OSFullName"]
osShortName = hostOSDetailsMap["OSShortName"]
if osFullName.downcase.include?("oracle") && ! osShortName.downcase.include?("oracle")
os_short_name = "Oracle"
end
end

# match string of the form (1 or more non . chars)- followed by a . - (1 or more non . chars) - followed by anything
if hostOSDetailsMap.key?("OSShortName")
Expand Down Expand Up @@ -104,6 +112,8 @@ def getOSShortName(os_short_name = nil, os_version=nil)
else
version = @default_version
end
when "Oracle"
version = "6.0"
when "SUSE"
if @os_major_version == "11"
version = "11.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -556,8 +556,8 @@
remediation="Add a boot loader password to the file '/boot/grub/grub.cfg'"
ruleId="8a4f5ce8-41c4-710c-631e-fbc36a2fa53e">
<check distro="*" command="CheckMatchingLinesIfExists" regex="^password\s+--encrypted\s+\S+" path="/boot/grub/grub.conf"/>
<check distro="*" command="CheckMatchingLinesIfExists" regex="^password\s+--encrypted\s+\S+" path="/boot/grub/grub.cfg"/>
<check distro="*" command="CheckMatchingLinesIfExists" regex="^password\s+--encrypted\s+\S+" path="/boot/grub2/grub.cfg"/>
<check distro="*" command="CheckMatchingLinesIfExists" regex="^[\s]*password(?:(?:_pbkdf2\s+\S+)|(?:\s+--encrypted))\s+\S+" path="/boot/grub/grub.cfg"/>
<check distro="*" command="CheckMatchingLinesIfExists" regex="^[\s]*password(?:(?:_pbkdf2\s+\S+)|(?:\s+--encrypted))\s+\S+" path="/boot/grub2/grub.cfg"/>
</audit>
<audit
description="Ensure permissions on bootloader config are configured"
Expand Down Expand Up @@ -1206,7 +1206,7 @@
impact="An attacker could use this system to send emails with malicious content to other users"
remediation="Add the line 'inet_interfaces localhost' to the file '/etc/postfix/main.cf'"
ruleId="d0cc4e35-70a1-4ee5-b572-3b969201562e">
<check distro="*" command="CheckMatchingLinesIfExists" regex="^[\s\t]*inet_interfaces\s+localhost\s*$" path="/etc/postfix/main.cf" />
<check distro="*" command="CheckMatchingLinesIfExists" regex="^[\s\t]*inet_interfaces\s*=\s*localhost\s*$" path="/etc/postfix/main.cf" />
</audit>
<audit
description="The ldap service should be disabled."
Expand Down
Binary file not shown.
Binary file modified Providers/Modules/Plugins_x64/SecurityBaseline/plugin/omsremediate
100644 → 100755
Binary file not shown.
Binary file modified Providers/Modules/Plugins_x86/SecurityBaseline/plugin/omsbaseline
100644 → 100755
Binary file not shown.
Empty file.
6 changes: 3 additions & 3 deletions installbuilder/datafiles/Base_DSC.data
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ SHLIB_EXT: 'so'
/opt/microsoft/omsconfig/module_packages/nxOMSContainers_1.0.zip; release/nxOMSContainers_1.0.zip; 755; ${{RUN_AS_USER}}; root
/opt/microsoft/omsconfig/module_packages/nxOMSCustomLog_1.0.zip; release/nxOMSCustomLog_1.0.zip; 755; ${{RUN_AS_USER}}; root
/opt/microsoft/omsconfig/module_packages/nxOMSGenerateInventoryMof_1.5.zip; release/nxOMSGenerateInventoryMof_1.5.zip; 755; ${{RUN_AS_USER}}; root
/opt/microsoft/omsconfig/module_packages/nxOMSPlugin_3.57.zip; release/nxOMSPlugin_3.57.zip; 755; ${{RUN_AS_USER}}; root
/opt/microsoft/omsconfig/module_packages/nxOMSPlugin_3.58.zip; release/nxOMSPlugin_3.58.zip; 755; ${{RUN_AS_USER}}; root
/opt/microsoft/omsconfig/module_packages/nxOMSWLI_1.46.zip; release/nxOMSWLI_1.46.zip; 755; ${{RUN_AS_USER}}; root
#endif

Expand Down Expand Up @@ -379,7 +379,7 @@ if [ "$pythonVersion" = "python3" ]; then
su - omsagent -c "/opt/microsoft/omsconfig/Scripts/python3/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSContainers_1.0.zip 0"
su - omsagent -c "/opt/microsoft/omsconfig/Scripts/python3/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSCustomLog_1.0.zip 0"
su - omsagent -c "/opt/microsoft/omsconfig/Scripts/python3/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSGenerateInventoryMof_1.5.zip 0"
su - omsagent -c "/opt/microsoft/omsconfig/Scripts/python3/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSPlugin_3.57.zip 0"
su - omsagent -c "/opt/microsoft/omsconfig/Scripts/python3/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSPlugin_3.58.zip 0"
su - omsagent -c "/opt/microsoft/omsconfig/Scripts/python3/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSWLI_1.46.zip 0"
else
echo "Running python2 python version is ", $pythonVersion
Expand All @@ -389,7 +389,7 @@ else
su - omsagent -c "/opt/microsoft/omsconfig/Scripts/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSContainers_1.0.zip 0"
su - omsagent -c "/opt/microsoft/omsconfig/Scripts/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSCustomLog_1.0.zip 0"
su - omsagent -c "/opt/microsoft/omsconfig/Scripts/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSGenerateInventoryMof_1.5.zip 0"
su - omsagent -c "/opt/microsoft/omsconfig/Scripts/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSPlugin_3.57.zip 0"
su - omsagent -c "/opt/microsoft/omsconfig/Scripts/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSPlugin_3.58.zip 0"
su - omsagent -c "/opt/microsoft/omsconfig/Scripts/InstallModule.py /opt/microsoft/omsconfig/module_packages/nxOMSWLI_1.46.zip 0"
#endif

Expand Down