summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAde Lee <alee@redhat.com>2012-10-17 16:35:34 -0400
committerAde Lee <alee@redhat.com>2012-10-18 17:31:36 -0400
commitad7a3abbe67ea42722aafd644bd0377e760f344d (patch)
tree132c1a9aec6ab1c7bd1e02e7f5b3cbb820bb066b
parentad84ed4a459bb6ab5cf7c1842cf1fe042b1488a9 (diff)
downloadpki-ad7a3abbe67ea42722aafd644bd0377e760f344d.tar.gz
pki-ad7a3abbe67ea42722aafd644bd0377e760f344d.tar.xz
pki-ad7a3abbe67ea42722aafd644bd0377e760f344d.zip
Changes to allow tps to start correctly
1. Change to system cert verification test to allow successful return if all certs pass 2. Change to functions to allow correct processing of tus link
-rw-r--r--base/setup/scripts/functions21
-rw-r--r--base/tps/src/engine/RA.cpp2
2 files changed, 11 insertions, 12 deletions
diff --git a/base/setup/scripts/functions b/base/setup/scripts/functions
index 956790bae..c6815caf9 100644
--- a/base/setup/scripts/functions
+++ b/base/setup/scripts/functions
@@ -897,6 +897,7 @@ verify_symlinks()
declare -A common_jar_symlinks
declare -A webapps_jar_symlinks
declare -A systemd_symlinks
+ declare -A tus_symlinks
# Dogtag 9 Conditional Variables
if [ ${ARCHITECTURE} == "x86_64" ]; then
@@ -949,6 +950,9 @@ verify_symlinks()
# '${PKI_INSTANCE_PATH}/lib' symlinks
perl_symlinks[perl]=/usr/share/pki/${PKI_SUBSYSTEM_TYPE}/lib/perl
+ # '${PKI_INSTANCE_PATH}/docroot' symlinks
+ tus_symlinks[tus]="${PKI_INSTANCE_PATH}/docroot/tokendb"
+
# '${pki_common_jar_dir}' symlinks
common_jar_symlinks=(
[apache-commons-logging.jar]=/usr/share/java/apache-commons-logging.jar
@@ -1009,18 +1013,13 @@ verify_symlinks()
fi
if [ "${PKI_SUBSYSTEM_TYPE}" == "tps" ]; then
- # ALWAYS recreate this "convenience" link and 'chown' it
- # NOTE: Ignore 'chown' errors.
- cd ${PKI_INSTANCE_PATH}/docroot ;
- ln -s tokendb tus ;
+ # Detect and correct 'tus_symlinks'
+ tus_symlinks_string=$(declare -p tus_symlinks)
+ eval "declare -A symlinks=${tus_symlinks_string#*=}"
+ check_symlinks ${PKI_INSTANCE_PATH}/docroot ${PKI_USER} ${PKI_GROUP}
rv=$?
- if [ $rv -eq 0 ]; then
- chown -h ${PKI_USER}:${PKI_GROUP} tus
- # echo "SUCCESS: Created 'tus' -> 'tokendb'"
- else
- echo "ERROR: Failed to create 'tus' -> 'tokendb' convenience"
- echo " symbolic link for '${PKI_INSTANCE_ID}'!"
- return 1
+ if [ $rv -ne 0 ]; then
+ return $rv
fi
fi
elif [ "${PKI_SUBSYSTEM_TYPE}" == "ca" ] ||
diff --git a/base/tps/src/engine/RA.cpp b/base/tps/src/engine/RA.cpp
index 436225045..82f53c161 100644
--- a/base/tps/src/engine/RA.cpp
+++ b/base/tps/src/engine/RA.cpp
@@ -3483,7 +3483,7 @@ TPS_PUBLIC bool RA::verifySystemCertByNickname(const char *nickname, const char
*/
TPS_PUBLIC bool RA::verifySystemCerts() {
bool verifyResult = false;
- bool rv = false; /* final return value */
+ bool rv = true; /* final return value */
char configname[256];
char configname_nn[256];
char configname_cu[256];