From: Emanuele Giaquinta Date: Wed, 30 Aug 2006 18:33:53 +0000 (-0000) Subject: do not abort when running unprivileged if mydest is a prefix of PREFIX, the user... X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=420f19fac9486de4fa497e305231467afe55d75e;p=portage.git do not abort when running unprivileged if mydest is a prefix of PREFIX, the user could not have write access to it; reported by grobian. svn path=/main/branches/prefix/; revision=4377 --- diff --git a/pym/portage.py b/pym/portage.py index c1d38b360..612e5c7bd 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -6179,8 +6179,8 @@ class dblink: dflags=bsd_chflags.lgetflags(mydest) if(bsd_chflags.lchflags(mydest, 0)<0): writemsg("!!! Couldn't clear flags on '"+mydest+"'.\n") - - if not os.access(mydest, os.W_OK): + # do not abort when running unprivileged if mydest is a prefix of PREFIX, the user could not have write access to it. + if not os.access(mydest, os.W_OK) and not prefix.startswith(mydest): pkgstuff = pkgsplit(self.pkg) writemsg("\n!!! Cannot write to '"+mydest+"'.\n") writemsg("!!! Please check permissions and directories for broken symlinks.\n")