diff options
author | 2018-10-09 04:39:22 -0500 | |
---|---|---|
committer | 2018-10-15 23:39:34 -0500 | |
commit | fd79cb3be6aa2e62d5a7ec45eee39dcd07a9d4f3 (patch) | |
tree | 0d22e973c1c2e51cccc0be9481873a056127a9fe /src/firejail/fs.c | |
parent | tentative fix: automatically mount libdir in chroot - #2176 (diff) | |
download | firejail-fd79cb3be6aa2e62d5a7ec45eee39dcd07a9d4f3.tar.gz firejail-fd79cb3be6aa2e62d5a7ec45eee39dcd07a9d4f3.tar.zst firejail-fd79cb3be6aa2e62d5a7ec45eee39dcd07a9d4f3.zip |
rename expand_home -> expand_macros to better reflect usage and remove unneeded homedir argument.
Diffstat (limited to 'src/firejail/fs.c')
-rw-r--r-- | src/firejail/fs.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/firejail/fs.c b/src/firejail/fs.c index 9f0dac4e0..f70c5ac8a 100644 --- a/src/firejail/fs.c +++ b/src/firejail/fs.c | |||
@@ -257,8 +257,6 @@ static void globbing(OPERATION op, const char *pattern, const char *noblacklist[ | |||
257 | 257 | ||
258 | // blacklist files or directories by mounting empty files on top of them | 258 | // blacklist files or directories by mounting empty files on top of them |
259 | void fs_blacklist(void) { | 259 | void fs_blacklist(void) { |
260 | char *homedir = cfg.homedir; | ||
261 | assert(homedir); | ||
262 | ProfileEntry *entry = cfg.profile; | 260 | ProfileEntry *entry = cfg.profile; |
263 | if (!entry) | 261 | if (!entry) |
264 | return; | 262 | return; |
@@ -335,7 +333,7 @@ void fs_blacklist(void) { | |||
335 | enames = calloc(2, sizeof(char *)); | 333 | enames = calloc(2, sizeof(char *)); |
336 | if (!enames) | 334 | if (!enames) |
337 | errExit("calloc"); | 335 | errExit("calloc"); |
338 | enames[0] = expand_home(entry->data + 12, homedir); | 336 | enames[0] = expand_macros(entry->data + 12); |
339 | assert(enames[1] == 0); | 337 | assert(enames[1] == 0); |
340 | } | 338 | } |
341 | 339 | ||
@@ -401,7 +399,7 @@ void fs_blacklist(void) { | |||
401 | } | 399 | } |
402 | 400 | ||
403 | // replace home macro in blacklist array | 401 | // replace home macro in blacklist array |
404 | char *new_name = expand_home(ptr, homedir); | 402 | char *new_name = expand_macros(ptr); |
405 | ptr = new_name; | 403 | ptr = new_name; |
406 | 404 | ||
407 | // expand path macro - look for the file in /usr/local/bin, /usr/local/sbin, /bin, /usr/bin, /sbin and /usr/sbin directories | 405 | // expand path macro - look for the file in /usr/local/bin, /usr/local/sbin, /bin, /usr/bin, /sbin and /usr/sbin directories |