Previously, process name was grabbed from `/proc/pid/cmdline`. This was
revealed to be faulty, since the path to the executable might be
relative, and thus would change the result depending on how the program
was called. Also, it made executable renaming a viable bypass of the
entire access control.
I still don't fully undestand how I managed to not think of this before
:)
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.
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).
Finally implemented the permanent permission tables using sqlite3. For
now, performance wasn't a consideration. There are a lot of
optimizations that could be made, like having prepared queries. The code
remains fairly untested.
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.
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`.