<feed xmlns='http://www.w3.org/2005/Atom'>
<title>apt/apt-pkg/acquire.cc, branch 1.5_rc1</title>
<subtitle>Debians commandline package manager</subtitle>
<id>https://git.kalnischkies.de/apt/atom?h=1.5_rc1</id>
<link rel='self' href='https://git.kalnischkies.de/apt/atom?h=1.5_rc1'/>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/'/>
<updated>2017-08-24T14:56:52Z</updated>
<entry>
<title>Replace APT_CONST with APT_PURE everywhere</title>
<updated>2017-08-24T14:56:52Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2017-08-24T14:55:15Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=0e4ac8334d02ea256f750ad61689f28ff1ebdf6c'/>
<id>urn:sha1:0e4ac8334d02ea256f750ad61689f28ff1ebdf6c</id>
<content type='text'>
As a follow up to the last commit, let's replace APT_CONST
with APT_PURE everywhere to clean stuff up.
</content>
</entry>
<entry>
<title>don't hang if multiple sources use unavailable method</title>
<updated>2017-08-04T12:33:34Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2017-08-04T10:51:34Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=e250a8d8d8ef2f8f8c5e2041f7645c49fba7aa36'/>
<id>urn:sha1:e250a8d8d8ef2f8f8c5e2041f7645c49fba7aa36</id>
<content type='text'>
APT clients always noticed if a method isn't supported and nowadays
generate a message of the form:
	E: The method driver …/foobar could not be found.
	N: Is the package apt-transport-foobar installed?

This only worked if a single source was using such an unavailable method
through as we were registering the failed config the first round and
the second would try to send requests to the not started method, which
wouldn't work and hang instead (+ hiding the error messages as they would
be shown only at the end of the execution).

Closes: 870675
</content>
</entry>
<entry>
<title>allow the auth.conf to be root:root owned</title>
<updated>2017-07-26T17:09:04Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2017-07-07T20:21:44Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=881ec045b6660e2fe0c6953720260e380ceeeb99'/>
<id>urn:sha1:881ec045b6660e2fe0c6953720260e380ceeeb99</id>
<content type='text'>
Opening the file before we drop privileges in the methods allows us to
avoid chowning in the acquire main process which can apply to the wrong
file (imagine Binary scoped settings) and surprises users as their
permission setup is overridden.

There are no security benefits as the file is open, so an evil method
could as before read the contents of the file, but it isn't worse than
before and we avoid permission problems in this setup.
</content>
</entry>
<entry>
<title>send weak-only hashes to methods</title>
<updated>2017-07-26T17:07:56Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2017-07-24T11:04:58Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=85f4a655cdc4d16c1b95de6fad7f3cd955265e46'/>
<id>urn:sha1:85f4a655cdc4d16c1b95de6fad7f3cd955265e46</id>
<content type='text'>
Weak hashes like filesize can be used by methods for basic checks and
early refusals even if we can't use them for hard security proposes.

Normal apt operations are not affected by this as they fail if no strong
hash is available, but if apt is forced to work with weak-only files or
e.g. in apt-helper context it can have benefits as weak is better than
no hash for the methods.
</content>
</entry>
<entry>
<title>Reformat and sort all includes with clang-format</title>
<updated>2017-07-12T11:57:51Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2017-07-12T11:40:41Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=87274d0f22e1dfd99b2e5200e2fe75c1b804eac3'/>
<id>urn:sha1:87274d0f22e1dfd99b2e5200e2fe75c1b804eac3</id>
<content type='text'>
This makes it easier to see which headers includes what.

The changes were done by running

    git grep -l '#\s*include'  \
        | grep -E '.(cc|h)$' \
        | xargs sed -i -E 's/(^\s*)#(\s*)include/\1#\2 include/'

