Linux distributions
TMA-SLES16-1.2.1.5
Ensure weak dependencies are configured
Описание
The RPM packaging specification allows for 3 levels of dependencies to be declared: • hard dependencies (Requires / Provides) for packages which must be installed for a minimal installation of the application to function • weak dependencies (Recommends / Supplements) for packages which provide additional features, but which are not required for a minimal installation to function • hints (Suggests / Enhances) for packages which offer add-ons which might be useful.
Как проверяется
Метод проверки: Команда оболочки
alt0() { command -v grep >/dev/null 2>&1 || { echo "step1: grep not installed"; return 1; }; o=$(bash -c 'grep -Pi -- '"'"'^\h*solver.onlyRequires\h*=\h*true\b'"'"' /etc/zypp/zypp.conf' 2>&1); printf '%s\n' "$o" | tr -s ' \t' ' ' | sed 's/^ //;s/ $//' | grep -Fxq -- 'solver.onlyRequires = true' || { echo step1: missing 'solver.onlyRequires = true'; return 1; }; }; if alt0; then echo compliant; fi- Ожидаемый вывод
compliant
Как исправляется
Метод исправления: Рекомендация или патч инфраструктуры
Edit /etc/zypp/zypp.conf and set solver.onlyRequires = true. Example script: #!/usr/bin/env bash { if grep -Pq '^solver.onlyRequires' /etc/zypp/zypp.conf; then sed -i 's/^solver.onlyRequires\s*=\s*.*/solver.onlyRequires = true/' /etc/zypp/zypp.conf else printf '%s\n' "" "solver.onlyRequires = true" >> /etc/zypp/zypp.conf fi }
Свойства
- Операционные системы
- sles-16
- Теги
- cis-convertedlinux
- Источник
- CIS SUSE Linux Enterprise 16 Benchmark v1.0.0 - 1.2.1.5
Проверить этот хост
Выполните команду на компьютере, аудит которого вам разрешён. Сканирование работает только на чтение.
tmaegis scan --target linux --level 2