cluster: RHEL4 - rgmanager: randomize SAPDatabase temp file even more

Lon Hohberger lon at fedoraproject.org
Thu Oct 21 22:31:53 UTC 2010


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=1eb1c1db6b2d7b8671568c05ef8e01e64620842c
Commit:        1eb1c1db6b2d7b8671568c05ef8e01e64620842c
Parent:        c5905887eca9ee0e6a1ea6673300b73433b5035e
Author:        Fabio M. Di Nitto <fdinitto at redhat.com>
AuthorDate:    Thu Oct 30 10:32:11 2008 +0100
Committer:     Lon Hohberger <lhh at redhat.com>
CommitterDate: Thu Oct 21 18:20:26 2010 -0400

rgmanager: randomize SAPDatabase temp file even more

ad4d9bd9216d6fa259118017bac8b5c032b7b3b9 didn't introduce enough
security.

Switch to mktemp(1).

Signed-off-by: Fabio M. Di Nitto <fdinitto at redhat.com>
---
 rgmanager/src/resources/SAPDatabase |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/rgmanager/src/resources/SAPDatabase b/rgmanager/src/resources/SAPDatabase
index 5e2aa83..c06f227 100755
--- a/rgmanager/src/resources/SAPDatabase
+++ b/rgmanager/src/resources/SAPDatabase
@@ -553,7 +553,7 @@ then
 fi
 
 # Set a tempfile and make sure to clean it up again
-TEMPFILE="/tmp/SAPDatabase.tmp"
+TEMPFILE="$(mktemp -t /tmp/SAPDatabase.tmp.XXXXXX)"
 trap trap_handler INT TERM
 
 # These operations don't require OCF instance parameters to be set


More information about the cluster-commits mailing list