Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 362609 Details for
Bug 469888
<sys-apps/portage-2.1.12.2 : urlopen() does not verify SSL certificates (CVE-2013-2100)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
fix to reimplement caching for https
portage_https_fetchhack_caching_fix.patch (text/plain), 1.93 KB, created by
Blu3
on 2013-11-05 09:26:38 UTC
(
hide
)
Description:
fix to reimplement caching for https
Filename:
MIME Type:
Creator:
Blu3
Created:
2013-11-05 09:26:38 UTC
Size:
1.93 KB
patch
obsolete
>--- /tmp/bintree.py 2013-11-05 04:12:41.138995391 -0500 >+++ /usr/lib/portage/pym/portage/dbapi/bintree.py 2013-11-05 04:21:44.098975898 -0500 >@@ -939,10 +939,25 @@ > if not fcmd: > raise EnvironmentError("FETCHCOMMAND is unset") > >- fd, tmp_filename = tempfile.mkstemp() >- tmp_dirname, tmp_basename = os.path.split(tmp_filename) >- os.close(fd) >- >+ # old method completely breaks timestamp caching >+ # make an archive copy of our file (preserves timestamps) >+ # cd to temp directory >+ # fetch file >+ # cd to $cwd so wget analyses the unqualified basename >+ tmp_dirname = tempfile.mkdtemp() >+ fetch_cwd = os.getcwd() >+ os.chdir(tmp_dirname) >+ tmp_basename = os.path.basename(pkgindex_file) >+ tmp_filename = os.path.join(tmp_dirname, tmp_basename) >+ f_pkgindex_file = open(pkgindex_file, 'rb') >+ f_tmpfile = open(tmp_basename, 'wb') >+ f_tmpfile.write(f_pkgindex_file.read()) >+ f_tmpfile.close() >+ f_pkgindex_file.close() >+ os.utime(tmp_basename, (int(local_timestamp), int(local_timestamp))) >+ tmp_stat_original = os.stat(tmp_filename) >+ fcmd = fcmd.replace('-O "${DISTDIR}/${FILE}"', '-N') >+ > fcmd_vars = { > "DISTDIR": tmp_dirname, > "FILE": tmp_basename, >@@ -957,9 +972,20 @@ > > success = portage.getbinpkg.file_get( > fcmd=fcmd, fcmd_vars=fcmd_vars) >+ >+ # return from whence we came, cleanups? >+ os.chdir(fetch_cwd) >+ >+ if tmp_stat_original.st_ctime == os.stat(tmp_filename).st_ctime: >+ # set to the tmpdir so both are deleted >+ tmp_filename = tmp_dirname >+ raise UseCachedCopyOfRemoteIndex() >+ > if not success: > raise EnvironmentError("%s failed" % (setting,)) > f = open(tmp_filename, 'rb') >+ # set to the tmpdir so both are deleted >+ tmp_filename = tmp_dirname > > f_dec = codecs.iterdecode(f, > _encodings['repo.content'], errors='replace')
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 469888
:
362609
|
362613
|
363172