Skip to content

fix: harden-flatpak: add "or" logic to grep search for compatibility with set -e check#921

Merged
RoyalOughtness merged 3 commits intosecureblue:livefrom
spaceoden:ortrue
Mar 15, 2025
Merged

fix: harden-flatpak: add "or" logic to grep search for compatibility with set -e check#921
RoyalOughtness merged 3 commits intosecureblue:livefrom
spaceoden:ortrue

Conversation

@spaceoden
Copy link
Copy Markdown
Collaborator

@spaceoden spaceoden commented Mar 10, 2025

without this, the compound command containing the grep search would report an error when it finds no matches on x86_64-v1 hardware.

Details:
On x86_64-v1 hardware, ld-linux-x86-64.so.2 doesn't contain the string (supported, searched). The harden-flatpak code already factors for that: the uarches and bestuarch variables will be empty on x86_64-v1 hardware, and the if [ -z "$bestuarch" ] test will pass, running the non-hwcap hardening.

Without this PR, grep reports an error (on x86_64-v1 hardware). If set -e is used on the code (prior to this PR), the grep error will kill this code, preempting the execution of the hardening (on x86_64-v1 hardware).

…lity with set -e check

without this, the command would report an error when it finds no matches on x86_64-v1 hardware.
@spaceoden spaceoden changed the title fix: harden-flatpak: add "or true" logic to grep search for compatibility with set -e check fix: harden-flatpak: add "or" logic to grep search for compatibility with set -e check Mar 13, 2025
@RoyalOughtness RoyalOughtness enabled auto-merge (squash) March 15, 2025 23:27
@RoyalOughtness RoyalOughtness merged commit c624595 into secureblue:live Mar 15, 2025
8 checks passed
@spaceoden spaceoden deleted the ortrue branch March 16, 2025 00:03
RoyalOughtness pushed a commit to RoyalOughtness/secureblue-dev that referenced this pull request Aug 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants