]> git.ipfire.org Git - thirdparty/systemd.git/commit
pull-tar: Insist on foreign UID when copying
authorDaanDeMeyer <daan.j.demeyer@gmail.com>
Fri, 26 Dec 2025 20:58:04 +0000 (21:58 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 2 Jan 2026 14:21:53 +0000 (15:21 +0100)
commit8b4278d12ec55cc3f96764bc8197e1055fbb6d3f
treeda2d9a5ac03e295e4d435bfc2deed4e3e66b0f6c
parent5fcca42f18e421867c6471e36cebf82daed33a89
pull-tar: Insist on foreign UID when copying

If we're doing foreign UID range copying, we're going to be joining
a private user namespace before doing the copy. copy_tree() insists
on keeping all UIDs/GIDs the same when copying. Hence, all the
UIDs/GIDs of the files we're copying should be in the private UID
range, which means they need to be owned by the foreign UID range
and we always need to call mountfsd_mount_directory_fd(). So there's
no point in having a fallback path if the source directory is not
foreign UID range owned, we'd simply fail to copy it later. Hence,
insist on the source directory being foreign UID range owned.
src/import/pull-tar.c