sys-cluster/util-vserver: setattr repaired bug #583892
authorAmy Winston <amynka@gentoo.org>
Mon, 6 Jun 2016 15:58:55 +0000 (17:58 +0200)
committerAmy Winston <amynka@gentoo.org>
Mon, 6 Jun 2016 16:03:52 +0000 (18:03 +0200)
Package-Manager: portage-2.2.28

sys-cluster/util-vserver/util-vserver-0.30.216_pre3120.ebuild

index fab02aed082e8eb23f262615cc9f177002d9233c..e78a7f4eeee41e51f4d993bc943651b55dbfb67d 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -87,7 +87,15 @@ pkg_postinst() {
        # present when merging.
 
        mkdir -p "${VDIRBASE}" || die
-       setattr --barrier "${VDIRBASE}" || die
+       if ! setattr --barrier "${VDIRBASE}"; then
+               ewarn "Filesystem on ${VDIRBASE} does not support chroot barriers."
+               ewarn "Chroot barrier is additional security measure that is used"
+               ewarn "when two vservers or the host system share the same filesystem."
+               ewarn "If you intend to use separate filesystem for every vserver"
+               ewarn "you can safely ignore this warning."
+               ewarn "To manually apply a barrier use: setattr --barrier ${VDIRBASE}"
+               ewarn "For details see: http://linux-vserver.org/Secure_chroot_Barrier"
+       fi
 
        rm /etc/vservers/.defaults/vdirbase || die
        ln -sf "${VDIRBASE}" /etc/vservers/.defaults/vdirbase || die