LXC_SCRIPT_DIR=${PREFIX}/share/lxc
LXC_TMPL_DIR=${LXC_SCRIPT_DIR}/templates
LXC_HOOK_DIR=${LXC_SCRIPT_DIR}/hooks
-LXC_COMMON_CONFIG_DIR=${LXC_SCRIPT_DIR}/config/common.conf.d
+LXC_CONFIG_DIR=${LXC_SCRIPT_DIR}/config
+LXC_COMMON_CONFIG_DIR=${LXC_CONFIG_DIR}/common.conf.d
SERVICEDIR=${DESTDIR}/lib/systemd/system
PODDIR=${DOCDIR}/pod
MAN1DIR=${MANDIR}/man1/
make -C test
.PHONY: install
-install: pct lxc-pve.conf lxc-pve-prestart-hook lxc-pve-autodev-hook lxc-pve-poststop-hook lxcnetaddbr pct.1 pct.conf.5 pct.bash-completion
+install: pct lxc-pve.conf lxc-pve-prestart-hook lxc-pve-autodev-hook lxc-pve-poststop-hook lxcnetaddbr pct.1 pct.conf.5 pct.bash-completion pve-userns.seccomp
PVE_GENERATING_DOCS=1 perl -I. -T -e "use PVE::CLI::pct; PVE::CLI::pct->verify_api();"
install -d ${SBINDIR}
install -m 0755 pct ${SBINDIR}
install -m 0755 lxc-pve-prestart-hook ${LXC_HOOK_DIR}
install -m 0755 lxc-pve-autodev-hook ${LXC_HOOK_DIR}
install -m 0755 lxc-pve-poststop-hook ${LXC_HOOK_DIR}
+ install -d ${LXC_CONFIG_DIR}
+ install -m 0644 pve-userns.seccomp ${LXC_CONFIG_DIR}/pve-userns.seccomp
install -d ${LXC_COMMON_CONFIG_DIR}
install -m 0644 lxc-pve.conf ${LXC_COMMON_CONFIG_DIR}/01-pve.conf
install -m 0644 -D pct.bash-completion ${BASHCOMPLDIR}/pct
install -m 0644 pve-reboot.conf ${SERVICEDIR}/lxc@.service.d/
install -m 0755 lxc-pve-reboot-trigger ${LXC_SCRIPT_DIR}
+pve-userns.seccomp: /usr/share/lxc/config/common.seccomp
+ cp $< $@
+ echo 'keyctl errno 38' >> $@
+
+
.PHONY: test
test:
make -C test test
my $ostype = $conf->{ostype} || die "missing 'ostype' - internal error";
- my $inc ="/usr/share/lxc/config/$ostype.common.conf";
- $inc ="/usr/share/lxc/config/common.conf" if !-f $inc;
+ my $cfgpath = '/usr/share/lxc/config';
+ my $inc = "$cfgpath/$ostype.common.conf";
+ $inc ="$cfgpath/common.conf" if !-f $inc;
$raw .= "lxc.include = $inc\n";
if ($unprivileged || $custom_idmap) {
- $inc = "/usr/share/lxc/config/$ostype.userns.conf";
- $inc = "/usr/share/lxc/config/userns.conf" if !-f $inc;
- $raw .= "lxc.include = $inc\n"
+ $inc = "$cfgpath/$ostype.userns.conf";
+ $inc = "$cfgpath/userns.conf" if !-f $inc;
+ $raw .= "lxc.include = $inc\n";
+ $raw .= "lxc.seccomp.profile = $cfgpath/pve-userns.seccomp\n";
}
# WARNING: DO NOT REMOVE this without making sure that loop device nodes