9 Commits

Author SHA1 Message Date
BritishTeapot
beec6f4a4c Changed tests to use the database file argument 2025-04-07 19:38:56 +02:00
BritishTeapot
cf2b7a280a Added a test for the database protection feature. 2025-04-01 19:52:37 +02:00
BritishTeapot
4c8092378b Added database protection with setuid.
Added the initial support for the database protection with the setuid
mechanism. In the beginning the program creates(or opens) the database
as a special user, and then switches to the real uid and functions
normally.
2025-04-01 19:34:15 +02:00
BritishTeapot
57091bf0ce Made create to grant permissions automatically.
Creating files grants permanent permissions to them now. This makes
sense because if a program creates a new file, then it clearly can't
steal any data. This is particularly useful for programs which open an
obscene amount of auxilary files (e.g. neovim with a huge amount of
plugins).
2025-03-30 19:48:11 +02:00
BritishTeapot
608943d685 Added new permanent permissions tests. 2025-03-30 19:07:32 +02:00
BritishTeapot
4ce97555e4 Fixed a testing bug
The script was correctly opening the `truth` file by piping `echo` to
it, but then it tried to deny another operation on it. But since pipes
are opened by the script process, the permission was given to the
script. And since the permissions are preserved for the entire runtime
of a process, and child processes inherit permissions of their parents,
any command executed later would also have the necessary permissions to
open `truth` (which was the case for the second operation). Now the
second operation is performed on a different file.
2025-03-24 17:17:33 +01:00
BritishTeapot
47a8845013 Wrote more tests 2025-03-18 13:58:02 +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