NVIDIA / enroot

A simple yet powerful tool to turn traditional container/OS images into unprivileged sandboxes.
Apache License 2.0
648 stars 94 forks source link

`enroot.conf` executed unexpectedly when doing `enroot --help` #210

Open astrophys opened 1 month ago

astrophys commented 1 month ago

If I set my enroot.conf to be point to non-existent directories :

ENROOT_RUNTIME_PATH /home/user/Scratch/silly/runtime
ENROOT_CACHE_PATH /home/user/Scratch/silly/cache
ENROOT_DATA_PATH /home/user/Scratch/silly/data
.
.
.

And then I do a read-only operation with enroot, e.g.

enroot --help

The above RUNTIME, CACHE and DATA directories get created.

This is unexpected and surprising behavior since running --help on almost all Linux commands is a safe, read-only operation. In the case of enroot, it reads the enroot.conf and then proceeds to create directories, even for a read-only operation like enroot --help.