diff options
author | 2021-09-25 11:27:40 +0200 | |
---|---|---|
committer | 2021-09-25 11:27:40 +0200 | |
commit | 5025f4f96dd82106ec9050897c100259f9c94c90 (patch) | |
tree | 4744364fbefa0b47796abfb91cac21cb65049d69 /src | |
parent | update README (diff) | |
download | firejail-5025f4f96dd82106ec9050897c100259f9c94c90.tar.gz firejail-5025f4f96dd82106ec9050897c100259f9c94c90.tar.zst firejail-5025f4f96dd82106ec9050897c100259f9c94c90.zip |
private-lib: check firejail libraries as root user (#4576)
users, and fldd in particular, might have no read permission
on the firejail executable, make that ok by running fldd
as root
Diffstat (limited to 'src')
-rw-r--r-- | src/firejail/fs_lib2.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/firejail/fs_lib2.c b/src/firejail/fs_lib2.c index c69bf7c98..a347b380c 100644 --- a/src/firejail/fs_lib2.c +++ b/src/firejail/fs_lib2.c | |||
@@ -143,7 +143,7 @@ static void fdir(void) { | |||
143 | NULL, | 143 | NULL, |
144 | }; | 144 | }; |
145 | 145 | ||
146 | // need to parse as root user, unprivileged users have no read permission on executables | 146 | // need to parse as root user, unprivileged users have no read permission on some of these binaries |
147 | int i; | 147 | int i; |
148 | for (i = 0; fbin[i]; i++) | 148 | for (i = 0; fbin[i]; i++) |
149 | fslib_mount_libs(fbin[i], 0); | 149 | fslib_mount_libs(fbin[i], 0); |
@@ -153,7 +153,9 @@ void fslib_install_firejail(void) { | |||
153 | timetrace_start(); | 153 | timetrace_start(); |
154 | // bring in firejail executable libraries, in case we are redirected here | 154 | // bring in firejail executable libraries, in case we are redirected here |
155 | // by a firejail symlink from /usr/local/bin/firejail | 155 | // by a firejail symlink from /usr/local/bin/firejail |
156 | fslib_mount_libs(PATH_FIREJAIL, 1); // parse as user | 156 | // fldd might have no read permission on the firejail executable |
157 | // parse as root in order to support these setups | ||
158 | fslib_mount_libs(PATH_FIREJAIL, 0); | ||
157 | 159 | ||
158 | // bring in firejail directory | 160 | // bring in firejail directory |
159 | fdir(); | 161 | fdir(); |