Refactor permission-hardener

- Organize comments from default configuration;
- Apply and undo changes from a single file controlled by parameters;
- Arrays should be evaluated as arrays and not normal variables;
- Quote variables;
- Brackets around variables;
- Standardize test cases to "test" command;
- Test against empty or non-empty variables with "-z" and "-n";
- Show a usage message when necessary;
- Require root to run the script with informative message;
- Permit the user to see the help message without running as root;
- Do not create root directories without passing root check;
- Use long options for "set" command;
This commit is contained in:
Ben Grande 2024-01-02 12:17:16 +01:00
parent e15596e7af
commit f138cf0f78
No known key found for this signature in database
GPG key ID: 00C64E14F51F9E56
3 changed files with 615 additions and 595 deletions

File diff suppressed because it is too large Load diff