diff options
author | 2021-01-20 15:27:47 +0100 | |
---|---|---|
committer | 2021-01-20 15:36:48 +0100 | |
commit | c5ad45e5059cfcc3cb9d312e0384e4604e2d5220 (patch) | |
tree | 19b59492382dafb04d98410f29a65a8c02ec9726 /src | |
parent | add pkglog to new profiles (diff) | |
download | firejail-c5ad45e5059cfcc3cb9d312e0384e4604e2d5220.tar.gz firejail-c5ad45e5059cfcc3cb9d312e0384e4604e2d5220.tar.zst firejail-c5ad45e5059cfcc3cb9d312e0384e4604e2d5220.zip |
private-lib: simplify installation of stdc
as modern-day Debian only keeps a single symbolic link in
/lib64, going through both directories systematically adds
virtually no overhead (as indicated by the timetrace). At
the same time it is simpler and more robust in producing a correct
representation of the filesystem.
Diffstat (limited to 'src')
-rw-r--r-- | src/firejail/fs_lib2.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/firejail/fs_lib2.c b/src/firejail/fs_lib2.c index 758e079a4..95e10ee05 100644 --- a/src/firejail/fs_lib2.c +++ b/src/firejail/fs_lib2.c | |||
@@ -108,18 +108,13 @@ void fslib_install_stdc(void) { | |||
108 | // install standard C libraries | 108 | // install standard C libraries |
109 | timetrace_start(); | 109 | timetrace_start(); |
110 | struct stat s; | 110 | struct stat s; |
111 | char *stdclib = "/lib64"; // CentOS, Fedora, Arch | ||
112 | |||
113 | if (stat("/lib/x86_64-linux-gnu", &s) == 0) { // Debian & friends | 111 | if (stat("/lib/x86_64-linux-gnu", &s) == 0) { // Debian & friends |
114 | // PT_INTERP | ||
115 | fslib_duplicate("/lib64/ld-linux-x86-64.so.2"); | ||
116 | |||
117 | mkdir_attr(RUN_LIB_DIR "/x86_64-linux-gnu", 0755, 0, 0); | 112 | mkdir_attr(RUN_LIB_DIR "/x86_64-linux-gnu", 0755, 0, 0); |
118 | selinux_relabel_path(RUN_LIB_DIR "/x86_64-linux-gnu", "/lib/x86_64-linux-gnu"); | 113 | selinux_relabel_path(RUN_LIB_DIR "/x86_64-linux-gnu", "/lib/x86_64-linux-gnu"); |
119 | stdclib = "/lib/x86_64-linux-gnu"; | 114 | stdc("/lib/x86_64-linux-gnu"); |
120 | } | 115 | } |
121 | 116 | ||
122 | stdc(stdclib); | 117 | stdc("/lib64"); // CentOS, Fedora, Arch, ld-linux.so in Debian & friends |
123 | 118 | ||
124 | // install locale | 119 | // install locale |
125 | if (stat("/usr/lib/locale", &s) == 0) | 120 | if (stat("/usr/lib/locale", &s) == 0) |