From: Zac Medico Date: Tue, 16 Jan 2007 07:59:41 +0000 (-0000) Subject: Replace mktemp with mkstemp since the former is deprecated for security reasons. X-Git-Tag: v2.1.2-r1~22 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=404f8cbf462c75736c6cdb754bd9550f4c2763fb;p=portage.git Replace mktemp with mkstemp since the former is deprecated for security reasons. svn path=/main/trunk/; revision=5669 --- diff --git a/bin/repoman b/bin/repoman index a9c05c6c1..772c0da36 100755 --- a/bin/repoman +++ b/bin/repoman @@ -1600,8 +1600,8 @@ else: commitmessage+="\n(Portage version: Unknown)" if myupdates or myremoved: myfiles = myupdates + myremoved - commitmessagefile=tempfile.mktemp(".repoman.msg") - mymsg=open(commitmessagefile,"w") + fd, commitmessagefile = tempfile.mkstemp(".repoman.msg") + mymsg = os.fdopen(fd, "w") mymsg.write(commitmessage) mymsg.close() @@ -1752,8 +1752,8 @@ else: if "--pretend" in myoptions: print "(/usr/bin/cvs -q commit -F "+commitmessagefile+")" else: - commitmessagefile = tempfile.mktemp(".repoman.msg") - mymsg=open(commitmessagefile,"w") + fd, commitmessagefile = tempfile.mkstemp(".repoman.msg") + mymsg = os.fdopen(fd, "w") mymsg.write(commitmessage) if signed: mymsg.write("\n (Signed Manifest commit)")