udocker icon indicating copy to clipboard operation
udocker copied to clipboard

Problems with deletes when creating image when $HOME is a symlink

Open frankier opened this issue 5 years ago • 2 comments

This is on a machine with a slightly odd set up. $HOME is set to /usr/homes/frr7/ , but /usr/homes/frr7 is just a symlink to /home/frr7 . If I apply https://github.com/indigo-dc/udocker/pull/266 and try again:

~/.udocker/bin/udocker pull vitrivr/adampro:latest-selfcontained
~/.udocker/bin/udocker create --name=adampro vitrivr/adampro:latest-selfcontained

I get:

Error: delete outside of directory tree:  /usr/homes/frr7/.udocker/containers/3e756b95-fe2f-3d53-8e95-ef01a382adea/ROOT/etc/alternatives/pager.1.gz

The problem is that /usr/homes/frr7/ is always dereferenced when adding it to the safe prefixes, so only /home/frr7/.udocker/containers/ ends up as safe. The solution is to stop dereferencing symlinks so much.

frankier avatar May 29 '20 22:05 frankier

Checking of safe paths has been improved in devel and devel3 branches

jorge-lip avatar May 13 '21 09:05 jorge-lip

Addressed in v1.3.0.

jorge-lip avatar Jun 08 '21 17:06 jorge-lip