From: Zac Medico Date: Fri, 15 Jun 2007 20:06:54 +0000 (-0000) Subject: For bug #182157, never chmod 0 symlinks before unlinking them. X-Git-Tag: v2.2_pre1~1237 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b4a5cfa5a9eb03fecc9133970f0afd20899565cf;p=portage.git For bug #182157, never chmod 0 symlinks before unlinking them. svn path=/main/trunk/; revision=6848 --- diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index 2d3f44283..182c129c4 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -1199,7 +1199,7 @@ class dblink(object): try: # Remove permissions to ensure that any hardlinks to # suid/sgid files are rendered harmless. - if statobj: + if statobj and not islink: os.chmod(obj, 0) os.unlink(obj) except EnvironmentError, e: