From: Zac Medico Date: Mon, 18 Jun 2007 10:26:17 +0000 (-0000) Subject: During unmerge, always verify that the file isn't a symlink before doing chmod. X-Git-Tag: v2.2_pre1~1227 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b5c438044c24e07602c482e3f03eac9507387377;p=portage.git During unmerge, always verify that the file isn't a symlink before doing chmod. svn path=/main/trunk/; revision=6867 --- diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index dcc673c79..68545a53b 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -1263,7 +1263,8 @@ class dblink(object): 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