]> git.saurik.com Git - apt.git/commit - apt-pkg/acquire.cc
chown finished partial files earlier
authorDavid Kalnischkies <david@kalnischkies.de>
Wed, 22 Oct 2014 23:28:05 +0000 (01:28 +0200)
committerDavid Kalnischkies <david@kalnischkies.de>
Wed, 22 Oct 2014 23:28:05 +0000 (01:28 +0200)
commit03aa08472dcd689572a46ce6efdb1dccf6136334
tree5a2ee0d77bfc4d59ef380c15acdbdbe85aae921f
parente845cde33c5d13a0e2dd924a388705a0738d4f96
chown finished partial files earlier

partial files are chowned by the Item baseclass to let the methods work
with them. Now, this baseclass is also responsible for chowning the
files back to root instead of having various deeper levels do this.

The consequence is that all overloaded Failed() methods now call the
Item::Failed base as their first step. The same is done for Done().

The effect is that even in partial files usually don't belong to
_apt anymore, helping sneakernets and reducing possibilities of a bad
method modifying files not belonging to them.

The change is supported by the framework not only supporting being run
as root, but with proper permission management, too, so that privilege
dropping can be tested with them.
19 files changed:
apt-pkg/acquire-item.cc
apt-pkg/acquire-item.h
apt-pkg/acquire.cc
apt-pkg/acquire.h
apt-private/private-download.cc
cmdline/apt-get.cc
test/integration/framework
test/integration/test-apt-cdrom
test/integration/test-apt-get-changelog
test/integration/test-apt-get-download
test/integration/test-apt-get-source-authenticated
test/integration/test-apt-helper
test/integration/test-apt-update-nofallback
test/integration/test-bug-617690-allow-unauthenticated-makes-all-untrusted
test/integration/test-bug-738785-switch-protocol
test/integration/test-compressed-indexes
test/integration/test-partial-file-support
test/integration/test-sourceslist-trusted-options
test/integration/test-ubuntu-bug-1098738-apt-get-source-md5sum