| Commit message (Collapse) | Author | Age |
| |
|
| |
|
| |
|
|\
| |
| | |
Add profiles for imv, retroarch, and torbrowser
|
| |
| |
| |
| |
| | |
imv, retroarch, and torbrowser are also added to
firecfg.config
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Removes the inconsistency that some blacklisted
paths could be remounted (files specified explicitly)
and some could not. Now all blacklisted paths can
be mounted nosuid, nodev, noexec if users
specify this.
Also fixes the bug that mount id can indeed be 0.
Other than that no functional or algorithmic changes,
only readability improvements.
|
| | |
|
| | |
|
| | |
|
|\ \
| | |
| | | |
Fix misc in get_group_id
|
| | |
| | |
| | |
| | |
| | | |
To make things clearer, since there is already a `struct group` in the
same function.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
gr_gid is of type gid_t (not uid_t). From grp.h(0p) of POSIX.1-2017:
> DESCRIPTION
>
> The <grp.h> header shall declare the group structure, which shall
> include the following members:
>
> char *gr_name The name of the group.
> gid_t gr_gid Numerical group ID.
> char **gr_mem Pointer to a null-terminated array of character
> pointers to member names.
>
> The <grp.h> header shall define the gid_t and size_t types as
> described in <sys/types.h>.
Note: The callers already store the result in gid_t variables.
First caused by commit dc3564b18 ("fixes", 2016-03-09).
|
| | |
| | |
| | |
| | |
| | | |
This amends commit 40ed53c20 ("nvidia fix", 2016-10-08) and commit
74149d248 ("fixes", 2016-03-20).
|
|\ \ \
| |/ /
|/| | |
libtrace.c: use realpath instead of readlink to avoid PATH_MAX
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
PATH_MAX is not guaranteed to be defined and it may be defined to -1.
Avoid depending on it by getting the result directly from realpath. See
commit 579f856c5 ("firejail.h: add missing linux/limits.h include") /
PR #4583 for details.
Note: This replaces the static char array currently used with a dynamic
one returned from realpath.
Misc: This is a continuation of #4583.
|
|/ /
| |
| |
| |
| |
| |
| |
| | |
Adds minimal cgroupv2 support, and fixes
an effective user id assertion in --join
(instead of asserting effective user id
of the user, drop privileges completely
in a child process).
|
| | |
|
|\ \ |
|
| |\ \ |
|
| | |\ \
| | | |/
| | |/| |
fix compilation on musl (#4578)
|
| | | | |
|
| | |\ \
| | | | |
| | | | | |
Revert "allow/deny fbuilder"
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This reverts commit 4438f14f2892b5c88d158ae8fad0a80a2eebfd44.
Also, partially revert related commit e4307b409 ("fix whitelist/allow in
make test-utils") to keep the tests working.
The profiles are being generated using aliases, which are not used on
the profiles in the repository. So generate them using the normal
commands for consistency. See also commit dd13595b8 ("Revert
"allow/deny help and man pages"") / PR #4502.
Relates to #4410.
Misc: I noticed this on issue #4592.
|
| | | | |
| | | | |
| | | | |
| | | | | |
Added on commit 9af2c1472 ("Better debug handling.").
|
| | |\ \ \
| | | | | |
| | | | | | |
Fix vscodium
|
| | | |/ /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Both base names are valid:
$ grep '^NAME' /etc/os-release
NAME="Artix Linux"
$ pacman -Q vscodium-bin
vscodium-bin 1.60.2-2
$ pacman -Qlq vscodium-bin | grep -v -e '/$' -e /resources/ |
grep /bin/
/usr/bin/codium
/usr/bin/vscodium
/usr/share/vscodium-bin/bin/codium
Note: The first two paths are symlinks to the third one.
Fixes #3871.
|
| | |\ \ \
| | | | | |
| | | | | | |
trace, tracelog: don't truncate /etc/ld.so.preload in sandbox
|
| | | | | | |
|
| | |\ \ \ \
| | | | | | |
| | | | | | | |
Add new condition ALLOW_TRAY
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
results from a systematic search for strncmp
calls with a suspicious (non-fitting) integer
literal as third argument
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Enables recursive remounting on very old kernels, which has some relevance
for SailfishOS community ports.
|
| | | |_|/ /
| | |/| | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
firejail.h uses PATH_MAX when defining a macro. Note that ARG_MAX and
PATH_MAX are not guaranteed to be (and potentially should not be)
defined. From POSIX.1-2017's limits.h(0p)[1]:
> A definition of one of the symbolic constants in the following list
> shall be omitted from the <limits.h> header on specific
> implementations where the corresponding value is equal to or greater
> than the stated minimum, but where the value can vary depending on the
> file to which it is applied. The actual value supported for a
> specific pathname shall be provided by the pathconf() function.
Use linux/limits.h instead of limits.h because glibc's limits.h
deliberately undefines ARG_MAX. See glibc commit f96853beaf
("* sysdeps/unix/sysv/linux/bits/local_lim.h: Undefined ARG_MAX if",
2008-03-27)[2].
From /usr/include/bits/local_lim.h (glibc 2.33-5 on Artix Linux):
#ifndef ARG_MAX
# define __undef_ARG_MAX
#endif
/* The kernel sources contain a file with all the needed information. */
#include <linux/limits.h>
/* [...] */
/* Have to remove ARG_MAX? */
#ifdef __undef_ARG_MAX
# undef ARG_MAX
# undef __undef_ARG_MAX
#endif
So if a file uses ARG_MAX (currently only cmdline.c) and limits.h (or a
firejail.h that includes limits.h) is included before linux/limits.h,
then the build will fail on glibc. Build log from using limits.h
(instead of linux/limits.h) on firejail.h:
$ make clean >/dev/null && make >/dev/null
cmdline.c:145:12: error: use of undeclared identifier 'ARG_MAX'; did you mean 'CFG_MAX'?
if (len > ARG_MAX) {
^~~~~~~
CFG_MAX
./firejail.h:805:2: note: 'CFG_MAX' declared here
CFG_MAX // this should always be the last entry
^
[...]
Fixes #4578.
[1] https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/limits.h.html
[2] https://sourceware.org/git/?p=glibc.git;a=commit;h=f96853beafc26d4f030961b0b67a79b5bfad5733
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
None of the files affected use any macros from linux/limits.h:
$ git grep -Fl 'NGROUPS_MAX
ARG_MAX
LINK_MAX
MAX_CANON
MAX_INPUT
NAME_MAX
PATH_MAX
PIPE_BUF
XATTR_NAME_MAX
XATTR_SIZE_MAX
XATTR_LIST_MAX
RTSIG_MAX' -- src
src/firejail/cmdline.c
src/firejail/firejail.h
src/libtrace/libtrace.c
src/libtracelog/libtracelog.c
Environment:
$ grep '^NAME' /etc/os-release
NAME="Artix Linux"
$ pacman -Qo /usr/include/linux/limits.h
/usr/include/linux/limits.h is owned by linux-api-headers 5.12.3-1
Note: This include has been present on all of the affected files since
their inception. For restrict_users.c, that's on commit 4f003daec
("prevent leaking user information by modifying /home directory,
/etc/passwd and /etc/group") and for every other file, it's on commit
137985136 ("Baseline firejail 0.9.28").
Relates to #4578.
|
| | |_|_|/
| |/| | |
| | | | |
| | | | | |
Relates to #4578.
|
| |/ / /
|/| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
They are equivalent, but only the latter is POSIX. See sys_stat.h(0p)
of POSIX.1-2017[1]. From Section 14.9.5, The Mode Bits for Access
Permission of the glibc manual[2]:
> S_IWUSR
> S_IWRITE
>
> Write permission bit for the owner of the file. Usually 0200.
> S_IWRITE is an obsolete synonym provided for BSD compatibility.
Current usage:
$ git grep -F S_IWRITE -- src | wc -l
11
$ git grep -F S_IWUSR -- src | wc -l
26
Commands used to search and replace:
$ git grep -l -z S_IWRITE -- src | xargs -0 -I '{}' sh -c \
"printf '%s\n' \"\`sed 's/S_IWRITE/S_IWUSR/g' '{}'\`\" >'{}'"
Note: The other related non-POSIX macros are not used anywhere:
$ git grep -F -e S_IREAD -e S_IEXEC -- src
$
[1] https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_stat.h.html
[2] https://www.gnu.org/software/libc/manual/html_node/Permission-Bits.html
|
|\ \ \ \
| |/ / /
|/| | | |
add more EUID improvements
|
| | |/
| |/| |
|
|/ / |
|
| |
| |
| |
| |
| | |
don't try to read /usr/bin/firejail if private-bin removed it
from the sandbox filesystem
|
| |
| |
| |
| |
| |
| | |
users, and fldd in particular, might have no read permission
on the firejail executable, make that ok by running fldd
as root
|
|\ \
| | |
| | | |
Create goldendict.profile
|
| |/ |
|
|\ \
| | |
| | | |
Add missing final newlines
|
| | | |
|
|\ \ \
| | | |
| | | | |
Remove /etc/hosts is_link check
|
| | | | |
|