diff options
author | Cy Schubert <cy@FreeBSD.org> | 2006-02-21 19:01:50 +0000 |
---|---|---|
committer | Cy Schubert <cy@FreeBSD.org> | 2006-02-21 19:01:50 +0000 |
commit | 6df62618ce570db65863ea3f2d9f0b03aed83ba6 (patch) | |
tree | 69b65cd2961d5b61595faf94420616d1bdd2f61b /security/tripwire | |
parent | 94e970b384d7cec9f18fa270f35dbc9efdd4da00 (diff) | |
download | ports-6df62618ce570db65863ea3f2d9f0b03aed83ba6.tar.gz ports-6df62618ce570db65863ea3f2d9f0b03aed83ba6.zip |
Notes
Diffstat (limited to 'security/tripwire')
-rw-r--r-- | security/tripwire/files/patch-contrib::install.sh | 52 |
1 files changed, 51 insertions, 1 deletions
diff --git a/security/tripwire/files/patch-contrib::install.sh b/security/tripwire/files/patch-contrib::install.sh index bdd36f0f8d37..6b5aa70fdc48 100644 --- a/security/tripwire/files/patch-contrib::install.sh +++ b/security/tripwire/files/patch-contrib::install.sh @@ -1,5 +1,5 @@ --- contrib/install.sh.orig Thu Sep 15 20:12:39 2005 -+++ contrib/install.sh Mon Feb 13 16:18:22 2006 ++++ contrib/install.sh Tue Feb 21 08:22:10 2006 @@ -162,12 +162,6 @@ # Default installation script configuration file. INSTALL_CONFIG_FILE="./install/install.cfg" @@ -31,3 +31,53 @@ for i in $loosefiles; do eval "eval \"\$$i\"" +@@ -719,6 +711,7 @@ + ## Generate tripwire configuration file. + ##======================================================= + ++[ ! -f "$TXT_CFG" -o "$CLOBBER" = "false" ] && { + echo + echo "----------------------------------------------" + echo "Generating Tripwire configuration file..." +@@ -757,6 +750,7 @@ + fi + + chmod 640 "$TXT_CFG" ++} + + ##======================================================= + ## Create signed tripwire configuration file. +@@ -826,20 +820,21 @@ + echo "----------------------------------------------" + echo "Customizing default policy file..." + +-sed '/@@section GLOBAL/,/@@section FS/ { +- s?^\(TWROOT=\).*$?TWDOCS='\""$TWDOCS"\"';? +- s?^\(TWBIN=\).*$?\1'\""$TWBIN"\"';? +- s?^\(TWPOL=\).*$?\1'\""$TWPOLICY"\"';? +- s?^\(TWDB=\).*$?\1'\""$TWDB"\"';? +- s?^\(TWSKEY=\).*$?\1'\""$TWSITEKEYDIR"\"';? +- s?^\(TWLKEY=\).*$?\1'\""$TWLOCALKEYDIR"\"';? +- s?^\(TWREPORT=\).*$?\1'\""$TWREPORT"\"';? +- s?^\(HOSTNAME=\).*$?\1'"$HOST_NAME"';? +-}' "${TWPOLICY}/${POLICYSRC}" > "${TXT_POL}.tmp" +- + # copy the tmp file back over the default policy + [ -f "${TXT_POL}" ] && cp "${TXT_POL}" "${TXT_POL}.bak" +-mv "${TXT_POL}.tmp" "${TXT_POL}" ++[ ! -f "${TXT_POL}" -o "$CLOBBER" = "true" ] && { ++ sed '/@@section GLOBAL/,/@@section FS/ { ++ s?^\(TWROOT=\).*$?TWDOCS='\""$TWDOCS"\"';? ++ s?^\(TWBIN=\).*$?\1'\""$TWBIN"\"';? ++ s?^\(TWPOL=\).*$?\1'\""$TWPOLICY"\"';? ++ s?^\(TWDB=\).*$?\1'\""$TWDB"\"';? ++ s?^\(TWSKEY=\).*$?\1'\""$TWSITEKEYDIR"\"';? ++ s?^\(TWLKEY=\).*$?\1'\""$TWLOCALKEYDIR"\"';? ++ s?^\(TWREPORT=\).*$?\1'\""$TWREPORT"\"';? ++ s?^\(HOSTNAME=\).*$?\1'"$HOST_NAME"';? ++ }' "${TWPOLICY}/${POLICYSRC}" > "${TXT_POL}" ++} ++ + rm -f "${TWPOLICY}/${POLICYSRC}" + + # reset rights on the policy files to 640 |