# Verify auditctl --help error - DIFF_0096 FROM openanolis/anolisos:8.8 AS anolis RUN yum install -y audit -q 2>/dev/null || true RUN { \ echo "=== Anolis OS 8.8 auditctl Help Test ==="; \ echo ""; \ echo "1. auditctl version:"; \ auditctl --version 2>&1 || echo "Cannot get version"; \ echo ""; \ echo "2. Test auditctl --help:"; \ echo " Command: auditctl --help 2>&1 | head -5"; \ auditctl --help 2>&1 | head -5 || echo " Command failed"; \ echo ""; \ echo "3. Test auditctl -h:"; \ echo " Command: auditctl -h 2>&1 | head -5"; \ auditctl -h 2>&1 | head -5 || echo " Command failed"; \ echo ""; \ echo "4. Check error message:"; \ if auditctl --help 2>&1 | grep -q "invalid"; then \ echo " --help option is invalid (as reported)"; \ else \ echo " --help option works normally"; \ fi; \ } > /anolis_result.txt FROM centos:8 AS centos RUN cd /etc/yum.repos.d/ && \ sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* && \ sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* RUN yum install -y audit -q 2>/dev/null || true RUN { \ echo "=== CentOS 8 auditctl Help Test ==="; \ echo ""; \ echo "1. auditctl version:"; \ auditctl --version 2>&1 || echo "Cannot get version"; \ echo ""; \ echo "2. Test auditctl --help:"; \ echo " Command: auditctl --help 2>&1 | head -5"; \ auditctl --help 2>&1 | head -5 || echo " Command failed"; \ echo ""; \ echo "3. Test auditctl -h:"; \ echo " Command: auditctl -h 2>&1 | head -5"; \ auditctl -h 2>&1 | head -5 || echo " Command failed"; \ echo ""; \ echo "4. Check error message:"; \ if auditctl --help 2>&1 | grep -q "invalid"; then \ echo " --help option is invalid"; \ else \ echo " --help option works normally"; \ fi; \ } > /centos_result.txt FROM alpine:latest COPY --from=anolis /anolis_result.txt /tmp/ COPY --from=centos /centos_result.txt /tmp/ RUN apk add --no-cache bash CMD /bin/bash -c 'echo "===== auditctl --help Error Verification (DIFF_0096) ====="; echo ""; echo "********** Anolis OS 8.8 Output **********"; cat /tmp/anolis_result.txt; echo ""; echo "********** CentOS 8 Output **********"; cat /tmp/centos_result.txt; echo ""; echo "===== Difference Analysis ====="; anolis_invalid=$(grep -c "invalid" /tmp/anolis_result.txt); centos_invalid=$(grep -c "invalid" /tmp/centos_result.txt); anolis_works=$(grep -c "works normally" /tmp/anolis_result.txt); centos_works=$(grep -c "works normally" /tmp/centos_result.txt); echo "auditctl --help status:"; echo " AnolisOS8: Invalid=$anolis_invalid, Works=$anolis_works"; echo " CentOS8: Invalid=$centos_invalid, Works=$centos_works"; echo ""; echo "===== Conclusion ====="; if [ "$anolis_invalid" -gt 0 ] && [ "$centos_invalid" -eq 0 ]; then echo "❌ Compatibility issue: auditctl --help reports invalid option on AnolisOS8"; echo " Impact: Users cannot get help information using --help flag"; echo " This is a bug in the audit package"; elif [ "$anolis_works" -eq 0 ] && [ "$centos_works" -eq 1 ]; then echo "⚠️ Help option behavior different: --help not working on AnolisOS8"; echo " Impact: Help documentation inaccessible via standard --help flag"; else echo "✓ Help option behavior consistent"; fi'