aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2023-05-11 18:51:02 -0300
committerLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2023-05-14 16:52:49 -0300
commit15ad8696c7cf95059f163b4f7ed86ca697e8fe1e (patch)
tree7d61eb67b0ee8118d653917fb50f446d8e6c4f9d
parentStandardize usage string var declarations (diff)
downloadfirejail-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
-rw-r--r--src/etc-cleanup/main.c15
-rw-r--r--src/fbuilder/main.c7
-rw-r--r--src/fcopy/main.c17
-rw-r--r--src/fids/main.c5
-rw-r--r--src/firecfg/main.c2
-rw-r--r--src/firejail/usage.c3
-rw-r--r--src/firemon/usage.c3
-rw-r--r--src/fldd/main.c11
-rw-r--r--src/fnet/main.c24
-rw-r--r--src/fnetfilter/main.c7
-rw-r--r--src/fnettrace-dns/main.c10
-rw-r--r--src/fnettrace-icmp/main.c10
-rw-r--r--src/fnettrace-sni/main.c9
-rw-r--r--src/fnettrace/main.c24
-rw-r--r--src/fsec-optimize/main.c7
-rw-r--r--src/fsec-print/main.c7
-rw-r--r--src/fseccomp/main.c57
-rw-r--r--src/ftee/main.c5
-rw-r--r--src/profstats/main.c52
19 files changed, 153 insertions, 122 deletions
diff --git a/src/etc-cleanup/main.c b/src/etc-cleanup/main.c
index 6c7bea6d6..f15ba53cd 100644
--- a/src/etc-cleanup/main.c
+++ b/src/etc-cleanup/main.c
@@ -212,13 +212,16 @@ static void process_file(const char *fname) {
212 } 212 }
213} 213}
214 214
215static const char *const usage_str =
216 "usage: cleanup-etc [options] file.profile [file.profile]\n"
217 "Group and clean private-etc entries in one or more profile files.\n"
218 "Options:\n"
219 " --debug - print debug messages\n"
220 " -h, -?, --help - this help screen\n"
221 " --replace - replace profile file\n";
222
215static void usage(void) { 223static void usage(void) {
216 printf("usage: cleanup-etc [options] file.profile [file.profile]\n"); 224 puts(usage_str);
217 printf("Group and clean private-etc entries in one or more profile files.\n");
218 printf("Options:\n");
219 printf(" --debug - print debug messages\n");
220 printf(" -h, -?, --help - this help screen\n");
221 printf(" --replace - replace profile file\n");
222} 225}
223 226
224int main(int argc, char **argv) { 227int main(int argc, char **argv) {
diff --git a/src/fbuilder/main.c b/src/fbuilder/main.c
index 7fdf9af68..a85d4a931 100644
--- a/src/fbuilder/main.c
+++ b/src/fbuilder/main.c
@@ -21,9 +21,12 @@
21int arg_debug = 0; 21int arg_debug = 0;
22int arg_appimage = 0; 22int arg_appimage = 0;
23 23
24static const char *const usage_str =
25 "Firejail profile builder\n"
26 "Usage: firejail [--debug] --build[=profile-file] program-and-arguments\n";
27
24static void usage(void) { 28static void usage(void) {
25 printf("Firejail profile builder\n"); 29 puts(usage_str);
26 printf("Usage: firejail [--debug] --build[=profile-file] program-and-arguments\n");
27} 30}
28 31
29int main(int argc, char **argv) { 32int main(int argc, char **argv) {
diff --git a/src/fcopy/main.c b/src/fcopy/main.c
index ce2efb295..a56e8a91b 100644
--- a/src/fcopy/main.c
+++ b/src/fcopy/main.c
@@ -416,18 +416,19 @@ static void duplicate_link(const char *src, const char *dest, struct stat *s) {
416 free(rdest); 416 free(rdest);
417} 417}
418 418
419static const char *const usage_str =
420 "Usage: fcopy [--follow-link] src dest\n"
421 "\n"
422 "Copy SRC to DEST/SRC. SRC may be a file, directory, or symbolic link.\n"
423 "If SRC is a directory it is copied recursively. If it is a symlink,\n"
424 "the link itself is duplicated, unless --follow-link is given,\n"
425 "in which case the destination of the link is copied.\n"
426 "DEST must already exist and must be a directory.\n";
419 427
420static void usage(void) { 428static void usage(void) {
421 fputs("Usage: fcopy [--follow-link] src dest\n" 429 fputs(usage_str, stderr);
422 "\n"
423 "Copy SRC to DEST/SRC. SRC may be a file, directory, or symbolic link.\n"
424 "If SRC is a directory it is copied recursively. If it is a symlink,\n"
425 "the link itself is duplicated, unless --follow-link is given,\n"
426 "in which case the destination of the link is copied.\n"
427 "DEST must already exist and must be a directory.\n", stderr);
428} 430}
429 431
430
431int main(int argc, char **argv) { 432int main(int argc, char **argv) {
432#if 0 433#if 0
433 { 434 {
diff --git a/src/fids/main.c b/src/fids/main.c
index f1dfdac8e..915edb6ca 100644
--- a/src/fids/main.c
+++ b/src/fids/main.c
@@ -318,10 +318,11 @@ static void process_config(const char *fname) {
318 include_level--; 318 include_level--;
319} 319}
320 320
321 321static const char *const usage_str =
322 "Usage: fids [--help|-h|-?] --init|--check homedir\n";
322 323
323void usage(void) { 324void usage(void) {
324 printf("Usage: fids [--help|-h|-?] --init|--check homedir\n"); 325 puts(usage_str);
325} 326}
326 327
327int main(int argc, char **argv) { 328int main(int argc, char **argv) {
diff --git a/src/firecfg/main.c b/src/firecfg/main.c
index 855523e55..aadc93579 100644
--- a/src/firecfg/main.c
+++ b/src/firecfg/main.c
@@ -57,7 +57,7 @@ static const char *const usage_str =
57 " [...]\n" 57 " [...]\n"
58 "\n" 58 "\n"
59 "License GPL version 2 or later\n" 59 "License GPL version 2 or later\n"
60 "Homepage: https://firejail.wordpress.com\n\n"; 60 "Homepage: https://firejail.wordpress.com\n";
61 61
62static void print_version(void) { 62static void print_version(void) {
63 printf("firecfg version %s\n\n", VERSION); 63 printf("firecfg version %s\n\n", VERSION);
diff --git a/src/firejail/usage.c b/src/firejail/usage.c
index 00a86f426..e8758c807 100644
--- a/src/firejail/usage.c
+++ b/src/firejail/usage.c
@@ -311,8 +311,7 @@ static const char *const usage_str =
311 "\tlist all running sandboxes\n" 311 "\tlist all running sandboxes\n"
312 "\n" 312 "\n"
313 "License GPL version 2 or later\n" 313 "License GPL version 2 or later\n"
314 "Homepage: https://firejail.wordpress.com\n" 314 "Homepage: https://firejail.wordpress.com\n";
315 "\n";
316 315
317void print_version(void) { 316void print_version(void) {
318 printf("firejail version %s\n\n", VERSION); 317 printf("firejail version %s\n\n", VERSION);
diff --git a/src/firemon/usage.c b/src/firemon/usage.c
index 411fc1600..afd2b552a 100644
--- a/src/firemon/usage.c
+++ b/src/firemon/usage.c
@@ -75,8 +75,7 @@ static const char *const usage_str =
75 "\tUser - The owner of the sandbox.\n" 75 "\tUser - The owner of the sandbox.\n"
76 "\n" 76 "\n"
77 "License GPL version 2 or later\n" 77 "License GPL version 2 or later\n"
78 "Homepage: https://firejail.wordpress.com\n" 78 "Homepage: https://firejail.wordpress.com\n";
79 "\n";
80 79
81void print_version(void) { 80void print_version(void) {
82 printf("firemon version %s\n\n", VERSION); 81 printf("firemon version %s\n\n", VERSION);
diff --git a/src/fldd/main.c b/src/fldd/main.c
index 63398ce2e..c28cad72e 100644
--- a/src/fldd/main.c
+++ b/src/fldd/main.c
@@ -282,12 +282,13 @@ static void walk_directory(const char *dirname) {
282 } 282 }
283} 283}
284 284
285 285static const char *const usage_str =
286 "Usage: fldd program_or_directory [file]\n"
287 "Print a list of libraries used by program or store it in the file.\n"
288 "Print a list of libraries used by all .so files in a directory or store it in the file.\n";
286 289
287static void usage(void) { 290static void usage(void) {
288 printf("Usage: fldd program_or_directory [file]\n"); 291 puts(usage_str);
289 printf("Print a list of libraries used by program or store it in the file.\n");
290 printf("Print a list of libraries used by all .so files in a directory or store it in the file.\n");
291} 292}
292 293
293int main(int argc, char **argv) { 294int main(int argc, char **argv) {
@@ -363,4 +364,4 @@ int main(void) {
363 printf("Sorry, private lib is disabled in this build\n"); 364 printf("Sorry, private lib is disabled in this build\n");
364 return 0; 365 return 0;
365} 366}
366#endif \ No newline at end of file 367#endif
diff --git a/src/fnet/main.c b/src/fnet/main.c
index fc36ae977..d1c8170ca 100644
--- a/src/fnet/main.c
+++ b/src/fnet/main.c
@@ -35,19 +35,21 @@ void fmessage(char* fmt, ...) { // TODO: this function is duplicated in src/fire
35 fflush(0); 35 fflush(0);
36} 36}
37 37
38static const char *const usage_str =
39 "Usage:\n"
40 "\tfnet create veth dev1 dev2 bridge child\n"
41 "\tfnet create macvlan dev parent child\n"
42 "\tfnet moveif dev proc\n"
43 "\tfnet printif\n"
44 "\tfnet printif scan\n"
45 "\tfnet config interface dev ip mask mtu\n"
46 "\tfnet config mac addr\n"
47 "\tfnet config ipv6 dev ip\n"
48 "\tfnet ifup dev\n"
49 "\tfnet waitll dev\n";
38 50
39static void usage(void) { 51static void usage(void) {
40 printf("Usage:\n"); 52 puts(usage_str);
41 printf("\tfnet create veth dev1 dev2 bridge child\n");
42 printf("\tfnet create macvlan dev parent child\n");
43 printf("\tfnet moveif dev proc\n");
44 printf("\tfnet printif\n");
45 printf("\tfnet printif scan\n");
46 printf("\tfnet config interface dev ip mask mtu\n");
47 printf("\tfnet config mac addr\n");
48 printf("\tfnet config ipv6 dev ip\n");
49 printf("\tfnet ifup dev\n");
50 printf("\tfnet waitll dev\n");
51} 53}
52 54
53int main(int argc, char **argv) { 55int main(int argc, char **argv) {
diff --git a/src/fnetfilter/main.c b/src/fnetfilter/main.c
index 8c0f6c297..1b0335d68 100644
--- a/src/fnetfilter/main.c
+++ b/src/fnetfilter/main.c
@@ -45,9 +45,12 @@ static char *default_filter =
45"-A OUTPUT -p tcp --dport 3479 -j DROP\n" 45"-A OUTPUT -p tcp --dport 3479 -j DROP\n"
46"COMMIT\n"; 46"COMMIT\n";
47 47
48static const char *const usage_str =
49 "Usage:\n"
50 "\tfnetfilter netfilter-command destination-file\n";
51
48static void usage(void) { 52static void usage(void) {
49 printf("Usage:\n"); 53 puts(usage_str);
50 printf("\tfnetfilter netfilter-command destination-file\n");
51} 54}
52 55
53static void err_exit_cannot_open_file(const char *fname) { 56static void err_exit_cannot_open_file(const char *fname) {
diff --git a/src/fnettrace-dns/main.c b/src/fnettrace-dns/main.c
index 64feec5fe..1cde1942c 100644
--- a/src/fnettrace-dns/main.c
+++ b/src/fnettrace-dns/main.c
@@ -167,13 +167,13 @@ static void run_trace(void) {
167 167
168 close(s); 168 close(s);
169} 169}
170 170static const char *const usage_str =
171 "Usage: fnettrace-dns [OPTIONS]\n"
172 "Options:\n"
173 " --help, -? - this help screen\n";
171 174
172static void usage(void) { 175static void usage(void) {
173 printf("Usage: fnettrace-dns [OPTIONS]\n"); 176 puts(usage_str);
174 printf("Options:\n");
175 printf(" --help, -? - this help screen\n");
176 printf("\n");
177} 177}
178 178
179int main(int argc, char **argv) { 179int main(int argc, char **argv) {
diff --git a/src/fnettrace-icmp/main.c b/src/fnettrace-icmp/main.c
index 714917547..516a9fc5b 100644
--- a/src/fnettrace-icmp/main.c
+++ b/src/fnettrace-icmp/main.c
@@ -201,11 +201,13 @@ static void run_trace(void) {
201 close(s); 201 close(s);
202} 202}
203 203
204static const char *const usage_str =
205 "Usage: fnettrace-icmp [OPTIONS]\n"
206 "Options:\n"
207 " --help, -? - this help screen\n";
208
204static void usage(void) { 209static void usage(void) {
205 printf("Usage: fnettrace-icmp [OPTIONS]\n"); 210 puts(usage_str);
206 printf("Options:\n");
207 printf(" --help, -? - this help screen\n");
208 printf("\n");
209} 211}
210 212
211int main(int argc, char **argv) { 213int main(int argc, char **argv) {
diff --git a/src/fnettrace-sni/main.c b/src/fnettrace-sni/main.c
index b8490b4f7..e7782d656 100644
--- a/src/fnettrace-sni/main.c
+++ b/src/fnettrace-sni/main.c
@@ -204,12 +204,13 @@ static void run_trace(void) {
204 close(s); 204 close(s);
205} 205}
206 206
207static const char *const usage_str =
208 "Usage: fnettrace-sni [OPTIONS]\n"
209 "Options:\n"
210 " --help, -? - this help screen\n";
207 211
208static void usage(void) { 212static void usage(void) {
209 printf("Usage: fnettrace-sni [OPTIONS]\n"); 213 puts(usage_str);
210 printf("Options:\n");
211 printf(" --help, -? - this help screen\n");
212 printf("\n");
213} 214}
214 215
215int main(int argc, char **argv) { 216int main(int argc, char **argv) {
diff --git a/src/fnettrace/main.c b/src/fnettrace/main.c
index 2f421562e..178ac3631 100644
--- a/src/fnettrace/main.c
+++ b/src/fnettrace/main.c
@@ -668,18 +668,20 @@ void logprintf(char *fmt, ...) {
668 va_end(args); 668 va_end(args);
669} 669}
670 670
671static const char *const usage_str =
672 "Usage: fnettrace [OPTIONS]\n"
673 "Options:\n"
674 " --help, -? - this help screen\n"
675 " --log=filename - netlocker logfile\n"
676 " --netfilter - build the firewall rules and commit them.\n"
677 " --tail - \"tail -f\" functionality\n"
678 "Examples:\n"
679 " # fnettrace - traffic trace\n"
680 " # fnettrace --netfilter --log=logfile - netlocker, dump output in logfile\n"
681 " # fnettrace --tail --log=logifile - similar to \"tail -f logfile\"\n";
682
671static void usage(void) { 683static void usage(void) {
672 printf("Usage: fnettrace [OPTIONS]\n"); 684 puts(usage_str);
673 printf("Options:\n");
674 printf(" --help, -? - this help screen\n");
675 printf(" --log=filename - netlocker logfile\n");
676 printf(" --netfilter - build the firewall rules and commit them.\n");
677 printf(" --tail - \"tail -f\" functionality\n");
678 printf("Examples:\n");
679 printf(" # fnettrace - traffic trace\n");
680 printf(" # fnettrace --netfilter --log=logfile - netlocker, dump output in logfile\n");
681 printf(" # fnettrace --tail --log=logifile - similar to \"tail -f logfile\"\n");
682 printf("\n");
683} 685}
684 686
685int main(int argc, char **argv) { 687int main(int argc, char **argv) {
diff --git a/src/fsec-optimize/main.c b/src/fsec-optimize/main.c
index 0bc521c0d..38ba7c697 100644
--- a/src/fsec-optimize/main.c
+++ b/src/fsec-optimize/main.c
@@ -22,9 +22,12 @@
22 22
23int arg_seccomp_error_action = SECCOMP_RET_ERRNO | EPERM; // error action: errno, log or kill 23int arg_seccomp_error_action = SECCOMP_RET_ERRNO | EPERM; // error action: errno, log or kill
24 24
25static const char *const usage_str =
26 "Usage:\n"
27 "\tfsec-optimize file - optimize seccomp filter\n";
28
25static void usage(void) { 29static void usage(void) {
26 printf("Usage:\n"); 30 puts(usage_str);
27 printf("\tfsec-optimize file - optimize seccomp filter\n");
28} 31}
29 32
30int main(int argc, char **argv) { 33int main(int argc, char **argv) {
diff --git a/src/fsec-print/main.c b/src/fsec-print/main.c
index 696c6bc0c..4d3e38648 100644
--- a/src/fsec-print/main.c
+++ b/src/fsec-print/main.c
@@ -19,9 +19,12 @@
19*/ 19*/
20#include "fsec_print.h" 20#include "fsec_print.h"
21 21
22static const char *const usage_str =
23 "Usage:\n"
24 "\tfsec-print file - disassemble seccomp filter\n";
25
22static void usage(void) { 26static void usage(void) {
23 printf("Usage:\n"); 27 puts(usage_str);
24 printf("\tfsec-print file - disassemble seccomp filter\n");
25} 28}
26 29
27int arg_quiet = 0; 30int arg_quiet = 0;
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 @@
22int arg_quiet = 0; 22int arg_quiet = 0;
23int arg_seccomp_error_action = SECCOMP_RET_ERRNO | EPERM; // error action: errno, log or kill 23int arg_seccomp_error_action = SECCOMP_RET_ERRNO | EPERM; // error action: errno, log or kill
24 24
25static 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
25static void usage(void) { 54static 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
55int main(int argc, char **argv) { 58int main(int argc, char **argv) {
diff --git a/src/ftee/main.c b/src/ftee/main.c
index 0a492b41e..a34a76b26 100644
--- a/src/ftee/main.c
+++ b/src/ftee/main.c
@@ -180,8 +180,11 @@ static int is_link(const char *fname) {
180 return 0; 180 return 0;
181} 181}
182 182
183static const char *const usage_str =
184 "Usage: ftee filename\n";
185
183static void usage(void) { 186static void usage(void) {
184 printf("Usage: ftee filename\n"); 187 puts(usage_str);
185} 188}
186 189
187int main(int argc, char **argv) { 190int main(int argc, char **argv) {
diff --git a/src/profstats/main.c b/src/profstats/main.c
index d5e57e7cc..49ed1637a 100644
--- a/src/profstats/main.c
+++ b/src/profstats/main.c
@@ -74,32 +74,34 @@ static int arg_restrict_namespaces = 0;
74 74
75static char *profile = NULL; 75static char *profile = NULL;
76 76
77static const char *const usage_str =
78 "profstats - print profile statistics\n"
79 "Usage: profstats [options] file[s]\n"
80 "Options:\n"
81 " --apparmor - print profiles without apparmor\n"
82 " --caps - print profiles without caps\n"
83 " --dbus-system-none - print profiles without \"dbus-system none\"\n"
84 " --dbus-user-none - print profiles without \"dbus-user none\"\n"
85 " --ssh - print profiles without \"include disable-common.inc\"\n"
86 " --noexec - print profiles without \"include disable-exec.inc\"\n"
87 " --noroot - print profiles without \"noroot\"\n"
88 " --private-bin - print profiles without private-bin\n"
89 " --private-dev - print profiles without private-dev\n"
90 " --private-etc - print profiles without private-etc\n"
91 " --private-tmp - print profiles without private-tmp\n"
92 " --print-blacklist - print all --blacklist for a profile\n"
93 " --print-whitelist - print all --private and --whitelist for a profile\n"
94 " --seccomp - print profiles without seccomp\n"
95 " --memory-deny-write-execute - print profiles without \"memory-deny-write-execute\"\n"
96 " --restrict-namespaces - print profiles without \"restrict-namespaces\"\n"
97 " --whitelist-home - print profiles whitelisting home directory\n"
98 " --whitelist-var - print profiles without \"include whitelist-var-common.inc\"\n"
99 " --whitelist-runuser - print profiles without \"include whitelist-runuser-common.inc\" or \"blacklist ${RUNUSER}\"\n"
100 " --whitelist-usrshare - print profiles without \"include whitelist-usr-share-common.inc\"\n"
101 " --debug\n";
102
77static void usage(void) { 103static void usage(void) {
78 printf("profstats - print profile statistics\n"); 104 puts(usage_str);
79 printf("Usage: profstats [options] file[s]\n");
80 printf("Options:\n");
81 printf(" --apparmor - print profiles without apparmor\n");
82 printf(" --caps - print profiles without caps\n");
83 printf(" --dbus-system-none - print profiles without \"dbus-system none\"\n");
84 printf(" --dbus-user-none - print profiles without \"dbus-user none\"\n");
85 printf(" --ssh - print profiles without \"include disable-common.inc\"\n");
86 printf(" --noexec - print profiles without \"include disable-exec.inc\"\n");
87 printf(" --noroot - print profiles without \"noroot\"\n");
88 printf(" --private-bin - print profiles without private-bin\n");
89 printf(" --private-dev - print profiles without private-dev\n");
90 printf(" --private-etc - print profiles without private-etc\n");
91 printf(" --private-tmp - print profiles without private-tmp\n");
92 printf(" --print-blacklist - print all --blacklist for a profile\n");
93 printf(" --print-whitelist - print all --private and --whitelist for a profile\n");
94 printf(" --seccomp - print profiles without seccomp\n");
95 printf(" --memory-deny-write-execute - print profiles without \"memory-deny-write-execute\"\n");
96 printf(" --restrict-namespaces - print profiles without \"restrict-namespaces\"\n");
97 printf(" --whitelist-home - print profiles whitelisting home directory\n");
98 printf(" --whitelist-var - print profiles without \"include whitelist-var-common.inc\"\n");
99 printf(" --whitelist-runuser - print profiles without \"include whitelist-runuser-common.inc\" or \"blacklist ${RUNUSER}\"\n");
100 printf(" --whitelist-usrshare - print profiles without \"include whitelist-usr-share-common.inc\"\n");
101 printf(" --debug\n");
102 printf("\n");
103} 105}
104 106
105static void process_file(char *fname) { 107static void process_file(char *fname) {