Skip to content

Conversation

@dtrudg
Copy link
Member

@dtrudg dtrudg commented Aug 19, 2021

Picking #267

fix: Check for host non-root uid when setting unsquashfs flags

We were previously setting --user-xattrs / --no-xattrs based on
the current euid when calling unsquashfs. However, in a non-setuid
install --fakeroot build the euid is 0, so the flags will not be
set. On distributions other than EL / Fedora (i.e. Debian / Ubuntu
which are not selinux native), this can cause failed extraction.

Decide if we are performing a rootless extraction based on the host
uid, outside of any namespace that is in play.

Fixes: #266

We were previously setting `--user-xattrs` / `--no-xattrs` based on
the current euid when calling `unsquashfs`. However, in a non-setuid
install `--fakeroot` build the euid is 0, so the flags will not be
set. On distributions other than EL / Fedora (i.e. Debian / Ubuntu
which are not selinux native), this can cause failed extraction.

Decide if we are performing a rootless extraction based on the host
uid, outside of any namespace that is in play.

Fixes: sylabs#266
@dtrudg dtrudg added bug Something isn't working ci:e2e labels Aug 19, 2021
@dtrudg dtrudg added this to the SingularityCE 3.8.2 milestone Aug 19, 2021
@dtrudg dtrudg self-assigned this Aug 19, 2021
@dtrudg dtrudg marked this pull request as ready for review August 19, 2021 14:44
@dtrudg dtrudg merged commit 01fdd97 into sylabs:release-3.8 Aug 19, 2021
@dtrudg dtrudg deleted the pick267 branch August 19, 2021 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ci:e2e

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants