#
# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
# ident	"@(#)postinstall	1.1	08/11/19 SMI"
#

# Change permissions of public IKE certificates and CRLs
# that may have been incorrectly created as private
# PKCS#11 hints files must be left root-only readable.
# Make sure this files starts with "30 82"
#
for file in `ls ${PKG_INSTALL_ROOT}/etc/inet/ike/crls/* \
    ${PKG_INSTALL_ROOT}/etc/inet/ike/publickeys/* 2>/dev/null`; do
	if dd if=$file count=2 bs=1 2>/dev/null | cat -v | \
	    grep "0M-^B" >/dev/null 2>&1
	then
	    chmod 644 $file
	fi
done
exit 0
