aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/firecfg/firecfg.config67
-rw-r--r--src/firecfg/main.c26
-rw-r--r--src/firejail/main.c1
-rw-r--r--src/man/firecfg.txt2
4 files changed, 87 insertions, 9 deletions
diff --git a/src/firecfg/firecfg.config b/src/firecfg/firecfg.config
index fb996966f..13bcc5110 100644
--- a/src/firecfg/firecfg.config
+++ b/src/firecfg/firecfg.config
@@ -1,7 +1,74 @@
1# /etc/firejail/firecfg.config - firecfg utility configuration file 1# /etc/firejail/firecfg.config - firecfg utility configuration file
2# This is the list of programs handled by firecfg utility 2# This is the list of programs handled by firecfg utility
3# 3#
4
5# browsers/email
4firefox 6firefox
5iceweasel 7iceweasel
8chromium-browser
9chromium
10conkeror
6thunderbird 11thunderbird
12epiphany
13flashpeak-slimjet
14google-chrome-beta
15google-chrome-stable
16google-chrome-unstable
17google-chrome
18icecat
19icedove
20kmail
21midori
22opera-beta
23opera
24qutebrowser
25seamonkey
26seamonkey-bin
27vivaldi-beta
28vivaldi
29
30# bittorrent/ftp
31deluge
32filezilla
33qbittorrent
34rtorrent
35tranmission-gtk
36transmission-qt
37
38# office
39cherrytree
40evince
41fbreader
42localc
43lodraw
44loffice
45lofromtemplate
46loimpress
47lomath
48loweb
49lowriter
50Mathematica
51mathematica
52
53# Media
7vlc 54vlc
55audacious
56clementine
57deadbeef
58parole
59rhythmbox
60totem
61
62# chat/messaging
63bitlbee
64empathy
65gnome-mplayer
66hexchat
67pidgin
68qtox
69quassel
70xchat
71
72# games
73hedgewars
74wesnot
diff --git a/src/firecfg/main.c b/src/firecfg/main.c
index 7465f2d3e..0c6b278b5 100644
--- a/src/firecfg/main.c
+++ b/src/firecfg/main.c
@@ -30,7 +30,7 @@ static void usage(void) {
30 printf("Firecfg is the desktop configuration utility for Firejail software. The utility\n"); 30 printf("Firecfg is the desktop configuration utility for Firejail software. The utility\n");
31 printf("creates several symbolic links to firejail executable. This allows the user to\n"); 31 printf("creates several symbolic links to firejail executable. This allows the user to\n");
32 printf("sandbox applications automatically, just by clicking on a regular desktop\n"); 32 printf("sandbox applications automatically, just by clicking on a regular desktop\n");
33 printf("menues and icons.\n\n"); 33 printf("menus and icons.\n\n");
34 printf("The symbolic links are placed in /usr/local/bin. For more information, see\n"); 34 printf("The symbolic links are placed in /usr/local/bin. For more information, see\n");
35 printf("DESKTOP INTEGRATION section in man 1 firejail.\n\n"); 35 printf("DESKTOP INTEGRATION section in man 1 firejail.\n\n");
36 printf("Usage: firecfg [OPTIONS]\n\n"); 36 printf("Usage: firecfg [OPTIONS]\n\n");
@@ -245,21 +245,33 @@ static void set(void) {
245 lineno++; 245 lineno++;
246 if (*buf == '#') // comments 246 if (*buf == '#') // comments
247 continue; 247 continue;
248
249 // do not accept .. and/or / in file name
250 if (strstr(buf, "..") || strchr(buf, '/')) {
251 fprintf(stderr, "Error: invalid line %d in %s\n", lineno, cfgfile);
252 exit(1);
253 }
248 254
249 // remove \n 255 // remove \n
250 char *ptr = strchr(buf, '\n'); 256 char *ptr = strchr(buf, '\n');
251 if (ptr) 257 if (ptr)
252 *ptr = '\0'; 258 *ptr = '\0';
259
260 // trim spaces
261 ptr = buf;
262 while (*ptr == ' ' || *ptr == '\t')
263 ptr++;
264 char *start = ptr;
253 265
254 // do not accept .. and/or / in file name 266 // empty line
255 if (strstr(buf, "..") || strchr(buf, '/')) { 267 if (*start == '\0')
256 fprintf(stderr, "Error: invalid line %d in %s\n", lineno, cfgfile); 268 continue;
257 exit(1);
258 }
259 269
260 set_file(buf, firejail_exec); 270 // set link
271 set_file(start, firejail_exec);
261 } 272 }
262 273
274 fclose(fp);
263 free(cfgfile); 275 free(cfgfile);
264 free(firejail_exec); 276 free(firejail_exec);
265} 277}
diff --git a/src/firejail/main.c b/src/firejail/main.c
index 612d9c667..1f8907e4c 100644
--- a/src/firejail/main.c
+++ b/src/firejail/main.c
@@ -2041,7 +2041,6 @@ int main(int argc, char **argv) {
2041 gid_t audiogid = get_audio_gid(); 2041 gid_t audiogid = get_audio_gid();
2042 if (ttygid) { 2042 if (ttygid) {
2043 sprintf(ptr, "%d %d 1\n", audiogid, audiogid); 2043 sprintf(ptr, "%d %d 1\n", audiogid, audiogid);
2044 ptr += strlen(ptr);
2045 } 2044 }
2046 2045
2047 EUID_ROOT(); 2046 EUID_ROOT();
diff --git a/src/man/firecfg.txt b/src/man/firecfg.txt
index 7d95892a4..a97e5b76f 100644
--- a/src/man/firecfg.txt
+++ b/src/man/firecfg.txt
@@ -7,7 +7,7 @@ firecfg [OPTIONS]
7Firecfg is the desktop configuration utility for Firejail software. The utility 7Firecfg is the desktop configuration utility for Firejail software. The utility
8creates several symbolic links to firejail executable. This allows the user to 8creates several symbolic links to firejail executable. This allows the user to
9sandbox applications automatically, just by clicking on a regular desktop 9sandbox applications automatically, just by clicking on a regular desktop
10menues and icons. 10menus and icons.
11 11
12The symbolic links are placed in /usr/local/bin. For more information, see 12The symbolic links are placed in /usr/local/bin. For more information, see
13DESKTOP INTEGRATION section in man 1 firejail. 13DESKTOP INTEGRATION section in man 1 firejail.