summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-07-30 04:14:21 +0000
committerZac Medico <zmedico@gentoo.org>2007-07-30 04:14:21 +0000
commit816fadf2b5e2b027edd4efd2307ac78381dfd76f (patch)
treecf8ca60c22371413703ed6e498ab7e5f0540ace2 /pym
parent1c59d0d4da316d407a169ffa24679bde1687f6c0 (diff)
downloadportage-816fadf2b5e2b027edd4efd2307ac78381dfd76f.tar.gz
portage-816fadf2b5e2b027edd4efd2307ac78381dfd76f.tar.bz2
portage-816fadf2b5e2b027edd4efd2307ac78381dfd76f.zip
For bug #182157, never chmod 0 symlinks before unlinking them. (branches/2.1.2 r6849)
svn path=/main/branches/2.1.2.9/; revision=7464
Diffstat (limited to 'pym')
-rw-r--r--pym/portage.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pym/portage.py b/pym/portage.py
index 64c2eecbd..5bc2f22d8 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -7189,7 +7189,8 @@ class dblink:
writemsg_stdout("--- !md5 %s %s\n" % ("obj", obj))
continue
try:
- if statobj.st_mode & (stat.S_ISUID | stat.S_ISGID):
+ if not islink and \
+ statobj.st_mode & (stat.S_ISUID | stat.S_ISGID):
# Always blind chmod 0 before unlinking to avoid race conditions.
os.chmod(obj, 0000)
if statobj.st_nlink > 1: