Skip to content

Fix find to work with xargs -0 - #15106

Open
alanmcanonical wants to merge 2 commits into
ComplianceAsCode:masterfrom
alanmcanonical:wireless_fix
Open

Fix find to work with xargs -0#15106
alanmcanonical wants to merge 2 commits into
ComplianceAsCode:masterfrom
alanmcanonical:wireless_fix

Conversation

@alanmcanonical

@alanmcanonical alanmcanonical commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Description:

  • Fix find to work with xargs -0
  • Follow symlink in ansible

Rationale:

  • The bash remediation mis-parses the interface list when more than one wireless interface is present, because it pipes newline-separated find output into xargs -0.
  • The paths defined there are symlinks

Signed-off-by: Alan Moore <alan.moore@canonical.com>
@openshift-ci

openshift-ci Bot commented Sep 9, 2026

Copy link
Copy Markdown

Hi @alanmcanonical. Thanks for your PR.

I'm waiting for a ComplianceAsCode member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Tip

We noticed you've done this a few times! Consider joining the org to skip this step and gain /lgtm and other bot rights. We recommend asking approvers on your previous PRs to sponsor you.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@openshift-ci openshift-ci Bot added the needs-ok-to-test Used by openshift-ci bot. label Sep 9, 2026
Signed-off-by: Alan Moore <alan.moore@canonical.com>
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

This datastream diff is auto generated by the check Compare DS/Generate Diff

Click here to see the full diff
bash remediation for rule 'xccdf_org.ssgproject.content_rule_wireless_disable_interfaces' differs.
--- xccdf_org.ssgproject.content_rule_wireless_disable_interfaces
+++ xccdf_org.ssgproject.content_rule_wireless_disable_interfaces
@@ -11,7 +11,7 @@
 
 if command -v wicked >/dev/null 2>&1 && systemctl is-active wickedd >/dev/null 2>&1; then
   if [ -n "$(find /sys/class/net/*/ -type d -name wireless)" ]; then
-    interfaces=$(find /sys/class/net/*/wireless -type d -name wireless | xargs -0 dirname | xargs basename)
+    interfaces=$(find /sys/class/net/*/wireless -type d -name wireless -print0 | xargs -0 dirname | xargs basename)
     for iface in $interfaces; do
       wicked ifdown $iface
       sed -i 's/STARTMODE=.*/STARTMODE=off/' /etc/sysconfig/network/ifcfg-$iface

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ok-to-test Used by openshift-ci bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant