Skip to content

Commit

Permalink
fix(sandbox): add remove_dir permissions to sandbox
Browse files Browse the repository at this point in the history
When an extraction directory is empty, unblob will try to delete it.

This can lead to PermissionError due to insufficient permissions within
the sandbox.
  • Loading branch information
qkaiser committed Jan 22, 2025
1 parent bae88df commit 001ee75
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions unblob/sandbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def __init__(
AccessFS.read_write("/dev/shm"), # noqa: S108
# Extracted contents
AccessFS.read_write(config.extract_root),
AccessFS.remove_dir(config.extract_root),
AccessFS.make_dir(config.extract_root.parent),
AccessFS.read_write(log_path),
*extra_passthrough,
Expand Down

0 comments on commit 001ee75

Please sign in to comment.