Linux distributions
TMA-SLES16-1.2.1.5
Ensure weak dependencies are configured
Descripción
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.
Cómo se verifica
Método de auditoría: Comando de shell
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- Salida esperada
compliant
Cómo se corrige
Método de corrección: Guía o parche de infraestructura
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 }
Propiedades
- Sistemas operativos
- sles-16
- Etiquetas
- cis-convertedlinux
- Referencia
- CIS SUSE Linux Enterprise 16 Benchmark v1.0.0 - 1.2.1.5
Verificar este host
Ejecute esto en un equipo que tenga permiso para auditar. El escaneo es de solo lectura.
tmaegis scan --target linux --level 2