105 Commits

Author SHA1 Message Date
BritishTeapot
da37376fde Added permission checks for chmod, link, rename and chown
Those clearly need to ask for permissions.
2025-03-24 17:11:01 +01:00
BritishTeapot
6342de0dd3 Added tests to Makefile 2025-03-24 16:28:56 +01:00
BritishTeapot
2e21ae7b18 Deleted a useless file. 2025-03-18 16:50:53 +01:00
2d76dc6596 Merge pull request 'Temp_permission_table' (#5) from Temp_permission_table into main
Reviewed-on: #5
2025-03-18 15:47:08 +01:00
BritishTeapot
b705228685 Made temporary process table work!
Temprorary permissions table now works! It needs a better way for
cleaning though.
2025-03-18 15:45:32 +01:00
BritishTeapot
fe4b8801c0 Moved permission table logic to a separate file 2025-03-18 14:02:42 +01:00
BritishTeapot
e1846440bc Merge branch 'main' into Temp_permission_table 2025-03-18 14:00:57 +01:00
BritishTeapot
47a8845013 Wrote more tests 2025-03-18 13:58:02 +01:00
BritishTeapot
b6ce683364 WIP: Added the initial process table implementation.
Wrote a basic process table implementation with CC's vectors and hash
maps. So far, it looks like it does not really work.
2025-03-18 10:07:45 +01:00
BritishTeapot
70e81d64c1 Added the CC (Convenient Containers) library.
Added the CC library for vectors and hash maps.
2025-03-18 10:05:12 +01:00
BritishTeapot
67a148c7aa Fixed inverted access control permissions bug.
Fixed an (admitedly quite silly) bug that caused the access control
descisions to be inverted.
2025-03-18 10:03:32 +01:00
BritishTeapot
c59123330f Updated .gitignore 2025-03-18 09:55:20 +01:00
730d6bc27d Merge pull request 'Testing' (#4) from Testing into main
Reviewed-on: #4
2025-03-18 09:53:25 +01:00
BritishTeapot
66fd9ed582 Updated .gitignore to exclude test remnants. 2025-03-18 09:49:30 +01:00
BritishTeapot
64abb1ed52 Added test scrpt and a mockup of zenity 2025-03-18 09:48:05 +01:00
BritishTeapot
a65d37f3bc Added testing script
Added the `test/test.bash` script that simulates user input with zenity.
Depends on `xdotool` (couldn't make `ydotool` to work)
2025-03-17 11:59:59 +01:00
3b69fd43e3 Updated README.md with recent build instructions 2025-03-17 11:11:01 +01:00
d292abbba5 Updated Makefile with pkg-config and a test target.
Makefile now gets the necessary `cflags` and `libs` compiler arguments
from `pkg-config` which increases portability and makes adding new
dependencies easier. Also added `TEST` flag, to have automated testing
in the future.
2025-03-17 11:02:07 +01:00
BritishTeapot
0cc9140aa3 Skeleton for the process tables implementation
Wrote a skeleton for the future process table implemntation. Aslo
slightly edited the ui-socket interface.
2025-03-17 10:54:01 +01:00
BritishTeapot
2fcbf500f1 Updated .gitignore 2025-03-17 10:48:59 +01:00
BritishTeapot
d7c20a5d5f Added proper license headers 2025-03-10 18:09:05 +01:00
BritishTeapot
64289b2786 Added the "Allow this time." option.
Now the user can choose the "Allow this time." option when prompted.
`ask_access` will return 2 if this option is selected. So far, only the
GUI for this feature is implemented.
2025-03-10 18:01:04 +01:00
BritishTeapot
13830ead87 Added .clang-tidy to .gitignore 2025-03-10 17:55:31 +01:00
BritishTeapot
26dcb92a6b Changed LICENSE to GPLv2
I didn't notice this at first, but the FUSE example was licensed under
GPLv2-only, not v3.
2025-03-10 17:53:47 +01:00
BritishTeapot
01cdf4094e Changed NULL to 0 in flags fields. 2025-02-11 12:09:28 +01:00
BritishTeapot
71cc127a32 Updated README.md with usage and build instructions 2025-02-10 12:02:42 +01:00
5f5b7ffda6 Separated main and operations for testing 2025-02-10 11:16:42 +01:00
93588036aa Implemented GUI with zenity
Now the program is completely functional and is using zenity dialogues.
`sources` directory was renamed to `src`. UI related stuff was moved to
`src/gui/ui`.
2025-02-07 12:42:51 +01:00
81a955888e Updated Makefile 2025-02-07 12:38:36 +01:00
BritishTeapot
8f8841c7d9 Added start window description 2025-02-03 18:13:34 +01:00
BritishTeapot
1fa6c306db Added Cambalache gui file 2025-02-03 18:12:10 +01:00
e0b69cfea1 Improved ui socket and made open and create send requests. 2024-12-25 17:07:52 +01:00
3cbe520916 Edited Makefile to compite ui socket. 2024-12-25 17:06:56 +01:00
e2014f03f1 Basic socket communication 2024-12-25 11:00:35 +01:00
dadcc6476b Added the ui-socket.h.
Two new issues to solve:

* Should the ui communication component also be the one that manages
  permissions?
* The format of data sent (protocol) needs definition.
2024-12-20 08:48:21 +01:00
1646b2fe3f Resolved merge conflict in favor of basic-passthrough 2024-12-17 10:29:56 +01:00
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
ff6a8713d3 Removed useless comments from main.c. 2024-11-20 10:35:58 +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
424543cd99 Updated Makefile to use gcc instead of g++. 2024-11-18 18:46:30 +01:00
64aee2d9e5 Moved from C++ to C.
After some consideration I decided to use C instead of C++ because:
* `libfuse` is written in C.
* C is simpler.
* My original concerns with using C turned out to be BS.
2024-11-18 18:42:52 +01:00
5916e89e41 Added clean rule to the Makefile 2024-11-18 17:44:00 +01:00
4e9eb08d0c Fixed gitignore doing nothing 2024-11-17 20:30:09 +01:00
560bf8a7e0 Added main and .gitignore 2024-11-17 20:23:57 +01:00
5b4651c759 Reformatted README 2024-11-17 20:23:00 +01:00
b6bc440f5a Basic Makefile 2024-11-17 20:21:56 +01:00
c705f9adca Added newline to credit 2024-11-14 10:16:54 +01:00