mirror of
https://github.com/nsacyber/HIRS.git
synced 2025-02-05 10:39:44 +00:00
bce78c0122
There was a problem in the rpm-post-install.sh script that ran as part of the CentOS7 rpm installation where a link was being created called libcurl.so which pointed to libcurl.so.4. If the link could not be created because it already existed, the script would quit before finishing and never place hirs-provisioner-tpm2 in a directory on the PATH. The proper solution was to link hirs-provisioner against libcurl.so.4 so that it is clear which version of the API was compiled against. This was not happening because we were linking against a version of curl build by the CPR project which was not properly embedding the SONAME in the shared object file. By linking instead against the shared object file distributed in the development package of libcurl, hirs-provisioner-tpm2 now looks for libcurl.so.4 rather than the generic libcurl.so. This will prevent our executable from breaking if libcurl.so gets updated to point to a newer version of libcurl that uses a different API. Closes #78.
39 lines
1.0 KiB
Bash
39 lines
1.0 KiB
Bash
set -e
|
|
|
|
if ! [ $(id -u) = 0 ]; then
|
|
echo "Please run this script as root."
|
|
exit 1
|
|
fi
|
|
|
|
HIRS_SITE_CONFIG="/etc/hirs/hirs-site.config"
|
|
|
|
mkdir -p /var/log/hirs/provisioner
|
|
ln -s -f /usr/local/bin/hirs-provisioner-tpm2 /usr/sbin/hirs-provisioner-tpm2
|
|
ln -s -f /usr/local/bin/tpm_aca_provision /usr/sbin/tpm_aca_provision
|
|
|
|
if [ ! -f $HIRS_SITE_CONFIG ]; then
|
|
# Create template site config if it does not exist
|
|
cat <<DEFAULT_SITE_CONFIG_FILE > $HIRS_SITE_CONFIG
|
|
#*******************************************
|
|
#* HIRS site configuration properties file
|
|
#*******************************************
|
|
|
|
# Client configuration
|
|
CLIENT_HOSTNAME=$(hostname -f)
|
|
TPM_ENABLED=
|
|
IMA_ENABLED=
|
|
|
|
# Site-specific configuration
|
|
ATTESTATION_CA_FQDN=
|
|
ATTESTATION_CA_PORT=8443
|
|
BROKER_FQDN=
|
|
BROKER_PORT=61616
|
|
PORTAL_FQDN=
|
|
PORTAL_PORT=8443
|
|
|
|
DEFAULT_SITE_CONFIG_FILE
|
|
|
|
echo "$HIRS_SITE_CONFIG not found - a template has been created"
|
|
echo "Set your site configuration manually in $HIRS_SITE_CONFIG, then run 'hirs-provisioner-tpm2 provision' to provision this system"
|
|
fi
|