Skip to content

fix(sensors): add error message when tamper protection blocks uninstall#492

Merged
carlosmmatos merged 2 commits intomainfrom
tamper-protection-debug
Mar 16, 2026
Merged

fix(sensors): add error message when tamper protection blocks uninstall#492
carlosmmatos merged 2 commits intomainfrom
tamper-protection-debug

Conversation

@carlosmmatos
Copy link
Copy Markdown
Contributor

When a Linux host has tamper protection enabled and no maintenance token is provided, falcon-linux-uninstall.sh and falcon-linux-migrate.sh exit with the package manager's error code but print no error message. The user sees Removing Falcon Sensor ... and then silence with a non-zero exit, with no indication that tamper protection is the cause.

This wraps the remove_package call in cs_sensor_remove() with set +e/set -e to capture the exit code, then calls die() with an actionable message pointing users to FALCON_MAINTENANCE_TOKEN or API credentials. This brings the Linux scripts to parity with the Windows uninstall script which already handles this case.

Also fixes a pre-existing shfmt redirect spacing issue in falcon-linux-migrate.sh.

Closes #491

When tamper protection is enabled and no maintenance token is provided,
the uninstall silently exits with the package manager's error code.
Capture the exit code and surface an actionable error message pointing
users to FALCON_MAINTENANCE_TOKEN or API credentials.

Closes #491
@carlosmmatos carlosmmatos requested a review from a team as a code owner March 16, 2026 20:55
@carlosmmatos carlosmmatos merged commit 37ce036 into main Mar 16, 2026
7 checks passed
@carlosmmatos carlosmmatos deleted the tamper-protection-debug branch March 16, 2026 21:03
@carlosmmatos carlosmmatos mentioned this pull request Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Linux uninstall scripts produce no error message when tamper protection blocks removal

2 participants