From c2f18f972dacb630019cc229263efd2d8aef1428 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Thu, 1 Jul 2010 12:00:26 -0700 Subject: Touch file before setting capability Unionfs should copyup the xattr automatically, but it doesn't so use touch to force a copyup before setting attributes. --- debian/vyatta-cfg-system.postinst.in | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'debian/vyatta-cfg-system.postinst.in') diff --git a/debian/vyatta-cfg-system.postinst.in b/debian/vyatta-cfg-system.postinst.in index dee13d4f..3c3c2e40 100644 --- a/debian/vyatta-cfg-system.postinst.in +++ b/debian/vyatta-cfg-system.postinst.in @@ -135,8 +135,11 @@ EOF cp $sysconfdir/vyatta-sysctl.conf /etc/sysctl.d/30-vyatta-router.conf # Set file capabilities - sed -r -e '/^#/d' -e '/^[[:blank:]]*$/d' <$sysconfdir/filecaps \ - | xargs -i sh -c "setcap {}" + sed -r -e '/^#/d' -e '/^[[:blank:]]*$/d' < $sysconfdir/filecaps | \ + while read capability path; do + touch -c $path + setcap $capability $path + done # Install pam_cap config cp $sysconfdir/capability.conf /etc/security/capability.conf -- cgit v1.2.3