diff options
author | Fred-Barclay <Fred-Barclay@users.noreply.github.com> | 2017-11-19 15:02:42 -0600 |
---|---|---|
committer | Fred-Barclay <Fred-Barclay@users.noreply.github.com> | 2017-11-19 15:02:42 -0600 |
commit | b936e5ab77dfa0b54b2f6f6dd53762a8244e4230 (patch) | |
tree | edb7237ba54d7c2a85a8531c8901d6466c5e0e4d /src/firejail/fs_lib2.c | |
parent | More qtox profile tightening (diff) | |
download | firejail-b936e5ab77dfa0b54b2f6f6dd53762a8244e4230.tar.gz firejail-b936e5ab77dfa0b54b2f6f6dd53762a8244e4230.tar.zst firejail-b936e5ab77dfa0b54b2f6f6dd53762a8244e4230.zip |
strip trailing whitespace
Diffstat (limited to 'src/firejail/fs_lib2.c')
-rw-r--r-- | src/firejail/fs_lib2.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/firejail/fs_lib2.c b/src/firejail/fs_lib2.c index e5c6bdaed..4e49730f4 100644 --- a/src/firejail/fs_lib2.c +++ b/src/firejail/fs_lib2.c | |||
@@ -88,7 +88,7 @@ static void stdc(const char *dirname) { | |||
88 | continue; | 88 | continue; |
89 | if (strcmp(entry->d_name, "..") == 0) | 89 | if (strcmp(entry->d_name, "..") == 0) |
90 | continue; | 90 | continue; |
91 | 91 | ||
92 | if (find_libc_list(entry->d_name)) { | 92 | if (find_libc_list(entry->d_name)) { |
93 | char *fname; | 93 | char *fname; |
94 | if (asprintf(&fname, "%s/%s", dirname, entry->d_name) == -1) | 94 | if (asprintf(&fname, "%s/%s", dirname, entry->d_name) == -1) |
@@ -105,7 +105,7 @@ void fslib_install_stdc(void) { | |||
105 | // install standard C libraries | 105 | // install standard C libraries |
106 | struct stat s; | 106 | struct stat s; |
107 | char *stdclib = "/lib64"; // CentOS, Fedora, Arch | 107 | char *stdclib = "/lib64"; // CentOS, Fedora, Arch |
108 | 108 | ||
109 | if (stat("/lib/x86_64-linux-gnu", &s) == 0) { // Debian & friends | 109 | if (stat("/lib/x86_64-linux-gnu", &s) == 0) { // Debian & friends |
110 | mkdir_attr(RUN_LIB_DIR "/x86_64-linux-gnu", 0755, 0, 0); | 110 | mkdir_attr(RUN_LIB_DIR "/x86_64-linux-gnu", 0755, 0, 0); |
111 | stdclib = "/lib/x86_64-linux-gnu"; | 111 | stdclib = "/lib/x86_64-linux-gnu"; |
@@ -219,13 +219,13 @@ SysLib syslibs[] = { | |||
219 | "" // message | 219 | "" // message |
220 | } | 220 | } |
221 | }; | 221 | }; |
222 | 222 | ||
223 | void fslib_install_system(void) { | 223 | void fslib_install_system(void) { |
224 | // look for installed libraries | 224 | // look for installed libraries |
225 | DIR *dir = opendir(RUN_LIB_DIR "/x86_64-linux-gnu"); | 225 | DIR *dir = opendir(RUN_LIB_DIR "/x86_64-linux-gnu"); |
226 | if (!dir) | 226 | if (!dir) |
227 | dir = opendir(RUN_LIB_DIR); | 227 | dir = opendir(RUN_LIB_DIR); |
228 | 228 | ||
229 | if (dir) { | 229 | if (dir) { |
230 | struct dirent *entry; | 230 | struct dirent *entry; |
231 | while ((entry = readdir(dir)) != NULL) { | 231 | while ((entry = readdir(dir)) != NULL) { |
@@ -238,12 +238,12 @@ void fslib_install_system(void) { | |||
238 | while (ptr->library) { | 238 | while (ptr->library) { |
239 | if (ptr->len == 0) | 239 | if (ptr->len == 0) |
240 | ptr->len = strlen(ptr->library); | 240 | ptr->len = strlen(ptr->library); |
241 | 241 | ||
242 | if (strncmp(entry->d_name, ptr->library, ptr->len) == 0) { | 242 | if (strncmp(entry->d_name, ptr->library, ptr->len) == 0) { |
243 | ptr->found = 1; | 243 | ptr->found = 1; |
244 | break; | 244 | break; |
245 | } | 245 | } |
246 | 246 | ||
247 | ptr++; | 247 | ptr++; |
248 | } | 248 | } |
249 | 249 | ||
@@ -281,7 +281,7 @@ void fslib_install_system(void) { | |||
281 | } | 281 | } |
282 | } | 282 | } |
283 | free(name); | 283 | free(name); |
284 | 284 | ||
285 | if (*ptr->dir2 != '\0') { | 285 | if (*ptr->dir2 != '\0') { |
286 | // Debian & friends | 286 | // Debian & friends |
287 | if (asprintf(&name, "/usr/lib/x86_64-linux-gnu/%s", ptr->dir2) == -1) | 287 | if (asprintf(&name, "/usr/lib/x86_64-linux-gnu/%s", ptr->dir2) == -1) |
@@ -302,7 +302,7 @@ void fslib_install_system(void) { | |||
302 | } | 302 | } |
303 | free(name); | 303 | free(name); |
304 | } | 304 | } |
305 | 305 | ||
306 | if (!arg_quiet) | 306 | if (!arg_quiet) |
307 | fprintf(stderr, "%s installed in %0.2f ms\n", ptr->message, timetrace_end()); | 307 | fprintf(stderr, "%s installed in %0.2f ms\n", ptr->message, timetrace_end()); |
308 | } | 308 | } |