diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-01-16 07:59:41 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-01-16 07:59:41 +0000 |
commit | 404f8cbf462c75736c6cdb754bd9550f4c2763fb (patch) | |
tree | c9f67b9db8db9feb9fc0788ab3c51e2698d5148d | |
parent | 3d817b06a8a848fae137ffb47c1d8fdb41923505 (diff) | |
download | portage-404f8cbf462c75736c6cdb754bd9550f4c2763fb.tar.gz portage-404f8cbf462c75736c6cdb754bd9550f4c2763fb.tar.bz2 portage-404f8cbf462c75736c6cdb754bd9550f4c2763fb.zip |
Replace mktemp with mkstemp since the former is deprecated for security reasons.
svn path=/main/trunk/; revision=5669
-rwxr-xr-x | bin/repoman | 8 |
1 files changed, 4 insertions, 4 deletions
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)") |