[Python-checkins] r85213 - in python/branches/release27-maint: Lib/tarfile.py Misc/NEWS

lars.gustaebel python-checkins at python.org
Mon Oct 4 17:37:53 CEST 2010


Author: lars.gustaebel
Date: Mon Oct 4 17:37:53 2010
New Revision: 85213
Log:
Merged revisions 85211 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
 r85211 | lars.gustaebel | 2010年10月04日 17:18:47 +0200 (2010年10月04日) | 14 lines
 
 Issue #9065: no longer use "root" as the default for the
 uname and gname field.
 
 If tarfile creates a new archive and adds a file with a
 uid/gid that doesn't have a corresponding name on the
 system (e.g. because the user/group account was deleted) it
 uses the empty string in the uname/gname field now instead
 of "root". Using "root" as the default was a bad idea
 because on extraction the uname/gname fields are supposed
 to override the uid/gid fields. So, all archive members
 with nameless uids/gids belonged to the root user after
 extraction.
........
Modified:
 python/branches/release27-maint/ (props changed)
 python/branches/release27-maint/Lib/tarfile.py
 python/branches/release27-maint/Misc/NEWS
Modified: python/branches/release27-maint/Lib/tarfile.py
==============================================================================
--- python/branches/release27-maint/Lib/tarfile.py	(original)
+++ python/branches/release27-maint/Lib/tarfile.py	Mon Oct 4 17:37:53 2010
@@ -928,8 +928,8 @@
 self.chksum = 0 # header checksum
 self.type = REGTYPE # member type
 self.linkname = "" # link name
- self.uname = "root" # user name
- self.gname = "root" # group name
+ self.uname = "" # user name
+ self.gname = "" # group name
 self.devmajor = 0 # device major number
 self.devminor = 0 # device minor number
 
@@ -1112,8 +1112,8 @@
 info.get("type", REGTYPE),
 stn(info.get("linkname", ""), 100),
 stn(info.get("magic", POSIX_MAGIC), 8),
- stn(info.get("uname", "root"), 32),
- stn(info.get("gname", "root"), 32),
+ stn(info.get("uname", ""), 32),
+ stn(info.get("gname", ""), 32),
 itn(info.get("devmajor", 0), 8, format),
 itn(info.get("devminor", 0), 8, format),
 stn(info.get("prefix", ""), 155)
Modified: python/branches/release27-maint/Misc/NEWS
==============================================================================
--- python/branches/release27-maint/Misc/NEWS	(original)
+++ python/branches/release27-maint/Misc/NEWS	Mon Oct 4 17:37:53 2010
@@ -50,6 +50,9 @@
 Library
 -------
 
+- Issue #9065: tarfile no longer uses "root" as the default for the uname and
+ gname field.
+
 - Issue #1050268: parseaddr now correctly quotes double quote and backslash
 characters that appear inside quoted strings in email addresses.
 


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /