Commit graph

8608 commits

Author SHA1 Message Date
Kelvin M. Klann
891fd02701 build: add new TARNAME variable
That expands to `@PACKAGE_TARNAME@`, similar to the existing
PACKAGE_TARNAME variable.

To make it easier to use (and read) and to be more consistent with the
surrounding variables (NAME and VERSION).

Note that the original PACKAGE_TARNAME is still needed, as by default
(on autoconf v2.69) `docdir=@docdir@` in config.mk.in expands to the
following in config.mk:

    docdir=${datarootdir}/doc/${PACKAGE_TARNAME}
2022-08-14 02:17:39 -03:00
Kelvin M. Klann
9a45c34fc7 build: rename DOCDIR to docdir
To match other similar variables, such as datarootdir and mandir.
2022-08-13 23:38:53 -03:00
Kelvin M. Klann
3bb8064677 config.mk.in: move basic variables to the top
Move up the variables that are defined in the `AC_INIT` call on
configure.ac.

And put VERSION last, to match the usual `$(NAME)-$(VERSION)` usage.
2022-08-13 23:38:32 -03:00
Kelvin M. Klann
0d200264b1 config.mk.in: move CC variable near CFLAGS
Move it to the bottom, near other compilation-related flags.
2022-08-13 17:06:56 -03:00
Kelvin M. Klann
40c0f3cff6 RELNOTES: add build items
Relates to #5283 #5284.
2022-08-12 03:43:18 -03:00
Hugo Osvaldo Barrera
d7c31bdbfe neomutt: Avoid creating empty files/directories
neomutt won't write to these locations. Processes it spawns might read
to some of them, but creating an empty file doesn't help. This just
pollutes user's $HOME with empty files and directories.

I've kept a few paths that MAY be written to by neomutt; it's not ideal,
but I want to minimise the risk of potential data loss, even if it is
corener cases.

See: https://github.com/netblue30/firejail/discussions/5276
2022-08-11 21:33:17 +00:00
Kelvin M. Klann
06c4359399
Merge pull request #5284 from kmk3/build-config-sh-fixes
build: config.sh.in: quote variables and fix shellcheck issues
2022-08-11 21:17:52 +00:00
Kelvin M. Klann
9a37b90514
Merge pull request #5283 from remyabel2/make-uninstall
build: Add files `make uninstall` forgot to remove
2022-08-11 21:15:13 +00:00
Christopher Morrow
72eac26725
fix(audacity): !5281 sharedlib bug on Arch/Fedora (#5300)
* fix(audacity): !5281 sharedlib bug on Arch/Fedora

removed `private-bin` line from audacity profile as it appears to block
access to shared libraries needed to start audacity on some
distributions.

Relates to github issue #5281

* fix(audacity): Disabling apparmor and reenabling private-bin
2022-08-10 23:00:54 +00:00
Kelvin M. Klann
56c2f82802
Merge pull request #5299 from pirate486743186/description-makepkg
makepkg: add description
2022-08-10 20:12:04 +00:00
pirate486743186
f9500a5602 makepkg.profile: add description 2022-08-10 11:33:07 +02:00
glitsj16
b18120cc2e
new profile: gdu (#5289)
* add gdu to 'new profiles' section

* Create gdu.profile

* add gdu to firecfg

* harden gdu sandbox

* fix protocol

* simulate empty protocol in gdu

* more user-friendly gdu sandboxing
2022-08-09 21:11:18 +00:00
dependabot[bot]
4b9f6af9f8 build(deps): bump github/codeql-action from 2.1.17 to 2.1.18
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.1.17 to 2.1.18.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](0c670bbf04...2ca79b6fa8)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-08 16:19:32 +00:00
dependabot[bot]
316749ae46 build(deps): bump github/codeql-action from 2.1.16 to 2.1.17
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.1.16 to 2.1.17.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](3e7e3b32d0...0c670bbf04)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-03 16:43:02 +00:00
Kelvin M. Klann
f08c378d5a config.sh.in: fix all issues reported by shellcheck
Fix the following error and warnings:

    $ shellcheck --version | grep ^version:
    version: 0.8.0
    $ shellcheck config.sh.in

    In config.sh.in line 1:
    # @configure_input@
    ^-- SC2148 (error): Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.

    In config.sh.in line 3:
    NAME=@PACKAGE_NAME@
    ^--^ SC2034 (warning): NAME appears unused. Verify use (or export if used externally).

    In config.sh.in line 4:
    VERSION=@PACKAGE_VERSION@
    ^-----^ SC2034 (warning): VERSION appears unused. Verify use (or export if used externally).

    For more information:
      https://www.shellcheck.net/wiki/SC2148 -- Tips depend on target shell and y...
      https://www.shellcheck.net/wiki/SC2034 -- NAME appears unused. Verify use (...

Relates to #5140.
2022-08-01 20:33:10 -03:00
Kelvin M. Klann
f1f40cbaa3 config.sh.in: quote all variables
Output variables in general may contain values with spaces in them.
Example: `CC=gcc -foo`.

Relates to #5140.
2022-08-01 20:31:39 -03:00
Kelvin M. Klann
74b5d24ba3 RELNOTES: add build and ci items
Relates to #5248 #5249 #5251.
2022-08-01 10:07:34 -03:00
Kelvin M. Klann
86c0c2d507 RELNOTES: add feature: Warn when encountering EIO during remount
Relates to #5240 #5242.
2022-08-01 10:06:55 -03:00
Tommy Nguyen
77208e0beb
Add files make uninstall forgot to remove
There were a couple of files leftover after `make uninstall`. This
patch fixes that.
2022-08-01 07:46:51 -04:00
smitsohu
06d3fd0581
Merge pull request #5259 from smitsohu/ns
introduce new option restrict-namespaces
2022-07-31 20:06:37 +02:00
smitsohu
95f8cc7b8d
Merge pull request #5271 from smitsohu/nnp
improve force-nonewprivs security guarantees
2022-07-31 20:05:51 +02:00
smitsohu
f986753277
Merge pull request #5251 from kmk3/build-add-autoconf-comment
build: add autoconf auto-generation comment to input files
2022-07-31 20:05:07 +02:00
smitsohu
b90516d4a0
Merge pull request #5249 from kmk3/ci-ignore-git-paths
ci: ignore git-related paths and the project license
2022-07-31 20:04:20 +02:00
smitsohu
00b2db8c8f
Merge pull request #5248 from kmk3/build-gitignore-distdir
build: add dist build directory to .gitignore
2022-07-31 20:03:34 +02:00
Reiner Herrmann
a724bbd991 update m4 macro from autoconf-archive (2022.02.11) 2022-07-31 02:05:35 +02:00
Reiner Herrmann
364a5659c9
Merge pull request #5275 from netblue30/ci_ubuntu_2204
CI: bump ubuntu to 22.04 and use newer compilers / analyzers
2022-07-30 11:07:38 +02:00
Reiner Herrmann
53f0b39507 CI: keep old cppcheck job and ignore two files in new job that take too long to check 2022-07-30 10:49:28 +02:00
Reiner Herrmann
cfc8547883 CI: bump ubuntu to 22.04 and use newer compilers / analyzers 2022-07-30 10:49:26 +02:00
Reiner Herrmann
c971903de0 tests: disable calling curl in dns test, as systemd-resolved is used on CI runner 2022-07-30 10:48:33 +02:00
Reiner Herrmann
4221b15f93 tests: try curl instead of wget for tracing dns resolution 2022-07-30 10:48:33 +02:00
Reiner Herrmann
b4f4444862 tests: add alternative message for skipping test 2022-07-30 10:48:33 +02:00
Reiner Herrmann
e1cb7ce296 tests: drop checking for hosts file in trace test
firejail is no longer detecting that /etc/hosts is getting opened.
in strace it can still be seen that the file is opened via syscall,
but on C library layer (which firejail is tracing) it's probably
implemented differently now.
2022-07-30 10:48:33 +02:00
Reiner Herrmann
057f431b0a CI: fix wrong matching for test errors
grep was returning non-zero exit code if it did NOT find the
error marker, and zero if it did.
2022-07-30 10:48:33 +02:00
Reiner Herrmann
eb20f52ef5 Make list of paths const to fix a false positive of gcc analyzer 2022-07-30 10:48:33 +02:00
Reiner Herrmann
e47bc3bc14 zero-initialize two variables 2022-07-30 10:48:33 +02:00
Reiner Herrmann
3a5954c128 CI: build all jobs with apparmor / selinux to cover more code 2022-07-30 10:48:30 +02:00
smitsohu
2cfd4dafc5 improve force-nonewprivs security guarantees 2022-07-24 20:39:23 +02:00
Tad
89441e48e8 Deny Tor related profiles access to /sys/class/net
This directory contains the MAC address for connections available

Tested working with torbrowser-launcher and onionshare

Signed-off-by: Tad <tad@spotco.us>
2022-07-23 13:18:13 -04:00
smitsohu
87afef810c introduce new option restrict-namespaces 2022-07-23 16:21:14 +02:00
NetSysFire
0ba8ed88b9
viewnior.profile: allow accessing its /usr/share directory (#5270) 2022-07-23 14:17:17 +00:00
dependabot[bot]
4780c47785 build(deps): bump github/codeql-action from 2.1.15 to 2.1.16
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.1.15 to 2.1.16.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](3f62b754e2...3e7e3b32d0)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-22 07:18:45 +00:00
smitsohu
8c627c37e7 apparmor cleanup 2022-07-20 16:21:01 +02:00
smitsohu
214ac20849 protocol filter: add x32 ABI handling 2022-07-19 14:58:32 +02:00
NetSysFire
fb87e9a4d9
remmina.profile: allow python3 (#5253)
* remmina.profile: allow python

* Update etc/profile-m-z/remmina.profile

Co-authored-by: rusty-snake <41237666+rusty-snake@users.noreply.github.com>

Co-authored-by: rusty-snake <41237666+rusty-snake@users.noreply.github.com>
2022-07-17 21:36:20 +00:00
smitsohu
f4f44a5f96 refresh syscall groups (#5188)
now covers syscalls up to including process_madvise (440)

group assignment was blindly copied from systemd:
729d2df806/src/shared/seccomp-util.c (L305)

the only exception is close_range, which was added to both @basic-io and @file-system

this commit adds the following syscalls to the default blacklist:
pidfd_getfd,fsconfig,fsmount,fsopen,fspick,move_mount,open_tree
2022-07-17 17:05:36 +02:00
Kelvin M. Klann
8fc604f5f0 build: add autoconf auto-generation comment to input files
To note on the output files that they are generated and to clarify how
they are generated.

From the manual of GNU Autoconf (version 2.69):

>  -- Variable: configure_input
>      A comment saying that the file was generated automatically by
>      'configure' and giving the name of the input file.  'AC_OUTPUT'
>      adds a comment line containing this variable to the top of every
>      makefile it creates.  For other files, you should reference this
>      variable in a comment at the top of each input file.  For
>      example, an input shell script should begin like this:
>
>           #!/bin/sh
>           # @configure_input@
>
>      The presence of that line also reminds people editing the file
>      that it needs to be processed by 'configure' in order to be used.

Resulting output on config.mk:

    # config.mk.  Generated from config.mk.in by configure.

Relates to #5140.
2022-07-16 01:07:40 -03:00
smitsohu
fbceab90a9 refresh and sort syscall tables
produced using commands documented in src/lib/syscall.c:
awk '/__NR_/ { print "{ \"" gensub("__NR_", "", "g", $2) "\", " $3 " },"; }' < /usr/include/x86_64-linux-gnu/asm/unistd_64.h
awk '/__NR_/ { print "{ \"" gensub("__NR_", "", "g", $2) "\", " $3 " },"; }' < /usr/include/x86_64-linux-gnu/asm/unistd_32.h
2022-07-15 16:22:35 +02:00
Kelvin M. Klann
f46b6c09df ci: ignore git-related paths and the project license
Add the following paths to the ignore lists:

- .git-blame-ignore-revs
- .gitignore
- COPYING

To avoid running CI unnecessarily.

Commands used to show only the root files:

    $ git ls-files | grep -v /

Misc: I noticed the missing paths on #5248.
2022-07-12 18:56:11 -03:00
Kelvin M. Klann
30d55f030b build: add dist build directory to .gitignore
Ignore it only on the repository root path, as a directory that matches
`firejail-*` could eventually be added.

Note that the dist archive is already ignored since commit da6b131c3
("chore(.gitignore) ignore built packages", 2018-01-15) / PR #1733.

Example paths:

* build dir: firejail-0.9.71/
* archive:   firejail-0.9.71.tar.xz

See `$(NAME)-$(VERSION)` and `$(NAME)-$(VERSION).tar.xz` in the "dist"
target on the root Makefile.
2022-07-12 17:14:31 -03:00
Kelvin M. Klann
c9019bfd04 RELNOTES: add build items (plus commands)
The following leverages the fact that when using a normal merge (as
opposed to "rebase and merge" or "squash and merge") on GitHub, the pull
request number is put in the commit message title and the title of the
PR is added to the commit message body.

Commands used to find and print the items for the RELNOTES:

    $ git log --grep='^build:' --merges --reverse --pretty='%s %b' 0.9.70.. |
      sed -E -n 's/Merge pull request (#[0-9]+) from [^ ]+ (.*)/  * \2 (\1)/p'
      * build: deduplicate configure-time vars into new config files (#5140)
      * build: fix file mode of shell scripts (644 -> 755) (#5206)
      * build: reduce autoconf input files from 32 to 2 (#5219)

Commands used to generate the message below:

    $ git log --grep='^build:' --merges --reverse --pretty='%s %b' 0.9.70.. |
      sed -E -n 's/Merge pull request (#[0-9]+).*/\1/p' | sort | tr '\n' ' ' |
      sed -E 's/^(.*) /Relates to \1./'
    Relates to #5140 #5206 #5219.

Relates to #5140 #5206 #5219.
2022-07-12 18:05:36 +00:00