From 816fadf2b5e2b027edd4efd2307ac78381dfd76f Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 30 Jul 2007 04:14:21 +0000 Subject: 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 --- pym/portage.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pym') 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: -- cgit v1.2.3-1-g7c22