Skip to content

Commit

Permalink
Merge branch 'master' into fix-include-limits-h
Browse files Browse the repository at this point in the history
  • Loading branch information
netblue30 authored Oct 9, 2021
2 parents 579f856 + c57199a commit 44c15b6
Show file tree
Hide file tree
Showing 46 changed files with 414 additions and 211 deletions.
21 changes: 17 additions & 4 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ assignees: ''

---

<!--
See the following links for help with formatting:
https://guides.github.com/features/mastering-markdown/
https://docs.github.com/en/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax
-->

### Description

_Describe the bug_
Expand All @@ -15,7 +22,7 @@ _Describe the bug_

_Steps to reproduce the behavior_

1. Run in bash `LANG=C firejail PROGRAM` (`LANG=C` to get English messages that can be understood by everybody)
1. Run in bash `LC_ALL=C firejail PROGRAM` (`LC_ALL=C` to get a consistent output in English that can be understood by everybody)
2. Click on '....'
3. Scroll down to '....'
4. See error `ERROR`
Expand All @@ -30,7 +37,7 @@ _What actually happened_

### Behavior without a profile

_What changed calling `firejail --noprofile /path/to/program` in a terminal?_
_What changed calling `LC_ALL=C firejail --noprofile /path/to/program` in a terminal?_

### Additional context

Expand All @@ -44,6 +51,12 @@ _Any other detail that may help to understand/debug the problem_

### Checklist

<!--
Note: Items are checked with an "x", like so:
- [x] This is a checked item.
-->

- [ ] The issues is caused by firejail (i.e. running the program by path (e.g. `/usr/bin/vlc`) "fixes" it).
- [ ] I can reproduce the issue without custom modifications (e.g. globals.local).
- [ ] The program has a profile. (If not, request one in `https://github.com/netblue30/firejail/issues/1139`)
Expand All @@ -55,7 +68,7 @@ _Any other detail that may help to understand/debug the problem_
### Log

<details>
<summary>Output of <code>firejail /path/to/program</code></summary>
<summary>Output of <code>LC_ALL=C firejail /path/to/program</code></summary>
<p>

```
Expand All @@ -66,7 +79,7 @@ output goes here
</details>

<details>
<summary>Output of <code>firejail --debug /path/to/program</code></summary>
<summary>Output of <code>LC_ALL=C firejail --debug /path/to/program</code></summary>
<p>

```
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,4 +267,5 @@ $ ./profstats *.profile

### New profiles:

clion-eap, lifeograph, io.github.lainsce.Notejot, rednotebook, zim, microsoft-edge-beta, ncdu2, gallery-dl, yt-dlp
clion-eap, lifeograph, io.github.lainsce.Notejot, rednotebook, zim, microsoft-edge-beta, ncdu2, gallery-dl, yt-dlp, goldendict, bundle,
cmake, make, meson, pip, codium
5 changes: 4 additions & 1 deletion RELNOTES
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
firejail (0.9.67) baseline; urgency=low
* work in progress
* exit code: distinguish fatal signals by adding 128
* deprecated --disable-whitelist at compile time
* deprecated whitelist=yes/no in /etc/firejail/firejail.config
* new condition: ALLOW_TRAY
* remove (some) environment variables with auth-tokens
* new includes: whitelist-run-common.inc, disable-X11.inc
* removed includes: disable-passwordmgr.inc
* new profiles: microsoft-edge-beta, clion-eap, lifeograph, zim
* new profiles: io.github.lainsce.Notejot, rednotebook, gallery-dl
* new profiles: yt-dlp
* new profiles: yt-dlp, goldendict, goldendict, bundle, cmake
* new profiles: make, meson, pip, codium
-- netblue30 <netblue30@yahoo.com> Thu, 29 Jul 2021 09:00:00 -0500

firejail (0.9.66) baseline; urgency=low
Expand Down
2 changes: 1 addition & 1 deletion contrib/vim/syntax/firejail.vim
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ syn match fjCommandNoCond /quiet$/ contained

