diff options
author | 2024-04-28 10:17:42 -0400 | |
---|---|---|
committer | 2024-04-28 10:17:42 -0400 | |
commit | 4ad124a5fb9071d200408e835128a5db0f079886 (patch) | |
tree | 4f7638de39e5c43b34126cf345f004f7ae73b975 /src | |
parent | static ip map (diff) | |
download | firejail-4ad124a5fb9071d200408e835128a5db0f079886.tar.gz firejail-4ad124a5fb9071d200408e835128a5db0f079886.tar.zst firejail-4ad124a5fb9071d200408e835128a5db0f079886.zip |
--fbuilder cleanup
Diffstat (limited to 'src')
-rw-r--r-- | src/fbuilder/build_bin.c | 2 | ||||
-rw-r--r-- | src/fbuilder/build_fs.c | 2 | ||||
-rw-r--r-- | src/fbuilder/build_home.c | 2 | ||||
-rw-r--r-- | src/fbuilder/build_profile.c | 4 | ||||
-rw-r--r-- | src/fbuilder/build_seccomp.c | 6 | ||||
-rw-r--r-- | src/fbuilder/filedb.c | 2 | ||||
-rw-r--r-- | src/fbuilder/main.c | 8 |
7 files changed, 13 insertions, 13 deletions
diff --git a/src/fbuilder/build_bin.c b/src/fbuilder/build_bin.c index 285f9df37..f91a543eb 100644 --- a/src/fbuilder/build_bin.c +++ b/src/fbuilder/build_bin.c | |||
@@ -27,7 +27,7 @@ static void process_bin(const char *fname) { | |||
27 | // process trace file | 27 | // process trace file |
28 | FILE *fp = fopen(fname, "r"); | 28 | FILE *fp = fopen(fname, "r"); |
29 | if (!fp) { | 29 | if (!fp) { |
30 | fprintf(stderr, "Error: cannot open %s\n", fname); | 30 | fprintf(stderr, "Error fbuilder: cannot open %s\n", fname); |
31 | exit(1); | 31 | exit(1); |
32 | } | 32 | } |
33 | 33 | ||
diff --git a/src/fbuilder/build_fs.c b/src/fbuilder/build_fs.c index 4e71cdbea..3147fac82 100644 --- a/src/fbuilder/build_fs.c +++ b/src/fbuilder/build_fs.c | |||
@@ -31,7 +31,7 @@ static void process_file(const char *fname, const char *dir, void (*callback)(ch | |||
31 | // process trace file | 31 | // process trace file |
32 | FILE *fp = fopen(fname, "r"); | 32 | FILE *fp = fopen(fname, "r"); |
33 | if (!fp) { | 33 | if (!fp) { |
34 | fprintf(stderr, "Error: cannot open %s\n", fname); | 34 | fprintf(stderr, "Error fbuilder: cannot open %s\n", fname); |
35 | exit(1); | 35 | exit(1); |
36 | } | 36 | } |
37 | 37 | ||
diff --git a/src/fbuilder/build_home.c b/src/fbuilder/build_home.c index cb87bf5d0..8afe257ce 100644 --- a/src/fbuilder/build_home.c +++ b/src/fbuilder/build_home.c | |||
@@ -31,7 +31,7 @@ void process_home(const char *fname, char *home, int home_len) { | |||
31 | // process trace file | 31 | // process trace file |
32 | FILE *fp = fopen(fname, "r"); | 32 | FILE *fp = fopen(fname, "r"); |
33 | if (!fp) { | 33 | if (!fp) { |
34 | fprintf(stderr, "Error: cannot open %s\n", fname); | 34 | fprintf(stderr, "Error fbuilder: cannot open %s\n", fname); |
35 | exit(1); | 35 | exit(1); |
36 | } | 36 | } |
37 | 37 | ||
diff --git a/src/fbuilder/build_profile.c b/src/fbuilder/build_profile.c index 41c85e9ab..ab6eaf1dd 100644 --- a/src/fbuilder/build_profile.c +++ b/src/fbuilder/build_profile.c | |||
@@ -26,7 +26,7 @@ | |||
26 | void build_profile(int argc, char **argv, int index, FILE *fp) { | 26 | void build_profile(int argc, char **argv, int index, FILE *fp) { |
27 | // next index is the application name | 27 | // next index is the application name |
28 | if (index >= argc) { | 28 | if (index >= argc) { |
29 | fprintf(stderr, "Error: application name missing\n"); | 29 | fprintf(stderr, "Error fbuilder: application name missing\n"); |
30 | exit(1); | 30 | exit(1); |
31 | } | 31 | } |
32 | 32 | ||
@@ -165,7 +165,7 @@ void build_profile(int argc, char **argv, int index, FILE *fp) { | |||
165 | unlink(trace_output); | 165 | unlink(trace_output); |
166 | } | 166 | } |
167 | else { | 167 | else { |
168 | fprintf(stderr, "Error: cannot run the sandbox\n"); | 168 | fprintf(stderr, "Error fbuilder: cannot run the sandbox\n"); |
169 | exit(1); | 169 | exit(1); |
170 | } | 170 | } |
171 | } | 171 | } |
diff --git a/src/fbuilder/build_seccomp.c b/src/fbuilder/build_seccomp.c index 791013a81..14a249b77 100644 --- a/src/fbuilder/build_seccomp.c +++ b/src/fbuilder/build_seccomp.c | |||
@@ -27,7 +27,7 @@ void build_seccomp(const char *fname, FILE *fp) { | |||
27 | 27 | ||
28 | FILE *fp2 = fopen(fname, "r"); | 28 | FILE *fp2 = fopen(fname, "r"); |
29 | if (!fp2) { | 29 | if (!fp2) { |
30 | fprintf(stderr, "Error: cannot open %s\n", fname); | 30 | fprintf(stderr, "Error fbuilder: cannot open %s\n", fname); |
31 | exit(1); | 31 | exit(1); |
32 | } | 32 | } |
33 | 33 | ||
@@ -54,7 +54,7 @@ void build_seccomp(const char *fname, FILE *fp) { | |||
54 | } | 54 | } |
55 | else if (line == 2) { | 55 | else if (line == 2) { |
56 | if (*buf != '-') { | 56 | if (*buf != '-') { |
57 | fprintf(stderr, "Error: invalid strace output\n%s\n", buf); | 57 | fprintf(stderr, "Error fbuilder: invalid strace output\n%s\n", buf); |
58 | exit(1); | 58 | exit(1); |
59 | } | 59 | } |
60 | } | 60 | } |
@@ -96,7 +96,7 @@ static void process_protocol(const char *fname) { | |||
96 | // process trace file | 96 | // process trace file |
97 | FILE *fp = fopen(fname, "r"); | 97 | FILE *fp = fopen(fname, "r"); |
98 | if (!fp) { | 98 | if (!fp) { |
99 | fprintf(stderr, "Error: cannot open %s\n", fname); | 99 | fprintf(stderr, "Error fbuilder: cannot open %s\n", fname); |
100 | exit(1); | 100 | exit(1); |
101 | } | 101 | } |
102 | 102 | ||
diff --git a/src/fbuilder/filedb.c b/src/fbuilder/filedb.c index 994618b34..d9a8a99b3 100644 --- a/src/fbuilder/filedb.c +++ b/src/fbuilder/filedb.c | |||
@@ -94,7 +94,7 @@ FileDB *filedb_load_whitelist(FileDB *head, const char *fname, const char *prefi | |||
94 | errExit("asprintf"); | 94 | errExit("asprintf"); |
95 | FILE *fp = fopen(f, "r"); | 95 | FILE *fp = fopen(f, "r"); |
96 | if (!fp) { | 96 | if (!fp) { |
97 | fprintf(stderr, "Error: cannot open %s\n", f); | 97 | fprintf(stderr, "Error fbuilder: cannot open %s\n", f); |
98 | free(f); | 98 | free(f); |
99 | exit(1); | 99 | exit(1); |
100 | } | 100 | } |
diff --git a/src/fbuilder/main.c b/src/fbuilder/main.c index b03d2f3dd..884971d42 100644 --- a/src/fbuilder/main.c +++ b/src/fbuilder/main.c | |||
@@ -66,21 +66,21 @@ printf("\n"); | |||
66 | 66 | ||
67 | // don't run if the file exists | 67 | // don't run if the file exists |
68 | if (access(argv[i] + 8, F_OK) == 0) { | 68 | if (access(argv[i] + 8, F_OK) == 0) { |
69 | fprintf(stderr, "Error: the profile file already exists. Please use a different file name.\n"); | 69 | fprintf(stderr, "Error fbuilder: the profile file already exists. Please use a different file name.\n"); |
70 | exit(1); | 70 | exit(1); |
71 | } | 71 | } |
72 | 72 | ||
73 | // check file access | 73 | // check file access |
74 | fp = fopen(argv[i] + 8, "w"); | 74 | fp = fopen(argv[i] + 8, "w"); |
75 | if (!fp) { | 75 | if (!fp) { |
76 | fprintf(stderr, "Error: cannot open profile file.\n"); | 76 | fprintf(stderr, "Error fbuilder: cannot open profile file.\n"); |
77 | exit(1); | 77 | exit(1); |
78 | } | 78 | } |
79 | prof_file = argv[i] + 8; | 79 | prof_file = argv[i] + 8; |
80 | } | 80 | } |
81 | else { | 81 | else { |
82 | if (*argv[i] == '-') { | 82 | if (*argv[i] == '-') { |
83 | fprintf(stderr, "Error: invalid program\n"); | 83 | fprintf(stderr, "Error fbuilder: invalid program\n"); |
84 | usage(); | 84 | usage(); |
85 | exit(1); | 85 | exit(1); |
86 | } | 86 | } |
@@ -90,7 +90,7 @@ printf("\n"); | |||
90 | } | 90 | } |
91 | 91 | ||
92 | if (prog_index == 0) { | 92 | if (prog_index == 0) { |
93 | fprintf(stderr, "Error : program and arguments required\n"); | 93 | fprintf(stderr, "Error fbuilder: program and arguments required\n"); |
94 | usage(); | 94 | usage(); |
95 | if (prof_file) { | 95 | if (prof_file) { |
96 | fclose(fp); | 96 | fclose(fp); |