Commit Graph

5 Commits

Author SHA1 Message Date
bfc22c79e0 Implemented the passthrough.
Passthrough is usable now. There have been issues with the `access`
operation: it's unclear what it must return, since the answer isn't
known at the time when it is called. If it always returns "denied", many
applications would finish without trying to open a file, thinking the
access would not be granted after `access` call. Although always
returning "permitted" seems like a better choice, it still might cause unexpected
behaviour. Perhaps one way to solve this, is actually asking user
whether to allow access. In any case, this issue needs to be looked
into.
2024-12-17 10:11:59 +01:00
1ddbef6a65 Used the libfuse example as a foundation.
The main.c was completely replaced by one of the libfuse examples:
[passthrough_fh.c](https://github.com/libfuse/libfuse/blob/master/example/passthrough_fh.c)
. This choice is made based on that there is little point in spending
time on reinventing the wheel by reimplementing passthrough all over
again. Also, the [passthrough_hp.cc](https://github.com/libfuse/libfuse/blob/master/example/passthrough_hp.cc) wasn't used because it uses a vastly different and much more comlex API, even though the authors claim it to be faster.
2024-12-15 15:41:28 +01:00
3e2aeea810 Added opendir and readdir. 2024-12-03 18:10:50 +01:00
8fcfebe3f9 Implemented getattr and source_stat.
Now filesystem implements getattr through source_stat,
which is a wrapper for an fstatat with
`dirfd == handle.root_path`.
2024-11-20 10:32:33 +01:00
e48cbc62f1 Added source files initialization.
Now source files handling is delegated to functions defined
in `sourcefs.c` file. By encapsulating methods for managing
the underlying source files structure we ensure that all
code changes to the source file protection strategy will be
localized to `sourcefs.c` file.

Also changed Makefile to use more sane way of handling
options and build flags.
2024-11-20 09:28:20 +01:00