diff options
author | Kelvin M. Klann <kmk3.code@protonmail.com> | 2023-05-11 18:51:02 -0300 |
---|---|---|
committer | Kelvin M. Klann <kmk3.code@protonmail.com> | 2023-05-14 16:52:49 -0300 |
commit | 15ad8696c7cf95059f163b4f7ed86ca697e8fe1e (patch) | |
tree | 7d61eb67b0ee8118d653917fb50f446d8e6c4f9d /src/fseccomp/main.c | |
parent | Standardize usage string var declarations (diff) | |
download | firejail-15ad8696c7cf95059f163b4f7ed86ca697e8fe1e.tar.gz firejail-15ad8696c7cf95059f163b4f7ed86ca697e8fe1e.tar.zst firejail-15ad8696c7cf95059f163b4f7ed86ca697e8fe1e.zip |
Move usage text into usage_str var
For consistency and readability.
Note: This also makes exactly one extra blank line be printed at the end
of every usage text, which is currently only done in the following
files:
* src/fcopy/main.c
* src/fnettrace-dns/main.c
* src/fnettrace-icmp/main.c
* src/fnettrace-sni/main.c
* src/fnettrace/main.c
* src/profstats/main.c
Diffstat (limited to 'src/fseccomp/main.c')
-rw-r--r-- | src/fseccomp/main.c | 57 |
1 files changed, 30 insertions, 27 deletions
diff --git a/src/fseccomp/main.c b/src/fseccomp/main.c index 0b46daf65..e7823d3c5 100644 --- a/src/fseccomp/main.c +++ b/src/fseccomp/main.c | |||
@@ -22,34 +22,37 @@ | |||
22 | int arg_quiet = 0; | 22 | int arg_quiet = 0; |
23 | int arg_seccomp_error_action = SECCOMP_RET_ERRNO | EPERM; // error action: errno, log or kill | 23 | int arg_seccomp_error_action = SECCOMP_RET_ERRNO | EPERM; // error action: errno, log or kill |
24 | 24 | ||
25 | static const char *const usage_str = | ||
26 | "Usage:\n" | ||
27 | "\tfseccomp debug-syscalls\n" | ||
28 | "\tfseccomp debug-syscalls32\n" | ||
29 | "\tfseccomp debug-errnos\n" | ||
30 | "\tfseccomp debug-protocols\n" | ||
31 | "\tfseccomp protocol build list file\n" | ||
32 | "\tfseccomp secondary 64 file\n" | ||
33 | "\tfseccomp secondary 32 file\n" | ||
34 | "\tfseccomp secondary block file\n" | ||
35 | "\tfseccomp default file\n" | ||
36 | "\tfseccomp default file allow-debuggers\n" | ||
37 | "\tfseccomp default32 file\n" | ||
38 | "\tfseccomp default32 file allow-debuggers\n" | ||
39 | "\tfseccomp drop file1 file2 list\n" | ||
40 | "\tfseccomp drop file1 file2 list allow-debuggers\n" | ||
41 | "\tfseccomp drop32 file1 file2 list\n" | ||
42 | "\tfseccomp drop32 file1 file2 list allow-debuggers\n" | ||
43 | "\tfseccomp default drop file1 file2 list\n" | ||
44 | "\tfseccomp default drop file1 file2 list allow-debuggers\n" | ||
45 | "\tfseccomp default32 drop file1 file2 list\n" | ||
46 | "\tfseccomp default32 drop file1 file2 list allow-debuggers\n" | ||
47 | "\tfseccomp keep file1 file2 list\n" | ||
48 | "\tfseccomp keep32 file1 file2 list\n" | ||
49 | "\tfseccomp memory-deny-write-execute file\n" | ||
50 | "\tfseccomp memory-deny-write-execute.32 file\n" | ||
51 | "\tfseccomp restrict-namespaces file list\n" | ||
52 | "\tfseccomp restrict-namespaces.32 file list\n"; | ||
53 | |||
25 | static void usage(void) { | 54 | static void usage(void) { |
26 | printf("Usage:\n" | 55 | puts(usage_str); |
27 | "\tfseccomp debug-syscalls\n" | ||
28 | "\tfseccomp debug-syscalls32\n" | ||
29 | "\tfseccomp debug-errnos\n" | ||
30 | "\tfseccomp debug-protocols\n" | ||
31 | "\tfseccomp protocol build list file\n" | ||
32 | "\tfseccomp secondary 64 file\n" | ||
33 | "\tfseccomp secondary 32 file\n" | ||
34 | "\tfseccomp secondary block file\n" | ||
35 | "\tfseccomp default file\n" | ||
36 | "\tfseccomp default file allow-debuggers\n" | ||
37 | "\tfseccomp default32 file\n" | ||
38 | "\tfseccomp default32 file allow-debuggers\n" | ||
39 | "\tfseccomp drop file1 file2 list\n" | ||
40 | "\tfseccomp drop file1 file2 list allow-debuggers\n" | ||
41 | "\tfseccomp drop32 file1 file2 list\n" | ||
42 | "\tfseccomp drop32 file1 file2 list allow-debuggers\n" | ||
43 | "\tfseccomp default drop file1 file2 list\n" | ||
44 | "\tfseccomp default drop file1 file2 list allow-debuggers\n" | ||
45 | "\tfseccomp default32 drop file1 file2 list\n" | ||
46 | "\tfseccomp default32 drop file1 file2 list allow-debuggers\n" | ||
47 | "\tfseccomp keep file1 file2 list\n" | ||
48 | "\tfseccomp keep32 file1 file2 list\n" | ||
49 | "\tfseccomp memory-deny-write-execute file\n" | ||
50 | "\tfseccomp memory-deny-write-execute.32 file\n" | ||
51 | "\tfseccomp restrict-namespaces file list\n" | ||
52 | "\tfseccomp restrict-namespaces.32 file list\n"); | ||
53 | } | 56 | } |
54 | 57 | ||
55 | int main(int argc, char **argv) { | 58 | int main(int argc, char **argv) { |