" Conditionals grabbed from: src/firejail/profile.c
" Generate list with: awk -- 'BEGIN {process=0;} /^Cond conditionals\[\] = \{$/ {process=1;} /\t*\{"[^"]+".*/ { if (process) {print gensub(/^\t*\{"([^"]+)".*$/, "\\1", 1);} } /^\t\{ NULL, NULL \}$/ {process=0;}' src/firejail/profile.c | sort -u | tr $'\n' '|'
syn match fjConditional /\v\?(BROWSER_ALLOW_DRM|BROWSER_DISABLE_U2F|HAS_APPIMAGE|HAS_NET|HAS_NODBUS|HAS_NOSOUND|HAS_X11) ?:/ nextgroup=fjCommand skipwhite contained
syn match fjConditional /\v\?(ALLOW_TRAY|BROWSER_ALLOW_DRM|BROWSER_DISABLE_U2F|HAS_APPIMAGE|HAS_NET|HAS_NODBUS|HAS_NOSOUND|HAS_X11) ?:/ nextgroup=fjCommand skipwhite contained

" A line is either a command, a conditional or a comment
syn match fjStatement /^/ nextgroup=fjCommand,fjCommandNoCond,fjConditional,fjComment
Expand Down
3 changes: 3 additions & 0 deletions etc/firejail.config
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
# keyword-argument pairs, one per line. Most features are enabled by default.
# Use 'yes' or 'no' as configuration values.

# Allow programs to display a tray icon
# allow-tray no

# Enable AppArmor functionality, default enabled.
# apparmor yes

Expand Down
5 changes: 4 additions & 1 deletion etc/inc/allow-common-devel.inc
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,8 @@ noblacklist ${HOME}/.python-history
noblacklist ${HOME}/.python_history
noblacklist ${HOME}/.pythonhist

# Ruby
noblacklist ${HOME}/.bundle

# Rust
noblacklist ${HOME}/.cargo/*
noblacklist ${HOME}/.cargo
1 change: 1 addition & 0 deletions etc/inc/allow-ruby.inc
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ include allow-ruby.local

noblacklist ${PATH}/ruby
noblacklist /usr/lib/ruby
noblacklist /usr/lib64/ruby
1 change: 1 addition & 0 deletions etc/inc/disable-interpreters.inc
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ blacklist /usr/share/php*
# Ruby
blacklist ${PATH}/ruby
blacklist /usr/lib/ruby
blacklist /usr/lib64/ruby

# Programs using python: deluge, firefox addons, filezilla, cherrytree, xchat, hexchat, libreoffice, scribus
# Python 2
Expand Down
5 changes: 4 additions & 1 deletion etc/inc/disable-programs.inc
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ blacklist ${HOME}/.bibletime
blacklist ${HOME}/.bitcoin
blacklist ${HOME}/.blobby
blacklist ${HOME}/.bogofilter
blacklist ${HOME}/.bundle
blacklist ${HOME}/.bzf
blacklist ${HOME}/.cargo/*
blacklist ${HOME}/.cargo
blacklist ${HOME}/.claws-mail
blacklist ${HOME}/.cliqz
blacklist ${HOME}/.clion*
Expand Down Expand Up @@ -142,6 +143,7 @@ blacklist ${HOME}/.config/SubDownloader
blacklist ${HOME}/.config/Thunar
blacklist ${HOME}/.config/Twitch
blacklist ${HOME}/.config/Unknown Organization
blacklist ${HOME}/.config/VSCodium
blacklist ${HOME}/.config/VirtualBox
blacklist ${HOME}/.config/Whalebird
blacklist ${HOME}/.config/Wire
Expand Down Expand Up @@ -496,6 +498,7 @@ blacklist ${HOME}/.frogatto
blacklist ${HOME}/.frozen-bubble
blacklist ${HOME}/.funnyboat
blacklist ${HOME}/.gallery-dl.conf
blacklist ${HOME}/.geekbench5
blacklist ${HOME}/.gimp*
blacklist ${HOME}/.gist
blacklist ${HOME}/.gitconfig
Expand Down
1 change: 1 addition & 0 deletions etc/profile-a-l/amule.profile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ nosound
notv
nou2f
novideo
# Add netlink protocol to use UPnP
protocol unix,inet,inet6
seccomp
shell none
Expand Down
66 changes: 66 additions & 0 deletions etc/profile-a-l/build-systems-common.profile
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Firejail profile for build-systems-common
# This file is overwritten after every install/update
# Persistent local customizations
include build-systems-common.local
# Persistent global definitions
# added by caller profile
#include globals.local

ignore noexec ${HOME}
ignore noexec /tmp

# Allow /bin/sh (blacklisted by disable-shell.inc)
include allow-bin-sh.inc

# Allows files commonly used by IDEs
include allow-common-devel.inc

# Allow ssh (blacklisted by disable-common.inc)
#include allow-ssh.inc

blacklist ${RUNUSER}

include disable-common.inc
include disable-exec.inc
include disable-interpreters.inc
include disable-programs.inc
include disable-shell.inc
include disable-X11.inc
include disable-xdg.inc

#whitelist ${HOME}/Projects
#include whitelist-common.inc

whitelist /usr/share/pkgconfig
include whitelist-run-common.inc
include whitelist-usr-share-common.inc
include whitelist-var-common.inc

caps.drop all
ipc-namespace
machine-id
# net none
netfilter
no3d
nodvd
nogroups
noinput
nonewprivs
noroot
nosound
notv
nou2f
novideo
protocol unix,inet,inet6
seccomp
seccomp.block-secondary
shell none
tracelog

disable-mnt
private-cache
private-dev
private-tmp

dbus-user none
dbus-system none
23 changes: 23 additions & 0 deletions etc/profile-a-l/bundle.profile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Firejail profile for bundle
# Description: Ruby Dependency Management
# This file is overwritten after every install/update
quiet
# Persistent local customizations
include bundle.local
# Persistent global definitions
include globals.local

noblacklist ${HOME}/.bundle

# Allow ruby (blacklisted by disable-interpreters.inc)
include allow-ruby.inc

#whitelist ${HOME}/.bundle
#whitelist ${HOME}/.gem
#whitelist ${HOME}/.local/share/gem
whitelist /usr/share/gems
whitelist /usr/share/ruby
whitelist /usr/share/rubygems

# Redirect
include build-systems-common.profile
56 changes: 4 additions & 52 deletions etc/profile-a-l/cargo.profile
Original file line number Diff line number Diff line change
Expand Up @@ -7,66 +7,18 @@ include cargo.local
# Persistent global definitions
include globals.local

ignore noexec ${HOME}
ignore noexec /tmp

blacklist /tmp/.X11-unix
blacklist ${RUNUSER}
ignore read-only ${HOME}/.cargo/bin

noblacklist ${HOME}/.cargo/credentials
noblacklist ${HOME}/.cargo/credentials.toml

# Allows files commonly used by IDEs
include allow-common-devel.inc

# Allow ssh (blacklisted by disable-common.inc)
#include allow-ssh.inc

include disable-common.inc
include disable-exec.inc
include disable-interpreters.inc
include disable-programs.inc
include disable-xdg.inc

#mkdir ${HOME}/.cargo
#whitelist ${HOME}/YOUR_CARGO_PROJECTS
#whitelist ${HOME}/.cargo
#whitelist ${HOME}/.rustup
#include whitelist-common.inc
whitelist /usr/share/pkgconfig
include whitelist-runuser-common.inc
include whitelist-usr-share-common.inc
include whitelist-var-common.inc

caps.drop all
ipc-namespace
machine-id
netfilter
no3d
nodvd
nogroups
noinput
nonewprivs
noroot
nosound
notv
nou2f
novideo
protocol unix,inet,inet6
seccomp
seccomp.block-secondary
shell none
tracelog

disable-mnt
#private-bin cargo,rustc
private-cache
private-dev
private-etc alternatives,ca-certificates,crypto-policies,group,host.conf,hostname,hosts,ld.so.cache,ld.so.conf,ld.so.conf.d,ld.so.preload,locale,locale.alias,locale.conf,localtime,magic,magic.mgc,nsswitch.conf,passwd,pki,protocols,resolv.conf,rpc,services,ssl
private-tmp

dbus-user none
dbus-system none

memory-deny-write-execute
read-write ${HOME}/.cargo/bin

# Redirect
include build-systems-common.profile
12 changes: 12 additions & 0 deletions etc/profile-a-l/cheese.profile
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,24 @@ include globals.local
noblacklist ${VIDEOS}
noblacklist ${PICTURES}

include allow-python3.inc

include disable-common.inc
include disable-devel.inc
include disable-exec.inc
include disable-interpreters.inc
include disable-programs.inc
include disable-shell.inc
include disable-xdg.inc

whitelist ${VIDEOS}
whitelist ${PICTURES}
whitelist /run/udev/data
whitelist /usr/libexec/gstreamer-1.0/gst-plugin-scanner
whitelist /usr/share/gnome-video-effects
whitelist /usr/share/gstreamer-1.0
include whitelist-common.inc
include whitelist-run-common.inc
include whitelist-runuser-common.inc
include whitelist-usr-share-common.inc
include whitelist-var-common.inc
Expand All @@ -30,21 +37,26 @@ machine-id
net none
nodvd
nogroups
noinput
nonewprivs
noroot
nosound
notv
nou2f
protocol unix
seccomp
seccomp.block-secondary
shell none
tracelog

disable-mnt
private-bin cheese
private-cache
private-dev
private-etc alternatives,clutter-1.0,dconf,drirc,fonts,gtk-3.0,ld.so.preload
private-tmp

dbus-user filter
dbus-user.own org.gnome.Cheese
dbus-user.talk ca.desrt.dconf
dbus-system none
13 changes: 13 additions & 0 deletions etc/profile-a-l/cmake.profile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Firejail profile for cargo
# Description: The Rust package manager
# This file is overwritten after every install/update
quiet
# Persistent local customizations
include cargo.local
# Persistent global definitions
include globals.local

memory-deny-write-execute

# Redirect
include build-systems-common.profile
Loading

0 comments on commit 44c15b6

Please sign in to comment.