From 719129ea4ea10ce6677cfb2d92b1cec974ca649f Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Thu, 14 Apr 2016 09:53:02 +0200 Subject: [PATCH] honor acl setting with zfs --- debian/changelog | 2 ++ src/PVE/LXC.pm | 11 +++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 8486c5f..c63467c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,8 @@ pve-container (1.0-61) unstable; urgency=medium * Debian: correctly setup getty service on systemd based containers + * honor acl setting with zfs + -- Proxmox Support Team Wed, 20 Apr 2016 11:25:34 +0200 pve-container (1.0-60) unstable; urgency=medium diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm index fe97d31..ea68b71 100644 --- a/src/PVE/LXC.pm +++ b/src/PVE/LXC.pm @@ -1039,8 +1039,9 @@ sub mountpoint_mount { die "unknown snapshot path for '$volid'" if !$storage && defined($snapname); my $optstring = ''; - if (defined($mountpoint->{acl})) { - $optstring .= ($mountpoint->{acl} ? 'acl' : 'noacl'); + my $acl = $mountpoint->{acl}; + if (defined($acl)) { + $optstring .= ($acl ? 'acl' : 'noacl'); } my $readonly = $mountpoint->{ro}; @@ -1067,6 +1068,12 @@ sub mountpoint_mount { die "cannot mount subvol snapshots for storage type '$scfg->{type}'\n"; } } else { + if (defined($acl) && $scfg->{type} eq 'zfspool') { + my $acltype = ($acl ? 'acltype=posixacl' : 'acltype=noacl'); + my (undef, $name) = PVE::Storage::parse_volname($storage_cfg, $volid); + $name .= "\@$snapname" if defined($snapname); + PVE::Tools::run_command(['zfs', 'set', $acltype, "$scfg->{pool}/$name"]); + } bindmount($path, $mount_path, $readonly, @extra_opts); warn "cannot enable quota control for bind mounted subvolumes\n" if $quota; } -- 2.39.2