From: Zac Medico Date: Mon, 30 Jul 2007 04:14:21 +0000 (-0000) Subject: For bug #182157, never chmod 0 symlinks before unlinking them. (branches/2.1.2 r6849) X-Git-Tag: v2.1.2.11~53 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=816fadf2b5e2b027edd4efd2307ac78381dfd76f;p=portage.git 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 --- 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: