commit:     e356d53ceb10ee24969ee79766f30e5004395f81
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Jul 23 19:39:39 2018 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Jul 23 19:39:39 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=e356d53c

RsyncSync: fix _commit_download usersync privileges (bug 661834)

Fix the _commit_download to drop privileges for the rsync call,
in order to prevent it from creating files owned by root.

Fixes: 84822ef7a214 ("rsync: quarantine data prior to verification (bug 
660410)")
Bug: https://bugs.gentoo.org/661834

 lib/portage/sync/modules/rsync/rsync.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/portage/sync/modules/rsync/rsync.py 
b/lib/portage/sync/modules/rsync/rsync.py
index fb1960a3c..56e38631e 100644
--- a/lib/portage/sync/modules/rsync/rsync.py
+++ b/lib/portage/sync/modules/rsync/rsync.py
@@ -94,7 +94,7 @@ class RsyncSync(NewBase):
                        rsynccommand.append('--exclude=/%s' % 
os.path.basename(download_dir))
                        rsynccommand.append('%s/' % download_dir.rstrip('/'))
                        rsynccommand.append('%s/' % self.repo.location)
-                       exitcode = subprocess.call(rsynccommand)
+                       exitcode = portage.process.spawn(rsynccommand, 
**self.spawn_kwargs)
 
                return exitcode
 

Reply via email to