aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.in211
-rw-r--r--RELNOTES1
-rw-r--r--etc/cpio.profile2
-rw-r--r--etc/file.profile1
-rw-r--r--etc/gtar.profile2
-rw-r--r--etc/gzip.profile2
-rw-r--r--etc/less.profile2
-rw-r--r--etc/strings.profile2
-rw-r--r--etc/tar.profile1
-rw-r--r--etc/unrar.profile1
-rw-r--r--etc/unzip.profile1
-rw-r--r--etc/uudeview.profile2
-rw-r--r--etc/xz.profile1
-rw-r--r--etc/xzdec.profile2
-rwxr-xr-xmketc.sh20
-rw-r--r--src/firejail/main.c34
-rw-r--r--src/firejail/profile.c14
-rw-r--r--src/man/firejail-profile.txt8
-rwxr-xr-xtest/profiles/test-profile.exp4
19 files changed, 67 insertions, 244 deletions
diff --git a/Makefile.in b/Makefile.in
index 98ecbd252..e47e109d3 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,6 +1,7 @@
1all: apps firejail.1 firemon.1 firecfg.1 firejail-profile.5 firejail-login.5 firejail-config.5 1all: apps man
2MYLIBS = src/lib 2MYLIBS = src/lib
3APPS = src/firejail src/firemon src/firecfg src/libtrace src/libtracelog src/ftee src/faudit 3APPS = src/firejail src/firemon src/firecfg src/libtrace src/libtracelog src/ftee src/faudit
4MANPAGES = firejail.1 firemon.1 firecfg.1 firejail-profile.5 firejail-login.5 firejail-config.5
4 5
5prefix=@prefix@ 6prefix=@prefix@
6exec_prefix=@exec_prefix@ 7exec_prefix=@exec_prefix@
@@ -25,27 +26,16 @@ apps: $(APPS)
25$(APPS): $(MYLIBS) 26$(APPS): $(MYLIBS)
26 $(MAKE) -C $@ 27 $(MAKE) -C $@
27 28
28firemon.1: src/man/firemon.txt 29$(MANPAGES): $(wildcard src/man/*.txt)
29 ./mkman.sh $(VERSION) src/man/firemon.txt firemon.1 30 ./mkman.sh $(VERSION) src/man/$(basename $@).txt $@
30firejail.1: src/man/firejail.txt 31
31 ./mkman.sh $(VERSION) src/man/firejail.txt firejail.1 32man: $(MANPAGES)
32firecfg.1: src/man/firecfg.txt
33 ./mkman.sh $(VERSION) src/man/firecfg.txt firecfg.1
34firejail-profile.5: src/man/firejail-profile.txt
35 ./mkman.sh $(VERSION) src/man/firejail-profile.txt firejail-profile.5
36firejail-login.5: src/man/firejail-login.txt
37 ./mkman.sh $(VERSION) src/man/firejail-login.txt firejail-login.5
38firejail-config.5: src/man/firejail-config.txt
39 ./mkman.sh $(VERSION) src/man/firejail-config.txt firejail-config.5
40 33
41clean: 34clean:
42 for dir in $(APPS); do \ 35 for dir in $(APPS) $(MYLIBS); do \
43 $(MAKE) -C $$dir clean; \
44 done
45 for dir in $(MYLIBS); do \
46 $(MAKE) -C $$dir clean; \ 36 $(MAKE) -C $$dir clean; \
47 done 37 done
48 rm -f firejail.1 firejail.1.gz firemon.1 firemon.1.gz firecfg.1 firecfg.gz firejail-profile.5 firejail-profile.5.gz firejail-login.5 firejail-login.5.gz firejail-config.5 firejail-config.5.gz firejail*.rpm 38 rm -f $(MANPAGES) $(MANPAGES:%=%.gz) firejail*.rpm
49 rm -f test/utils/index.html* 39 rm -f test/utils/index.html*
50 rm -f test/utils/wget-log 40 rm -f test/utils/wget-log
51 rm -f test/utils/lstesting 41 rm -f test/utils/lstesting
@@ -60,10 +50,7 @@ clean:
60 cd test/dist-compile; ./compile.sh --clean; cd ../.. 50 cd test/dist-compile; ./compile.sh --clean; cd ../..
61 51
62distclean: clean 52distclean: clean
63 for dir in $(APPS); do \ 53 for dir in $(APPS) $(MYLIBS); do \
64 $(MAKE) -C $$dir distclean; \
65 done
66 for dir in $(MYLIBS); do \
67 $(MAKE) -C $$dir distclean; \ 54 $(MAKE) -C $$dir distclean; \
68 done 55 done
69 rm -fr Makefile autom4te.cache config.log config.status config.h uids.h 56 rm -fr Makefile autom4te.cache config.log config.status config.h uids.h
@@ -93,169 +80,23 @@ realinstall:
93 # etc files 80 # etc files
94 ./mketc.sh $(sysconfdir) 81 ./mketc.sh $(sysconfdir)
95 install -m 0755 -d $(DESTDIR)/$(sysconfdir)/firejail 82 install -m 0755 -d $(DESTDIR)/$(sysconfdir)/firejail
96 install -c -m 0644 .etc/0ad.profile $(DESTDIR)/$(sysconfdir)/firejail/. 83 for file in .etc/* etc/firejail.config; do \
97 install -c -m 0644 .etc/Cyberfox.profile $(DESTDIR)/$(sysconfdir)/firejail/. 84 install -c -m 0644 $$file $(DESTDIR)/$(sysconfdir)/firejail; \
98 install -c -m 0644 .etc/Mathematica.profile $(DESTDIR)/$(sysconfdir)/firejail/. 85 done
99 install -c -m 0644 .etc/Telegram.profile $(DESTDIR)/$(sysconfdir)/firejail/.
100 install -c -m 0644 .etc/abrowser.profile $(DESTDIR)/$(sysconfdir)/firejail/.
101 install -c -m 0644 .etc/atom-beta.profile $(DESTDIR)/$(sysconfdir)/firejail/.
102 install -c -m 0644 .etc/atom.profile $(DESTDIR)/$(sysconfdir)/firejail/.
103 install -c -m 0644 .etc/atril.profile $(DESTDIR)/$(sysconfdir)/firejail/.
104 install -c -m 0644 .etc/audacious.profile $(DESTDIR)/$(sysconfdir)/firejail/.
105 install -c -m 0644 .etc/audacity.profile $(DESTDIR)/$(sysconfdir)/firejail/.
106 install -c -m 0644 .etc/aweather.profile $(DESTDIR)/$(sysconfdir)/firejail/.
107 install -c -m 0644 .etc/bitlbee.profile $(DESTDIR)/$(sysconfdir)/firejail/.
108 install -c -m 0644 .etc/brave.profile $(DESTDIR)/$(sysconfdir)/firejail/.
109 install -c -m 0644 .etc/cherrytree.profile $(DESTDIR)/$(sysconfdir)/firejail/.
110 install -c -m 0644 .etc/chromium-browser.profile $(DESTDIR)/$(sysconfdir)/firejail/.
111 install -c -m 0644 .etc/chromium.profile $(DESTDIR)/$(sysconfdir)/firejail/.
112 install -c -m 0644 .etc/clementine.profile $(DESTDIR)/$(sysconfdir)/firejail/.
113 install -c -m 0644 .etc/cmus.profile $(DESTDIR)/$(sysconfdir)/firejail/.
114 install -c -m 0644 .etc/conkeror.profile $(DESTDIR)/$(sysconfdir)/firejail/.
115 install -c -m 0644 .etc/corebird.profile $(DESTDIR)/$(sysconfdir)/firejail/.
116 install -c -m 0644 .etc/cpio.profile $(DESTDIR)/$(sysconfdir)/firejail/.
117 install -c -m 0644 .etc/cyberfox.profile $(DESTDIR)/$(sysconfdir)/firejail/.
118 install -c -m 0644 .etc/deadbeef.profile $(DESTDIR)/$(sysconfdir)/firejail/.
119 install -c -m 0644 .etc/default.profile $(DESTDIR)/$(sysconfdir)/firejail/.
120 install -c -m 0644 .etc/deluge.profile $(DESTDIR)/$(sysconfdir)/firejail/.
121 install -c -m 0644 .etc/dillo.profile $(DESTDIR)/$(sysconfdir)/firejail/.
122 install -c -m 0644 .etc/disable-common.inc $(DESTDIR)/$(sysconfdir)/firejail/.
123 install -c -m 0644 .etc/disable-devel.inc $(DESTDIR)/$(sysconfdir)/firejail/.
124 install -c -m 0644 .etc/disable-passwdmgr.inc $(DESTDIR)/$(sysconfdir)/firejail/.
125 install -c -m 0644 .etc/disable-programs.inc $(DESTDIR)/$(sysconfdir)/firejail/.
126 install -c -m 0644 .etc/dnscrypt-proxy.profile $(DESTDIR)/$(sysconfdir)/firejail/.
127 install -c -m 0644 .etc/dnsmasq.profile $(DESTDIR)/$(sysconfdir)/firejail/.
128 install -c -m 0644 .etc/dropbox.profile $(DESTDIR)/$(sysconfdir)/firejail/.
129 install -c -m 0644 .etc/empathy.profile $(DESTDIR)/$(sysconfdir)/firejail/.
130 install -c -m 0644 .etc/eom.profile $(DESTDIR)/$(sysconfdir)/firejail/.
131 install -c -m 0644 .etc/epiphany.profile $(DESTDIR)/$(sysconfdir)/firejail/.
132 install -c -m 0644 .etc/evince.profile $(DESTDIR)/$(sysconfdir)/firejail/.
133 install -c -m 0644 .etc/fbreader.profile $(DESTDIR)/$(sysconfdir)/firejail/.
134 install -c -m 0644 .etc/file.profile $(DESTDIR)/$(sysconfdir)/firejail/.
135 install -c -m 0644 .etc/filezilla.profile $(DESTDIR)/$(sysconfdir)/firejail/.
136 install -c -m 0644 .etc/firefox-esr.profile $(DESTDIR)/$(sysconfdir)/firejail/.
137 install -c -m 0644 .etc/firefox.profile $(DESTDIR)/$(sysconfdir)/firejail/.
138 install -c -m 0644 .etc/flashpeak-slimjet.profile $(DESTDIR)/$(sysconfdir)/firejail/.
139 install -c -m 0644 .etc/franz.profile $(DESTDIR)/$(sysconfdir)/firejail/.
140 install -c -m 0644 .etc/gitter.profile $(DESTDIR)/$(sysconfdir)/firejail/.
141 install -c -m 0644 .etc/gnome-mplayer.profile $(DESTDIR)/$(sysconfdir)/firejail/.
142 install -c -m 0644 .etc/google-chrome-beta.profile $(DESTDIR)/$(sysconfdir)/firejail/.
143 install -c -m 0644 .etc/google-chrome-stable.profile $(DESTDIR)/$(sysconfdir)/firejail/.
144 install -c -m 0644 .etc/google-chrome-unstable.profile $(DESTDIR)/$(sysconfdir)/firejail/.
145 install -c -m 0644 .etc/google-chrome.profile $(DESTDIR)/$(sysconfdir)/firejail/.
146 install -c -m 0644 .etc/google-play-music-desktop-player.profile $(DESTDIR)/$(sysconfdir)/firejail/.
147 install -c -m 0644 .etc/gpredict.profile $(DESTDIR)/$(sysconfdir)/firejail/.
148 install -c -m 0644 .etc/gtar.profile $(DESTDIR)/$(sysconfdir)/firejail/.
149 install -c -m 0644 .etc/gthumb.profile $(DESTDIR)/$(sysconfdir)/firejail/.
150 install -c -m 0644 .etc/gwenview.profile $(DESTDIR)/$(sysconfdir)/firejail/.
151 install -c -m 0644 .etc/gzip.profile $(DESTDIR)/$(sysconfdir)/firejail/.
152 install -c -m 0644 .etc/hedgewars.profile $(DESTDIR)/$(sysconfdir)/firejail/.
153 install -c -m 0644 .etc/hexchat.profile $(DESTDIR)/$(sysconfdir)/firejail/.
154 install -c -m 0644 .etc/icecat.profile $(DESTDIR)/$(sysconfdir)/firejail/.
155 install -c -m 0644 .etc/icedove.profile $(DESTDIR)/$(sysconfdir)/firejail/.
156 install -c -m 0644 .etc/iceweasel.profile $(DESTDIR)/$(sysconfdir)/firejail/.
157 install -c -m 0644 .etc/jitsi.profile $(DESTDIR)/$(sysconfdir)/firejail/.
158 install -c -m 0644 .etc/kmail.profile $(DESTDIR)/$(sysconfdir)/firejail/.
159 install -c -m 0644 .etc/konversation.profile $(DESTDIR)/$(sysconfdir)/firejail/.
160 install -c -m 0644 .etc/less.profile $(DESTDIR)/$(sysconfdir)/firejail/.
161 install -c -m 0644 .etc/libreoffice.profile $(DESTDIR)/$(sysconfdir)/firejail/.
162 install -c -m 0644 .etc/localc.profile $(DESTDIR)/$(sysconfdir)/firejail/.
163 install -c -m 0644 .etc/lodraw.profile $(DESTDIR)/$(sysconfdir)/firejail/.
164 install -c -m 0644 .etc/loffice.profile $(DESTDIR)/$(sysconfdir)/firejail/.
165 install -c -m 0644 .etc/lofromtemplate.profile $(DESTDIR)/$(sysconfdir)/firejail/.
166 install -c -m 0644 .etc/loimpress.profile $(DESTDIR)/$(sysconfdir)/firejail/.
167 install -c -m 0644 .etc/lomath.profile $(DESTDIR)/$(sysconfdir)/firejail/.
168 install -c -m 0644 .etc/loweb.profile $(DESTDIR)/$(sysconfdir)/firejail/.
169 install -c -m 0644 .etc/lowriter.profile $(DESTDIR)/$(sysconfdir)/firejail/.
170 install -c -m 0644 .etc/lxterminal.profile $(DESTDIR)/$(sysconfdir)/firejail/.
171 install -c -m 0644 .etc/mathematica.profile $(DESTDIR)/$(sysconfdir)/firejail/.
172 install -c -m 0644 .etc/mcabber.profile $(DESTDIR)/$(sysconfdir)/firejail/.
173 install -c -m 0644 .etc/midori.profile $(DESTDIR)/$(sysconfdir)/firejail/.
174 install -c -m 0644 .etc/mpv.profile $(DESTDIR)/$(sysconfdir)/firejail/.
175 install -c -m 0644 .etc/mupen64plus.profile $(DESTDIR)/$(sysconfdir)/firejail/.
176 install -c -m 0644 .etc/netsurf.profile $(DESTDIR)/$(sysconfdir)/firejail/.
177 install -c -m 0644 .etc/nolocal.net $(DESTDIR)/$(sysconfdir)/firejail/.
178 install -c -m 0644 .etc/okular.profile $(DESTDIR)/$(sysconfdir)/firejail/.
179 install -c -m 0644 .etc/openbox.profile $(DESTDIR)/$(sysconfdir)/firejail/.
180 install -c -m 0644 .etc/opera-beta.profile $(DESTDIR)/$(sysconfdir)/firejail/.
181 install -c -m 0644 .etc/opera.profile $(DESTDIR)/$(sysconfdir)/firejail/.
182 install -c -m 0644 .etc/palemoon.profile $(DESTDIR)/$(sysconfdir)/firejail/.
183 install -c -m 0644 .etc/parole.profile $(DESTDIR)/$(sysconfdir)/firejail/.
184 install -c -m 0644 .etc/pidgin.profile $(DESTDIR)/$(sysconfdir)/firejail/.
185 install -c -m 0644 .etc/pix.profile $(DESTDIR)/$(sysconfdir)/firejail/.
186 install -c -m 0644 .etc/polari.profile $(DESTDIR)/$(sysconfdir)/firejail/.
187 install -c -m 0644 .etc/psi-plus.profile $(DESTDIR)/$(sysconfdir)/firejail/.
188 install -c -m 0644 .etc/qbittorrent.profile $(DESTDIR)/$(sysconfdir)/firejail/.
189 install -c -m 0644 .etc/qtox.profile $(DESTDIR)/$(sysconfdir)/firejail/.
190 install -c -m 0644 .etc/quassel.profile $(DESTDIR)/$(sysconfdir)/firejail/.
191 install -c -m 0644 .etc/quiterss.profile $(DESTDIR)/$(sysconfdir)/firejail/.
192 install -c -m 0644 .etc/qutebrowser.profile $(DESTDIR)/$(sysconfdir)/firejail/.
193 install -c -m 0644 .etc/rhythmbox.profile $(DESTDIR)/$(sysconfdir)/firejail/.
194 install -c -m 0644 .etc/rtorrent.profile $(DESTDIR)/$(sysconfdir)/firejail/.
195 install -c -m 0644 .etc/seamonkey-bin.profile $(DESTDIR)/$(sysconfdir)/firejail/.
196 install -c -m 0644 .etc/seamonkey.profile $(DESTDIR)/$(sysconfdir)/firejail/.
197 install -c -m 0644 .etc/server.profile $(DESTDIR)/$(sysconfdir)/firejail/.
198 install -c -m 0644 .etc/skype.profile $(DESTDIR)/$(sysconfdir)/firejail/.
199 install -c -m 0644 .etc/skypeforlinux.profile $(DESTDIR)/$(sysconfdir)/firejail/.
200 install -c -m 0644 .etc/snap.profile $(DESTDIR)/$(sysconfdir)/firejail/.
201 install -c -m 0644 .etc/soffice.profile $(DESTDIR)/$(sysconfdir)/firejail/.
202 install -c -m 0644 .etc/spotify.profile $(DESTDIR)/$(sysconfdir)/firejail/.
203 install -c -m 0644 .etc/ssh.profile $(DESTDIR)/$(sysconfdir)/firejail/.
204 install -c -m 0644 .etc/steam.profile $(DESTDIR)/$(sysconfdir)/firejail/.
205 install -c -m 0644 .etc/stellarium.profile $(DESTDIR)/$(sysconfdir)/firejail/.
206 install -c -m 0644 .etc/strings.profile $(DESTDIR)/$(sysconfdir)/firejail/.
207 install -c -m 0644 .etc/tar.profile $(DESTDIR)/$(sysconfdir)/firejail/.
208 install -c -m 0644 .etc/telegram.profile $(DESTDIR)/$(sysconfdir)/firejail/.
209 install -c -m 0644 .etc/thunderbird.profile $(DESTDIR)/$(sysconfdir)/firejail/.
210 install -c -m 0644 .etc/totem.profile $(DESTDIR)/$(sysconfdir)/firejail/.
211 install -c -m 0644 .etc/transmission-gtk.profile $(DESTDIR)/$(sysconfdir)/firejail/.
212 install -c -m 0644 .etc/transmission-qt.profile $(DESTDIR)/$(sysconfdir)/firejail/.
213 install -c -m 0644 .etc/uget-gtk.profile $(DESTDIR)/$(sysconfdir)/firejail/.
214 install -c -m 0644 .etc/unbound.profile $(DESTDIR)/$(sysconfdir)/firejail/.
215 install -c -m 0644 .etc/unrar.profile $(DESTDIR)/$(sysconfdir)/firejail/.
216 install -c -m 0644 .etc/unzip.profile $(DESTDIR)/$(sysconfdir)/firejail/.
217 install -c -m 0644 .etc/uudeview.profile $(DESTDIR)/$(sysconfdir)/firejail/.
218 install -c -m 0644 .etc/vivaldi-beta.profile $(DESTDIR)/$(sysconfdir)/firejail/.
219 install -c -m 0644 .etc/vivaldi.profile $(DESTDIR)/$(sysconfdir)/firejail/.
220 install -c -m 0644 .etc/vlc.profile $(DESTDIR)/$(sysconfdir)/firejail/.
221 install -c -m 0644 .etc/warzone2100.profile $(DESTDIR)/$(sysconfdir)/firejail/.
222 install -c -m 0644 .etc/webserver.net $(DESTDIR)/$(sysconfdir)/firejail/.
223 install -c -m 0644 .etc/weechat-curses.profile $(DESTDIR)/$(sysconfdir)/firejail/.
224 install -c -m 0644 .etc/weechat.profile $(DESTDIR)/$(sysconfdir)/firejail/.
225 install -c -m 0644 .etc/wesnoth.profile $(DESTDIR)/$(sysconfdir)/firejail/.
226 install -c -m 0644 .etc/whitelist-common.inc $(DESTDIR)/$(sysconfdir)/firejail/.
227 install -c -m 0644 .etc/wine.profile $(DESTDIR)/$(sysconfdir)/firejail/.
228 install -c -m 0644 .etc/xchat.profile $(DESTDIR)/$(sysconfdir)/firejail/.
229 install -c -m 0644 .etc/xplayer.profile $(DESTDIR)/$(sysconfdir)/firejail/.
230 install -c -m 0644 .etc/xreader.profile $(DESTDIR)/$(sysconfdir)/firejail/.
231 install -c -m 0644 .etc/xviewer.profile $(DESTDIR)/$(sysconfdir)/firejail/.
232 install -c -m 0644 .etc/xz.profile $(DESTDIR)/$(sysconfdir)/firejail/.
233 install -c -m 0644 .etc/xzdec.profile $(DESTDIR)/$(sysconfdir)/firejail/.
234 sh -c "if [ ! -f $(DESTDIR)/$(sysconfdir)/firejail/login.users ]; then install -c -m 0644 etc/login.users $(DESTDIR)/$(sysconfdir)/firejail/.; fi;" 86 sh -c "if [ ! -f $(DESTDIR)/$(sysconfdir)/firejail/login.users ]; then install -c -m 0644 etc/login.users $(DESTDIR)/$(sysconfdir)/firejail/.; fi;"
235 install -c -m 0644 etc/firejail.config $(DESTDIR)/$(sysconfdir)/firejail/.
236 rm -fr .etc 87 rm -fr .etc
237 # man pages 88 # man pages
238 rm -f firejail.1.gz
239 gzip -9n firejail.1
240 rm -f firemon.1.gz
241 gzip -9n firemon.1
242 rm -f firecfg.1.gz
243 gzip -9n firecfg.1
244 rm -f firejail-profile.5.gz
245 gzip -9n firejail-profile.5
246 rm -f firejail-login.5.gz
247 gzip -9n firejail-login.5
248 rm -f firejail-config.5.gz
249 gzip -9n firejail-config.5
250 install -m 0755 -d $(DESTDIR)/$(mandir)/man1 89 install -m 0755 -d $(DESTDIR)/$(mandir)/man1
251 install -c -m 0644 firejail.1.gz $(DESTDIR)/$(mandir)/man1/.
252 install -c -m 0644 firemon.1.gz $(DESTDIR)/$(mandir)/man1/.
253 install -c -m 0644 firecfg.1.gz $(DESTDIR)/$(mandir)/man1/.
254 install -m 0755 -d $(DESTDIR)/$(mandir)/man5 90 install -m 0755 -d $(DESTDIR)/$(mandir)/man5
255 install -c -m 0644 firejail-profile.5.gz $(DESTDIR)/$(mandir)/man5/. 91 for man in $(MANPAGES); do \
256 install -c -m 0644 firejail-login.5.gz $(DESTDIR)/$(mandir)/man5/. 92 rm -f $$man.gz; \
257 install -c -m 0644 firejail-config.5.gz $(DESTDIR)/$(mandir)/man5/. 93 gzip -9n $$man; \
258 rm -f firejail.1.gz firemon.1.gz firecfg.1.gz firejail-profile.5.gz firejail-login.5.gz firejail-config.5.gz 94 case "$$man" in \
95 *.1) install -c -m 0644 $$man.gz $(DESTDIR)/$(mandir)/man1/; ;; \
96 *.5) install -c -m 0644 $$man.gz $(DESTDIR)/$(mandir)/man5/; ;; \
97 esac; \
98 done
99 rm -f $(MANPAGES) $(MANPAGES:%=%.gz)
259 # bash completion 100 # bash completion
260 install -m 0755 -d $(DESTDIR)/$(datarootdir)/bash-completion/completions 101 install -m 0755 -d $(DESTDIR)/$(datarootdir)/bash-completion/completions
261 install -c -m 0644 src/bash_completion/firejail.bash_completion $(DESTDIR)/$(datarootdir)/bash-completion/completions/firejail 102 install -c -m 0644 src/bash_completion/firejail.bash_completion $(DESTDIR)/$(datarootdir)/bash-completion/completions/firejail
@@ -281,12 +122,10 @@ uninstall:
281 rm -f $(DESTDIR)/$(bindir)/firecfg 122 rm -f $(DESTDIR)/$(bindir)/firecfg
282 rm -fr $(DESTDIR)/$(libdir)/firejail 123 rm -fr $(DESTDIR)/$(libdir)/firejail
283 rm -fr $(DESTDIR)/$(datarootdir)/doc/firejail 124 rm -fr $(DESTDIR)/$(datarootdir)/doc/firejail
284 rm -f $(DESTDIR)/$(mandir)/man1/firejail.1* 125 for man in $(MANPAGES); do \
285 rm -f $(DESTDIR)/$(mandir)/man1/firemon.1* 126 rm -f $(DESTDIR)/$(mandir)/man5/$$man*; \
286 rm -f $(DESTDIR)/$(mandir)/man1/firecfg.1* 127 rm -f $(DESTDIR)/$(mandir)/man1/$$man*; \
287 rm -f $(DESTDIR)/$(mandir)/man5/firejail-profile.5* 128 done
288 rm -f $(DESTDIR)/$(mandir)/man5/firejail-login.5*
289 rm -f $(DESTDIR)/$(mandir)/man5/firejail-config.5*
290 rm -f $(DESTDIR)/$(datarootdir)/bash-completion/completions/firejail 129 rm -f $(DESTDIR)/$(datarootdir)/bash-completion/completions/firejail
291 rm -f $(DESTDIR)/$(datarootdir)/bash-completion/completions/firemon 130 rm -f $(DESTDIR)/$(datarootdir)/bash-completion/completions/firemon
292 rm -f $(DESTDIR)/$(datarootdir)/bash-completion/completions/firecfg 131 rm -f $(DESTDIR)/$(datarootdir)/bash-completion/completions/firecfg
diff --git a/RELNOTES b/RELNOTES
index a4fc92671..3bdd21caa 100644
--- a/RELNOTES
+++ b/RELNOTES
@@ -9,6 +9,7 @@ firejail (0.9.42~rc2) baseline; urgency=low
9 * Ubuntu snap support 9 * Ubuntu snap support
10 * include /dev/snd in --private-dev 10 * include /dev/snd in --private-dev
11 * added mkfile profile command 11 * added mkfile profile command
12 * added quiet profile command
12 * recursive mkdir 13 * recursive mkdir
13 * seccomp filter updated 14 * seccomp filter updated
14 * compile time and run time support to disable whitelists 15 * compile time and run time support to disable whitelists
diff --git a/etc/cpio.profile b/etc/cpio.profile
index b4d232496..5772c7368 100644
--- a/etc/cpio.profile
+++ b/etc/cpio.profile
@@ -1,7 +1,7 @@
1# cpio profile 1# cpio profile
2# /sbin and /usr/sbin are visible inside the sandbox 2# /sbin and /usr/sbin are visible inside the sandbox
3# /boot is not visible and /var is heavily modified 3# /boot is not visible and /var is heavily modified
4 4quiet
5noblacklist /sbin 5noblacklist /sbin
6noblacklist /usr/sbin 6noblacklist /usr/sbin
7include /etc/firejail/disable-common.inc 7include /etc/firejail/disable-common.inc
diff --git a/etc/file.profile b/etc/file.profile
index 1569b42c7..c2d7b0b0f 100644
--- a/etc/file.profile
+++ b/etc/file.profile
@@ -1,4 +1,5 @@
1# file profile 1# file profile
2quiet
2ignore noroot 3ignore noroot
3include /etc/firejail/default.profile 4include /etc/firejail/default.profile
4 5
diff --git a/etc/gtar.profile b/etc/gtar.profile
index 5dbc550f6..2f675cd9d 100644
--- a/etc/gtar.profile
+++ b/etc/gtar.profile
@@ -1 +1,3 @@
1# gtar profile
2quiet
1include /etc/firejail/tar.profile 3include /etc/firejail/tar.profile
diff --git a/etc/gzip.profile b/etc/gzip.profile
index cc19e7608..ce4aa3c4b 100644
--- a/etc/gzip.profile
+++ b/etc/gzip.profile
@@ -1,4 +1,6 @@
1# gzip profile 1# gzip profile
2quiet
3ignore noroot
2include /etc/firejail/default.profile 4include /etc/firejail/default.profile
3tracelog 5tracelog
4net none 6net none
diff --git a/etc/less.profile b/etc/less.profile
index 0c43111d7..802e4196d 100644
--- a/etc/less.profile
+++ b/etc/less.profile
@@ -1,4 +1,6 @@
1# less profile 1# less profile
2quiet
3ignore noroot
2include /etc/firejail/default.profile 4include /etc/firejail/default.profile
3tracelog 5tracelog
4net none 6net none
diff --git a/etc/strings.profile b/etc/strings.profile
index 881edf4ad..6ebe81d09 100644
--- a/etc/strings.profile
+++ b/etc/strings.profile
@@ -1,4 +1,6 @@
1# strings profile 1# strings profile
2quiet
3ignore noroot
2include /etc/firejail/default.profile 4include /etc/firejail/default.profile
3tracelog 5tracelog
4net none 6net none
diff --git a/etc/tar.profile b/etc/tar.profile
index 769a3cd4e..6daa7396a 100644
--- a/etc/tar.profile
+++ b/etc/tar.profile
@@ -1,4 +1,5 @@
1# tar profile 1# tar profile
2quiet
2ignore noroot 3ignore noroot
3include /etc/firejail/default.profile 4include /etc/firejail/default.profile
4 5
diff --git a/etc/unrar.profile b/etc/unrar.profile
index 74079e7b9..e941a8f2a 100644
--- a/etc/unrar.profile
+++ b/etc/unrar.profile
@@ -1,4 +1,5 @@
1# unrar profile 1# unrar profile
2quiet
2ignore noroot 3ignore noroot
3include /etc/firejail/default.profile 4include /etc/firejail/default.profile
4 5
diff --git a/etc/unzip.profile b/etc/unzip.profile
index 502839b98..ab69e932e 100644
--- a/etc/unzip.profile
+++ b/etc/unzip.profile
@@ -1,4 +1,5 @@
1# unzip profile 1# unzip profile
2quiet
2ignore noroot 3ignore noroot
3include /etc/firejail/default.profile 4include /etc/firejail/default.profile
4 5
diff --git a/etc/uudeview.profile b/etc/uudeview.profile
index 8218ac959..f6fe0abf1 100644
--- a/etc/uudeview.profile
+++ b/etc/uudeview.profile
@@ -1,5 +1,7 @@
1# uudeview profile 1# uudeview profile
2# the default profile will disable root user, enable seccomp filter etc. 2# the default profile will disable root user, enable seccomp filter etc.
3quiet
4ignore noroot
3include /etc/firejail/default.profile 5include /etc/firejail/default.profile
4 6
5tracelog 7tracelog
diff --git a/etc/xz.profile b/etc/xz.profile
index 709585acd..5b29f7338 100644
--- a/etc/xz.profile
+++ b/etc/xz.profile
@@ -1,2 +1,3 @@
1# xz profile 1# xz profile
2quiet
2include /etc/firejail/cpio.profile 3include /etc/firejail/cpio.profile
diff --git a/etc/xzdec.profile b/etc/xzdec.profile
index ddf2061bf..3692160e6 100644
--- a/etc/xzdec.profile
+++ b/etc/xzdec.profile
@@ -1,4 +1,6 @@
1# xzdec profile 1# xzdec profile
2quiet
3ignore noroot
2include /etc/firejail/default.profile 4include /etc/firejail/default.profile
3tracelog 5tracelog
4net none 6net none
diff --git a/mketc.sh b/mketc.sh
index f44238968..94fad8f10 100755
--- a/mketc.sh
+++ b/mketc.sh
@@ -2,23 +2,7 @@
2rm -fr .etc 2rm -fr .etc
3mkdir .etc 3mkdir .etc
4 4
5result=$(echo $1 | sed 's/\//\\\//g') 5for file in etc/*.profile etc/*.inc etc/*.net;
6echo $result
7
8FILES=`ls etc/*.profile`
9for file in $FILES
10do
11 sed "s/\/etc\/firejail/$result\/firejail/g" $file > .$file
12done
13
14FILES=`ls etc/*.inc`
15for file in $FILES
16do
17 sed "s/\/etc\/firejail/$result\/firejail/g" $file > .$file
18done
19
20FILES=`ls etc/*.net`
21for file in $FILES
22do 6do
23 sed "s/\/etc\/firejail/$result\/firejail/g" $file > .$file 7 sed "s;/etc/firejail;$1/firejail;g" $file > .$file
24done 8done
diff --git a/src/firejail/main.c b/src/firejail/main.c
index d5ac7ad1d..8bb438ba4 100644
--- a/src/firejail/main.c
+++ b/src/firejail/main.c
@@ -697,20 +697,6 @@ static void delete_x11_file(pid_t pid) {
697 697
698static void detect_quiet(int argc, char **argv) { 698static void detect_quiet(int argc, char **argv) {
699 int i; 699 int i;
700 char *progs[] = {
701 "less",
702 "cpio",
703 "strings",
704 "gzip",
705 "xz",
706 "xzdec",
707 "file",
708 "gtar",
709 "tar",
710 "unrar",
711 "unzip",
712 NULL
713 };
714 700
715 // detect --quiet 701 // detect --quiet
716 for (i = 1; i < argc; i++) { 702 for (i = 1; i < argc; i++) {
@@ -725,26 +711,6 @@ static void detect_quiet(int argc, char **argv) {
725 if (strncmp(argv[i], "--", 2) != 0) 711 if (strncmp(argv[i], "--", 2) != 0)
726 break; 712 break;
727 } 713 }
728
729 // argv[i] is the program name if --quiet was not already detected
730 if (arg_quiet || i == argc)
731 return;
732
733 // extract the name of the program without the leading path
734 char *ptr = strrchr(argv[i], '/');
735 char *name = (ptr)? (ptr + 1): argv[i];
736 if (*name == '\0')
737 return;
738
739 // look for the program in the list
740 int j = 0;
741 while (progs[j] != NULL) {
742 if (strcmp(name, progs[j]) == 0) {
743 arg_quiet = 1;
744 return;
745 }
746 j++;
747 }
748} 714}
749 715
750//******************************************* 716//*******************************************
diff --git a/src/firejail/profile.c b/src/firejail/profile.c
index 46ef0921d..8c2970639 100644
--- a/src/firejail/profile.c
+++ b/src/firejail/profile.c
@@ -817,8 +817,7 @@ void profile_read(const char *fname) {
817 exit(1); 817 exit(1);
818 } 818 }
819 819
820 if (!arg_quiet) 820 int msg_printed = 0;
821 fprintf(stderr, "Reading profile %s\n", fname);
822 821
823 // read the file line by line 822 // read the file line by line
824 char buf[MAX_READ + 1]; 823 char buf[MAX_READ + 1];
@@ -836,6 +835,17 @@ void profile_read(const char *fname) {
836 continue; 835 continue;
837 } 836 }
838 837
838 // process quiet
839 if (strcmp(ptr, "quiet") == 0) {
840 arg_quiet = 1;
841 continue;
842 }
843 if (!msg_printed) {
844 if (!arg_quiet)
845 fprintf(stderr, "Reading profile %s\n", fname);
846 msg_printed = 1;
847 }
848
839 // process include 849 // process include
840 if (strncmp(ptr, "include ", 8) == 0) { 850 if (strncmp(ptr, "include ", 8) == 0) {
841 include_level++; 851 include_level++;
diff --git a/src/man/firejail-profile.txt b/src/man/firejail-profile.txt
index 7e33a6b45..b6908dd00 100644
--- a/src/man/firejail-profile.txt
+++ b/src/man/firejail-profile.txt
@@ -93,11 +93,17 @@ If the file name matches file_name, the file will not be blacklisted in any blac
93Example: "noblacklist ${HOME}/.mozilla" 93Example: "noblacklist ${HOME}/.mozilla"
94 94
95.TP 95.TP
96\fBignore command 96\fBignore
97Ignore command. 97Ignore command.
98 98
99Example: "ignore seccomp" 99Example: "ignore seccomp"
100 100
101.TP
102\fBquiet
103Disable Firejail's output. This should be the first uncommented command in the profile file.
104
105Example: "quiet"
106
101.SH Filesystem 107.SH Filesystem
102These profile entries define a chroot filesystem built on top of the existing 108These profile entries define a chroot filesystem built on top of the existing
103host filesystem. Each line describes a file element that is removed from 109host filesystem. Each line describes a file element that is removed from
diff --git a/test/profiles/test-profile.exp b/test/profiles/test-profile.exp
index 590b42652..a6b4a5aad 100755
--- a/test/profiles/test-profile.exp
+++ b/test/profiles/test-profile.exp
@@ -13,10 +13,10 @@ if { $argc != 1 } {
13 exit 13 exit
14} 14}
15 15
16send -- "firejail --profile=$argv /bin/bash\r" 16send -- "firejail --profile=$argv echo done\r"
17expect { 17expect {
18 timeout {puts "TESTING ERROR 0\n";exit} 18 timeout {puts "TESTING ERROR 0\n";exit}
19 "Child process initialized" 19 "done"
20} 20}
21send -- "exit\r" 21send -- "exit\r"
22after 100 22after 100