From a1a33ae5e155d2be5b17912ea060953f5cba9845 Mon Sep 17 00:00:00 2001 From: Michael Shuler Date: Mon, 20 Oct 2014 22:55:01 -0500 Subject: Dynamically set mode/group of /usr/local/share/ca-certificates --- debian/changelog | 8 ++++++++ debian/postinst | 9 +++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/debian/changelog b/debian/changelog index fc50716..78f4b30 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +ca-certificates (20141020) UNRELEASED; urgency=medium + + * debian/postinst: + Set mode and group of /usr/local/share/ca-certificates based on current + /usr/local permissions and ownership. Closes: #611501 + + -- Michael Shuler Mon, 20 Oct 2014 22:49:56 -0500 + ca-certificates (20141019) unstable; urgency=medium * debian/copyright: diff --git a/debian/postinst b/debian/postinst index 6b24d9b..bc70046 100644 --- a/debian/postinst +++ b/debian/postinst @@ -40,12 +40,9 @@ delca() { case "$1" in configure) - if [ ! -e /usr/local/share/ca-certificates ] - then - if mkdir /usr/local/share/ca-certificates 2>/dev/null - then - chown root:staff /usr/local/share/ca-certificates - chmod 2775 /usr/local/share/ca-certificates + if [ ! -e /usr/local/share/ca-certificates ]; then + if mkdir -m $(stat -c %a /usr/local) /usr/local/share/ca-certificates 2>/dev/null; then + chgrp $(stat -c %g /usr/local) /usr/local/share/ca-certificates fi fi -- cgit v1.2.1