Documentation
¶
Overview ¶
============================================================================= NFTBan v1.73 - Installer Post-Install Assertions ============================================================================= SPDX-License-Identifier: MPL-2.0 meta:name="installer-validate-assertions" meta:type="lib" meta:owner="Antonios Voulvoulis <contact@nftban.com>" meta:created_date="2026-04-04" meta:description="Post-install kernel + service + state assertions" meta:inventory.files="internal/installer/validate/assertions.go" meta:inventory.binaries="" meta:inventory.env_vars="" meta:inventory.config_files="" meta:inventory.systemd_units="" meta:inventory.network="" meta:inventory.privileges="root" =============================================================================
============================================================================= NFTBan v1.73 - Installer Authority File Write ============================================================================= SPDX-License-Identifier: MPL-2.0 meta:name="installer-validate-authority" meta:type="lib" meta:owner="Antonios Voulvoulis <contact@nftban.com>" meta:created_date="2026-04-04" meta:description="Write /var/lib/nftban/state/authority and .firewall_authority" meta:inventory.files="internal/installer/validate/authority.go" meta:inventory.binaries="" meta:inventory.env_vars="" meta:inventory.config_files="" meta:inventory.systemd_units="" meta:inventory.network="" meta:inventory.privileges="root" =============================================================================
Index ¶
- func AllPassed(results []AssertionResult) bool
- func FailedNames(results []AssertionResult) []string
- func RunPermissionsEnforce(exec executor.Executor, log *logging.Logger)
- func SetImmutableFlags(exec executor.Executor, log *logging.Logger)
- func WriteAuthorityFiles(exec executor.Executor, decision authority.Decision, log *logging.Logger)
- type AssertionResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllPassed ¶
func AllPassed(results []AssertionResult) bool
AllPassed returns true if all assertions passed.
func FailedNames ¶
func FailedNames(results []AssertionResult) []string
FailedNames returns the names of all failed assertions.
func RunPermissionsEnforce ¶ added in v1.76.0
RunPermissionsEnforce calls `nftban permissions enforce` for full FHS fix (G10 parity).
func SetImmutableFlags ¶ added in v1.76.0
SetImmutableFlags sets chattr +i on security-critical files (G8 parity). Shell postinst set immutable on nftban.conf and nft_schema.sh to prevent accidental or malicious modification.
func WriteAuthorityFiles ¶
WriteAuthorityFiles records the authority decision to state files. Two locations for compatibility:
- /var/lib/nftban/state/authority (primary, read by Go daemon)
- /etc/nftban/.firewall_authority (legacy, read by CLI scripts)
Types ¶
type AssertionResult ¶
AssertionResult holds the outcome of a single assertion.
func RunAssertions ¶
RunAssertions performs all post-install assertions and returns the results. None of these are individually fatal — the caller decides based on the aggregate.