]> git.proxmox.com Git - pve-container.git/commit
create: fix passing of template file descriptor
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Wed, 21 Mar 2018 08:57:47 +0000 (09:57 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 21 Mar 2018 11:29:33 +0000 (12:29 +0100)
commitf70a3d47a1abdb243c65a4d5060c7421c3340d5a
tree987b58f225d88f5cb15683fd39280c3486ad8174
parent63231f52d61e3f6a38b9ed0e760baae907a77516
create: fix passing of template file descriptor

This finishes the work started with 07084526aa4a ("create:
open templates as real root"), which opened templates as
real root, but passed it to tar via /proc/*/fd, which does
not actually bypass the check. (Curiously tar did manage to
figure out the file extension from it).

In order to actually extract templates the unprivileged user
cannot access by themselves, we need to pass it to tar via
stdin, however, this means tar cannot auto-detect the
compression (or more accurately, it can and does, but tells
you which option to pass it rather than just extracting
it...)

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
src/PVE/LXC/Create.pm