From: Zac Medico Date: Mon, 18 Jun 2007 10:26:48 +0000 (-0000) Subject: During unmerge, always verify that the file isn't a symlink before doing chmod. ... X-Git-Tag: v2.1.3~211 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d02d2c89b71f2c8edc3197c1c38cad4e35053116;p=portage.git During unmerge, always verify that the file isn't a symlink before doing chmod. (trunk r6867) svn path=/main/branches/2.1.2/; revision=6868 --- diff --git a/pym/portage.py b/pym/portage.py index 955901a52..bbbc6312b 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -7228,7 +7228,8 @@ class dblink: try: # Remove permissions to ensure that any hardlinks to # suid/sgid files are rendered harmless. - os.chmod(obj, 0) + if not islink: + os.chmod(obj, 0) os.unlink(obj) except (OSError,IOError),e: pass