Repository navigation
Commit 8e35eee
fix: preserve existing directory ownership in prepare_filesystem()
prepare_filesystem() previously chowned every read_write path to
run_as_user:run_as_group unconditionally, even for directories that
already existed in the container image with intentional ownership.
This caused image authors who set root:root on a read_write directory
(to protect immutable subdirectories via DAC) to have that ownership
silently overridden at sandbox start.
Now only directories that prepare_filesystem() creates are chowned.
Pre-existing directories are left with their image-level ownership
intact.
Fixes NVIDIA#783
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>1 parent c2e5256 commit 8e35eee
1 file changed
Lines changed: 7 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1755 | 1755 | | |
1756 | 1756 | | |
1757 | 1757 | | |
| 1758 | + | |
| 1759 | + | |
| 1760 | + | |
| 1761 | + | |
| 1762 | + | |
1758 | 1763 | | |
1759 | 1764 | | |
1760 | 1765 | | |
| 1766 | + | |
| 1767 | + | |
1761 | 1768 | | |
1762 | | - | |
1763 | | - | |
1764 | | - | |
1765 | 1769 | | |
1766 | 1770 | | |
1767 | 1771 | | |
| |||
0 commit comments