To modify all include lines by adding a space, and then running
./git-clang-format.sh.
</content>
</entry>
<entry>
<title>allow frontends to override releaseinfo change behaviour</title>
<updated>2017-06-28T17:18:47Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2017-05-28T14:55:45Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=ca8da1bf83ecc90ba882520b79c1cda03ee7485d'/>
<id>urn:sha1:ca8da1bf83ecc90ba882520b79c1cda03ee7485d</id>
<content type='text'>
Having messages being printed on the error stack and confirm them by
commandline flags is an okayish first step, but some frontends will
probably want to have a more interactive feeling here with a proper
question the user can just press yes/no for as for some frontends a
commandline flag makes no sense…
</content>
</entry>
<entry>
<title>Avoid chdir in acquire clean with unlinkat</title>
<updated>2017-06-26T21:31:15Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2017-03-19T11:59:44Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=24fbb6adb071c39e24f9b0a89aadc7d5673a8775'/>
<id>urn:sha1:24fbb6adb071c39e24f9b0a89aadc7d5673a8775</id>
<content type='text'>
POSIX.1-2008 gives us a range of *at calls to deal with files
including the unlinkat so we can remove a file from a directory
based on a path to the file relative to the directory.
(In our case here the path we have is just the filename)

We avoid changing directories in this way which e.g. fails if the
directory we started in no longer exists or is otherwise inaccessible.

Closes: 860738
</content>
</entry>
<entry>
<title>Only merge acquire items with the same meta key</title>
<updated>2017-01-28T13:06:29Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2017-01-25T02:38:59Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=7b78e8bef1fc9de22d826db1db9df25f97d3710c'/>
<id>urn:sha1:7b78e8bef1fc9de22d826db1db9df25f97d3710c</id>
<content type='text'>
Since the introduction of by-hash, two differently named
files might have the same real URL. In our case, the files
icons-64x64.tar.gz and icons-128x128.tar.gz of empty tarballs.

APT would try to merge them and end with weird errors because
it completed the first download and enters the second stage for
decompressing and verifying. After that it would queue a new item
to copy the original file to the location, but that copy item would
be in the wrong stage, causing it to use the hashes for the
decompressed item.

Closes: #838441
</content>
</entry>
<entry>
<title>remove 'old' FAILED files in the next acquire call</title>
<updated>2017-01-19T02:57:45Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2017-01-19T02:57:45Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=7ca83492e802967f183babf06ab541b1b51f1703'/>
<id>urn:sha1:7ca83492e802967f183babf06ab541b1b51f1703</id>
<content type='text'>
If apt renames a file to .FAILED it leaves its namespace and is never
touched again – expect since 1.1~exp4 in which "apt clean" will remove
those files. The usefulness of these files rapidly degrades if you don't
keep the update log itself (together with debug output in the best case)
through and on 99% of all system they will be kept around forever just
to collect dust over time and eat up space.

With this commit an update call will remove all FAILED files of previous
runs, so that the FAILED files you have on disk are always only the ones
related to the last apt run stopping apt from hoarding files.

Closes: 846476
</content>
</entry>
<entry>
<title>reword "Can't drop priv" warning message</title>
<updated>2016-12-16T12:50:00Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2016-11-25T14:15:01Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=78db35195eddcd156130fff9ea3e895b30cbf9c3'/>
<id>urn:sha1:78db35195eddcd156130fff9ea3e895b30cbf9c3</id>
<content type='text'>
Note: This is a warning about disabling a security feature. It is
supposed to be scary as we are disabling a security feature and we
can't just be silent about it! Downloads really shouldn't happen
any longer as root to decrease the attack surface – but if a warning
causes that much uproar, consider what an error would do…

The old WARNING message:
| W: Can't drop privileges for downloading as file 'foobar' couldn't be
| accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
is frequently (incorrectly) considered to be an error message indicating
that the download didn't happen which isn't the case, it was performed,
but without all the security features enabled we could have used if run
from some other place…

The word "unsandboxed" is chosen as the term 'sandbox(ed)' is a common
encounter in feature lists/changelogs and more people are hopefully able
to make the connection to 'security' than it is the case for 'privilege
dropping' which is more correct, but far less known.

Closes: #813786
LP: #1522675
</content>
</entry>
</feed>
