[New-bugs-announce] [issue12841] Incorrect tarfile.py extraction

Sebastien Luttringer report at bugs.python.org
Thu Aug 25 16:17:14 CEST 2011


New submission from Sebastien Luttringer <seblu+python at seblu.net>:

This patch fix extraction of tarfile which override tarfile uid/gid 

tarfile.py extract function override uid/gid of a file if uid/gid is not
existant on the system.

When user is not root (uid 0), common behaviour of extracting is correct.
When user is root, python implementation try to preserve (like tar -p) ownership
from tarball, but if uid/gid doesn't exist it remplace by process uid/gid.
This leads to fake the expected behaviour of preservation!

By example, extracting tarball with a root filesystem will create incorrect
ownership for file where owner/group is not on the current filesystem.

----------
components: Library (Lib)
files: tarfile-bug.patch
keywords: patch
messages: 142969
nosy: seblu
priority: normal
severity: normal
status: open
title: Incorrect tarfile.py extraction
type: behavior
versions: Python 3.2
Added file: http://bugs.python.org/file23046/tarfile-bug.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12841>
_______________________________________


More information about the New-bugs-announce mailing list