diff options
Diffstat (limited to 'src/firejail/bandwidth.c')
-rw-r--r-- | src/firejail/bandwidth.c | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/src/firejail/bandwidth.c b/src/firejail/bandwidth.c index 542faa06e..0045b444f 100644 --- a/src/firejail/bandwidth.c +++ b/src/firejail/bandwidth.c | |||
@@ -141,22 +141,6 @@ static void bandwidth_create_run_file(pid_t pid) { | |||
141 | free(fname); | 141 | free(fname); |
142 | } | 142 | } |
143 | 143 | ||
144 | // delete bandwidth file | ||
145 | void bandwidth_del_run_file(pid_t pid) { | ||
146 | char *fname; | ||
147 | if (asprintf(&fname, "%s/%d-bandwidth", RUN_FIREJAIL_BANDWIDTH_DIR, (int) pid) == -1) | ||
148 | errExit("asprintf"); | ||
149 | unlink(fname); | ||
150 | free(fname); | ||
151 | } | ||
152 | |||
153 | void network_del_run_file(pid_t pid) { | ||
154 | char *fname; | ||
155 | if (asprintf(&fname, "%s/%d-netmap", RUN_FIREJAIL_NETWORK_DIR, (int) pid) == -1) | ||
156 | errExit("asprintf"); | ||
157 | unlink(fname); | ||
158 | free(fname); | ||
159 | } | ||
160 | 144 | ||
161 | void network_set_run_file(pid_t pid) { | 145 | void network_set_run_file(pid_t pid) { |
162 | char *fname; | 146 | char *fname; |
@@ -268,9 +252,8 @@ void bandwidth_remove(pid_t pid, const char *dev) { | |||
268 | } | 252 | } |
269 | 253 | ||
270 | // remove the file if there are no entries in the list | 254 | // remove the file if there are no entries in the list |
271 | if (ifbw == NULL) { | 255 | if (ifbw == NULL) |
272 | bandwidth_del_run_file(pid); | 256 | delete_bandwidth_run_file(pid); |
273 | } | ||
274 | } | 257 | } |
275 | 258 | ||
276 | // add interface to run file | 259 | // add interface to run file |