aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2024-01-06 18:25:59 -0300
committerLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2024-01-11 08:18:39 -0300
commit69f804b4a3fa76a34088b1c97e9321d5afc1eb4f (patch)
tree90dd3adedfc9dbcc4d232c53a48f311e93c777e5 /src
parentprofiles: use only /usr/share/lua* (#6150) (diff)
downloadfirejail-69f804b4a3fa76a34088b1c97e9321d5afc1eb4f.tar.gz
firejail-69f804b4a3fa76a34088b1c97e9321d5afc1eb4f.tar.zst
firejail-69f804b4a3fa76a34088b1c97e9321d5afc1eb4f.zip
firecfg: use ignorelist also for .profile files
Currently it is only used when parsing the configuration files: * /etc/firecfg.d/*.conf * /etc/firecfg.config Use it when searching for profile filenames as well: * ~/.config/firejail/*.profile Relates to #5876.
Diffstat (limited to 'src')
-rw-r--r--src/firecfg/main.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/firecfg/main.c b/src/firecfg/main.c
index 604b12633..40493159e 100644
--- a/src/firecfg/main.c
+++ b/src/firecfg/main.c
@@ -314,17 +314,19 @@ static void set_links_homedir(const char *homedir) {
314 if (!exec) 314 if (!exec)
315 errExit("strdup"); 315 errExit("strdup");
316 char *ptr = strrchr(exec, '.'); 316 char *ptr = strrchr(exec, '.');
317 if (!ptr) { 317 if (!ptr)
318 free(exec); 318 goto next;
319 continue; 319 if (strcmp(ptr, ".profile") != 0)
320 } 320 goto next;
321 if (strcmp(ptr, ".profile") != 0) {
322 free(exec);
323 continue;
324 }
325 321
326 *ptr = '\0'; 322 *ptr = '\0';
323 if (in_ignorelist(exec)) {
324 printf(" %s ignored\n", exec);
325 goto next;
326 }
327
327 set_file(exec, FIREJAIL_EXEC); 328 set_file(exec, FIREJAIL_EXEC);
329next:
328 free(exec); 330 free(exec);
329 } 331 }
330 closedir(dir); 332 closedir(dir);