From c57b8d55b996553e8beb4ad9e874e99170da183a Mon Sep 17 00:00:00 2001 From: "Chris D. Faulhaber" Date: Tue, 19 Dec 2000 11:35:15 +0000 Subject: Use mktemp(1) to create a temporary file instead of using a short guessable filename during configuration. Approved by: Maintainer --- security/cyrus-sasl/scripts/configure.sasl | 10 ++++++---- security/cyrus-sasl2/scripts/configure.sasl | 10 ++++++---- 2 files changed, 12 insertions(+), 8 deletions(-) (limited to 'security') diff --git a/security/cyrus-sasl/scripts/configure.sasl b/security/cyrus-sasl/scripts/configure.sasl index 40e33f3c69a3..76337a140d0e 100644 --- a/security/cyrus-sasl/scripts/configure.sasl +++ b/security/cyrus-sasl/scripts/configure.sasl @@ -5,6 +5,8 @@ if [ -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc ]; then exit fi +tempfile=`mktemp -t checklist` + if [ "${BATCH}" ]; then if [ "x${ENABLE_DB3}" = "xYES" ]; then OPTIONS=\"DB3\" @@ -43,14 +45,14 @@ Please select desired options:" -1 -1 16 \ DB3 "Berkeley DB package, revision 3" ${SET_DB3} \ MySQL "MySQL password Authentication" ${SET_MYSQL} \ OpenLDAP "OpenLDAP password Authentication" ${SET_LDAP} \ -2> /tmp/checklist.tmp.$$ +2> $tempfile retval=$? - if [ -s /tmp/checklist.tmp.$$ ]; then - set `cat /tmp/checklist.tmp.$$` + if [ -s $tempfile ]; then + set `cat $tempfile` fi - rm -f /tmp/checklist.tmp.$$ + rm -f $tempfile case $retval in 0) if [ -z "$*" ]; then diff --git a/security/cyrus-sasl2/scripts/configure.sasl b/security/cyrus-sasl2/scripts/configure.sasl index 40e33f3c69a3..76337a140d0e 100644 --- a/security/cyrus-sasl2/scripts/configure.sasl +++ b/security/cyrus-sasl2/scripts/configure.sasl @@ -5,6 +5,8 @@ if [ -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc ]; then exit fi +tempfile=`mktemp -t checklist` + if [ "${BATCH}" ]; then if [ "x${ENABLE_DB3}" = "xYES" ]; then OPTIONS=\"DB3\" @@ -43,14 +45,14 @@ Please select desired options:" -1 -1 16 \ DB3 "Berkeley DB package, revision 3" ${SET_DB3} \ MySQL "MySQL password Authentication" ${SET_MYSQL} \ OpenLDAP "OpenLDAP password Authentication" ${SET_LDAP} \ -2> /tmp/checklist.tmp.$$ +2> $tempfile retval=$? - if [ -s /tmp/checklist.tmp.$$ ]; then - set `cat /tmp/checklist.tmp.$$` + if [ -s $tempfile ]; then + set `cat $tempfile` fi - rm -f /tmp/checklist.tmp.$$ + rm -f $tempfile case $retval in 0) if [ -z "$*" ]; then -- cgit v1.2.3