Commit Graph

14 Commits

Author SHA1 Message Date
Simon McVittie
de4de4dc44 automake: Consistently include $(AM_CFLAGS) in target-specific CFLAGS
When built for i386 with Autotools, this would have detected the format
string issue fixed in #5148.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-10-27 09:59:43 +01:00
Simon McVittie
190bad06d2 revokefs: Remove incorrect libglnx include directory
revokefs already gets the correct include directory from the AM_CPPFLAGS.
This would also break the build with -Werror=missing-include-dirs.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-10-27 09:59:43 +01:00
Simon McVittie
959910f933 revokefs: Use correct format string for a ssize_t
This fixes the build on ILP32 architectures such as i386 with the Meson
build system. The Autotools build system accidentally didn't build
revokefs with -Werror=format, because it sets the target-specific CFLAGS
for revokefs but does not include the $(AM_CFLAGS) in them.

Fixes: aeecbb7d "revokefs: Split out the writing part from the fuse implementation"
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-10-25 10:32:50 +02:00
Simon McVittie
9eb824f863 Add a Meson build system
Resolves: https://github.com/flatpak/flatpak/issues/2241
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-10-24 16:12:14 +01:00
Phaedrus Leeds
600e18567c Add a vim modeline and .editorconfig
To make indentation work with less effort. The modeline was copied from
libostree with minor modification and the .editorconfig from GLib.

The advantage of having both a modeline and an editorconfig is we can
work out of the box on more editor setups, and the modeline allows us to
specify the style with a lot more fine grained control.
2022-08-22 19:48:10 -07:00
Simon McVittie
4018419b15 revokefs: Use FUSE version 3 if possible
Based on a change contributed by Léo Stefanesco; but instead of
unconditionally using FUSE 3, leave a fallback code path for FUSE 2 for
older distros.

Co-authored-by: Léo Stefanesco <leo.lveb@gmail.com>
Signed-off-by: Simon McVittie <smcv@collabora.com>
2022-08-16 13:27:04 +02:00
Eric Curtin
c6845ad70b Fix some warn_unused_result warnings
While building on gcc 9.3.0
2021-10-12 13:50:14 -07:00
Simon McVittie
a0eaaf77ad revokefs: Use the right variable name in an error message
scan-build detected that response_size is uninitialized here, presumably
a typo for response_data_size.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2021-04-16 14:50:27 +02:00
Alexander Larsson
84e7b19683 revokefs: Fix off-by-one array size in fuse implementation
The iovec write_vecs[] array on the stack was just 2 element, but we
sometimes use 3 elements of it. This was causing random crashes due to
corrupting the stack.

Closes: #3110
Approved by: alexlarsson
2019-09-18 07:17:43 +00:00
Ryan Gonzalez
2b93928285 revokefs-fuse: Fix some build warnings
Closes: #2952
Approved by: alexlarsson
2019-06-13 07:16:33 +00:00
Umang Jain
cd53f71f9e revokefs-fuse: Add --with-exit-fd arg to monitor parent process's exit
This is necessary so as to not leave the revokefs backend around
when the system-helper exits abruptly (e.g. OOM killer). It would
be a vulnerability if revokefs backend continues to live even after
the system-helper is killed as it might lead to write access to the
underlying directory.

Closes: #2657
Approved by: alexlarsson
2019-04-09 09:18:15 +00:00
Alexander Larsson
80249b5f4d revokefs: Add demo to show how to revoke permissions
The demo starts two instances by the same users so
the revoke doesn't really enforce any separation, but
it demos how you would do it.

Closes: #2657
Approved by: alexlarsson
2019-04-09 09:18:15 +00:00
Alexander Larsson
aeecbb7d2b revokefs: Split out the writing part from the fuse implementation
By default we just spawn a writer from the fuse implementation,
but you can also do it manually with --backend and --socket,
allowing you to start the two in different contexts.

Closes: #2657
Approved by: alexlarsson
2019-04-09 09:18:14 +00:00
Alexander Larsson
4716ce8f2e revokefs: Initial non-revoking version
This is just a copy of rofiles-fuse with the write limits removed.

Closes: #2657
Approved by: alexlarsson
2019-04-09 09:18:14 +00:00