kushaldas / manualbox

https://manualbox.org/
GNU General Public License v3.0
13 stars 1 forks source link

Is it possible to trap file creation & deletion as well? #12

Open abhas opened 4 years ago

abhas commented 4 years ago

Right now, manualbox traps read access to the ~/secured directory. Any pointers on how the code could be extended to trap file creation, deletion, rename etc?

kushaldas commented 4 years ago

For deletion https://github.com/kushaldas/manualbox/blob/master/manualbox/__init__.py#L260

For creation https://github.com/kushaldas/manualbox/blob/master/manualbox/__init__.py#L103

You can just add https://github.com/kushaldas/manualbox/blob/master/manualbox/__init__.py#L173-L176 in both of those functions and then you can easily trap those two calls. @abhas Please let me know if you have any more query.