]> git.proxmox.com Git - pve-container.git/commit
preserve posix capabilities
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Fri, 6 Nov 2015 09:05:35 +0000 (10:05 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 6 Nov 2015 09:56:09 +0000 (10:56 +0100)
commitfc4e132e1a718a31dd7a098375ea3c24211fcebb
treef2b83390e8b6a21539458f84d0e75c719b5d5c47
parent23d928a182fdc8b0fc110a5484f14ae0a6d929db
preserve posix capabilities

POSIX capabilities are stored as security.capability xattr.
The --xattrs option alone won't store anything outside the
usernamespace, so we have to specifically ask for this
capability to be included when calling tar.
Note that we deliberately don't store the entire security
namespace as labeling by xattr is common with some security
modules and possibly a planned apparmor feature, too, so
this way we avoid restoring arbitrary lables from dumps and
templates we might not want.

Since these flags are used in two separate files I moved
them to @$PVE::LXC::COMMON_TAR_FLAGS;

The --acls flag for tar (and -A flag for rsync) have also
been added.
src/PVE/LXC.pm
src/PVE/LXC/Create.pm
src/PVE/VZDump/LXC.pm