<feed xmlns='http://www.w3.org/2005/Atom'>
<title>apt/methods/ftp.cc, branch 1.8.1</title>
<subtitle>Debians commandline package manager</subtitle>
<id>https://git.kalnischkies.de/apt/atom?h=1.8.1</id>
<link rel='self' href='https://git.kalnischkies.de/apt/atom?h=1.8.1'/>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/'/>
<updated>2018-05-24T12:31:31Z</updated>
<entry>
<title>Lower default timeout from 120s to 30s</title>
<updated>2018-05-24T12:31:31Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2018-05-24T12:31:31Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=329a4a6159f1972ff5ec7bc2db26430f26dc61f3'/>
<id>urn:sha1:329a4a6159f1972ff5ec7bc2db26430f26dc61f3</id>
<content type='text'>
120s is an insanely high default time out, lower it to 30s
to make things a bit nicer.
</content>
</entry>
<entry>
<title>Remove obsolete RCS keywords</title>
<updated>2018-05-07T11:41:31Z</updated>
<author>
<name>Guillem Jover</name>
<email>guillem@debian.org</email>
</author>
<published>2018-05-06T20:32:41Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=164f1b78d1849a0f33df7352875f86e28f5de06a'/>
<id>urn:sha1:164f1b78d1849a0f33df7352875f86e28f5de06a</id>
<content type='text'>
Prompted-by: Jakub Wilk &lt;jwilk@debian.org&gt;
</content>
</entry>
<entry>
<title>report transient errors as transient errors</title>
<updated>2017-12-13T22:56:29Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2017-10-25T22:57:26Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=47c0bdc310c8cd62374ca6e6bb456dd183bdfc07'/>
<id>urn:sha1:47c0bdc310c8cd62374ca6e6bb456dd183bdfc07</id>
<content type='text'>
The Fail method for acquire methods has a boolean parameter indicating
the transient-nature of a reported error. The problem with this is that
Fail is called very late at a point where it is no longer easily
identifiable if an error is indeed transient or not, so some calls were
and some weren't and the acquire system would later mostly ignore the
transient flag and guess by using the FailReason instead.

Introducing a tri-state enum we can pass the information about fatal or
transient errors through the callstack to generate the correct fails.
</content>
</entry>
<entry>
<title>Sandbox methods with seccomp-BPF; except cdrom, gpgv, rsh</title>
<updated>2017-10-22T21:38:31Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2017-10-22T21:34:03Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=32bcbd73e0988d2d2237690ffae33b4f5cc5ff81'/>
<id>urn:sha1:32bcbd73e0988d2d2237690ffae33b4f5cc5ff81</id>
<content type='text'>
This reduces the number of syscalls to about 140 from about
350 or so, significantly reducing security risks.

Also change prepare-release to ignore the architecture lists
in the build dependencies when generating the build-depends
package for travis.

We might want to clean up things a bit more and/or move it
somewhere else.
</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>reimplement and document auth.conf</title>
<updated>2017-07-26T17:09:04Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2017-07-07T14:24:21Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=ea408c560ed85bb4ef7cf8f72f8463653501332c'/>
<id>urn:sha1:ea408c560ed85bb4ef7cf8f72f8463653501332c</id>
<content type='text'>
We have support for an netrc-like auth.conf file since 0.7.25 (closing
518473), but it was never documented in apt that it even exists and
netrc seems to have fallen out of usage as a manpage for it no longer
exists making the feature even more arcane.

On top of that the code was a bit of a mess (as it is written in c-style)
and as a result the matching of machine tokens to URIs also a bit
strange by checking for less specific matches (= without path) first.
We now do a single pass over the stanzas.

In practice early adopters of the undocumented implementation will not
really notice the differences and the 'new' behaviour is simpler to
document and more usual for an apt user.

Closes: #811181
</content>
</entry>
<entry>
<title>fail early in http if server answer is too small as well</title>
<updated>2017-07-26T17:07:56Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2017-07-26T16:35:42Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=f2f8e89f08cdf01c83a0b8ab053c65329d85ca90'/>
<id>urn:sha1:f2f8e89f08cdf01c83a0b8ab053c65329d85ca90</id>
<content type='text'>
Failing on too much data is good, but we can do better by checking for
exact filesizes as we know with hashsums how large a file should be, so
if we get a file which has a size we do not expect we can drop it
directly, regardless of if the file is larger or smaller than what we
expect which should catch most cases which would end up as hashsum
errors later now a lot sooner.
</content>
</entry>
<entry>
<title>fail earlier if server answers with too much data</title>
<updated>2017-07-26T17:07:56Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2017-07-24T12:30:41Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=d7518dba50e2285c41c7002a1d86f876401fd9ea'/>
<id>urn:sha1:d7518dba50e2285c41c7002a1d86f876401fd9ea</id>
<content type='text'>
We tend to operate on rather large static files, which means we usually
get Content-Length information from the server. If we combine this
information with the filesize we are expecting (factoring in pipelining)
we can avoid reading a bunch of data we are ending up rejecting anyhow
by just closing the connection saving bandwidth and time both for the
server as well as the client.
</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>methods: connect: Switch from int fds to new MethodFd</title>
<updated>2017-06-28T13:52:38Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2017-06-28T08:55:08Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=5666084ecfe140aaa3f89388de557c2f875b4244'/>
<id>urn:sha1:5666084ecfe140aaa3f89388de557c2f875b4244</id>
<content type='text'>
Use std::unique_ptr&lt;MethodFd&gt; everywhere we used an
integer-based file descriptor before. This allows us
to implement stuff like TLS support easily.

Gbp-Dch: ignore
</content>
</entry>
</feed>
