summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | reenable support for -s (and co) in apt-get sourceDavid Kalnischkies2014-10-202-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The conversion to accept only relevant options for commands has forgotten another one, so adding it again even through the usecase might very well be equally good served by --print-uris. Closes: 742578
* | | | | releasing package apt version 1.1~exp7Michael Vogt2014-10-151-0/+8
| | | | |
* | | | | ignore Acquire::GzipIndexes for cdrom sourcesDavid Kalnischkies2014-10-152-30/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We do not support compressed indexes for cdrom sources as we rewrite some of them, so supporting it correctly could be hard. What we do instead in the meantime is probably disabling it for cdrom sources.
* | | | | Merge branch 'debian/sid' into debian/experimentalDavid Kalnischkies2014-10-152-11/+48
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The acquire code changed completely, so this is more an import of the testcase and a new fix than the merge of an existent fix. Conflicts: apt-pkg/acquire-item.cc
| * | | | don't cleanup cdrom files in apt-get updateDavid Kalnischkies2014-10-152-14/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Regression from merging 801745284905e7962aa77a9f37a6b4e7fcdc19d0 and b0f4b486e6850c5f98520ccf19da71d0ed748ae4. While fine by itself, merged the part fixing the filename is skipped if a cdrom source is encountered, so that our list-cleanup removes what seems to be orphaned files. Closes: 765458
* | | | | releasing package apt version 1.1~exp6Michael Vogt2014-10-151-0/+18
| | | | |
* | | | | check for available space, excluding root reserved blocksDavid Kalnischkies2014-10-155-57/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We are checking the space requirements for ages, but the check uses the free blocks count, which includes the blocks reserved for usage by root. Now that we use an unprivileged user it has no access to these blocks anymore – and more importantly these blocks are a reserve, they shouldn't be used by apt without special encouragement by the user as it would be bad to have dpkg run out of diskspace and maintainerscripts like man-db skip certain actions if not enough space is available freely.
* | | | | set PR_SET_NO_NEW_PRIVS even if sandbox is disabledDavid Kalnischkies2014-10-151-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to 8f45798d532223adc378a4ad9ecfc64b3be26e4f, there is no harm to set this, even if we don't drop privileges. Git-Dch: Ignore
* | | | | testcases runable as rootDavid Kalnischkies2014-10-157-18/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Running the testcases is usually not a good idea, but it can be handy to check if the privilege dropping works. Git-Dch: Ignore
* | | | | don't drop privileges if _apt has not enough rightsDavid Kalnischkies2014-10-154-8/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Privilege dropping breaks download/source/changelog commands as they require the _apt user to have write permissions in the current directory, which is e.g. the case in /tmp, but not in /root, so we disable the privilege dropping if we deal with such a directory based on idea and code by Michael Vogt. The alternative would be to download always to a temp directory and move it then done, but this breaks partial file support. To resolve this, we could move to one of our partial/ directories, but this would require a lock which would block root from using two of these commands in parallel. As both seems unacceptable we instead let the user choose what to do: Either a directory is setupped for _apt, downloading as root is accepted or – which is potentially even better – an unprivileged user is used for the commands.
* | | | | Add new configallowinsecurerepositories to the test frameworkMichael Vogt2014-10-142-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new configallowinsecurerepositories that controls the value of Acquire::AllowInsecureRepositories for the tests. Set it to "false" for most of the testsuite and only enable it where its really needed. We want to switch the default for this post-jessie.
* | | | | Merge branch 'debian/sid' into debian/experimentalMichael Vogt2014-10-146-138/+150
|\| | | |
| * | | | Update Status field values handlingGuillem Jover2014-10-082-35/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove long obsolete (hold, hold-reinstreq, removal-failed) or just wrong (post-inst-failed vs postinst-failed) values, that have been autoconverted by dpkg at run-time to their new equivalents, so there should not be any such instance in any recent system (removal-failed since dpkg 1.1.4 in Apr 1996, hold and hold-reinstreq since dpkg 1.2.0 in May 1996). dpkg even stopped doing the mapping in 1.15.4 and 1.15.8 respectively. At the same time sort the list in the same order as they appear in the dpkg code.
| * | | | methods/rsh.cc: replace strcat with std::stringMichael Vogt2014-10-081-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of using strcat use a C++ std::string to avoid overflowing this buffer. Thanks to David Garfield Closes: #76442
| * | | | add CVE-2014-7206 to 1.0.9.2Michael Vogt2014-10-081-1/+1
| | | | |
| * | | | implement the updated build profile specjosch2014-10-063-97/+130
| | | | |
* | | | | releasing package apt version 1.1~exp5Michael Vogt2014-10-131-0/+20
| | | | |
* | | | | Change default of Acquire::AllowInsecureRepositories to "true"Michael Vogt2014-10-131-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | This change is made for backward compatiblity and should be reverted once jessie is out.
* | | | | update symbols fileDavid Kalnischkies2014-10-131-36/+61
| | | | | | | | | | | | | | | | | | | | Git-Dch: Ignore
* | | | | do not load filesize in pkgAcqIndexTrans explicitlyDavid Kalnischkies2014-10-133-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The constructor is calling the baseclass pkgAcqIndex which does this already – and also does it correctly for compressed files which would overwise lead to the size of uncompressed files to be expected. Git-Dch: Ignore
* | | | | fix compile and tests errorDavid Kalnischkies2014-10-1311-18/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I am pretty sure I did that before committing broken stuff… Git-Dch: Ignore
* | | | | Fix backward compatiblity of the new pkgAcquireMethod::DropPrivsOrDie()Michael Vogt2014-10-1311-17/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not drop privileges in the methods when using a older version of libapt that does not support the chown magic in partial/ yet. To do this DropPrivileges() now will ignore a empty Apt::Sandbox::User. Cleanup all hardcoded _apt along the way.
* | | | | Document ↵Michael Vogt2014-10-132-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Acquire{MaxReleaseFileSize,AllowInsecureRepositories,AllowDowngradeToInsecureRepositories} and --no-allow-insecure-repositories Document the new options to restrict loading unauthenticated data into our parsers.
* | | | | trusted=yes sources are secure, we just don't know whyDavid Kalnischkies2014-10-136-17/+229
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not require a special flag to be present to update trusted=yes sources as this flag in the sources.list is obviously special enough. Note that this is just disabling the error message, the user will still be warned about all the (possible) failures the repository generated, it is just triggering the acceptance of the warnings on a source-by-source level. Similarily, the trusted=no flag doesn't require the user to pass additional flags to update, if the repository looks fine in the view of apt it will update just fine. The unauthenticated warnings will "just" be presented then the data is used. In case you wonder: Both was the behavior in previous versions, too.
* | | | | do not inline virtual destructors with d-pointersDavid Kalnischkies2014-10-1318-29/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reimplementing an inline method is opening a can of worms we don't want to open if we ever want to us a d-pointer in those classes, so we do the only thing which can save us from hell: move the destructors into the cc sources and we are good. Technically not an ABI break as the methods inline or not do the same (nothing), so a program compiled against the old version still works with the new version (beside that this version is still in experimental, so nothing really has been build against this library anyway). Git-Dch: Ignore
* | | | | display a warning for unsigned reposDavid Kalnischkies2014-10-131-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The same message is used for InRelease if fails in gpgv, but the Release/Release.gpg duo needs to handle the failing download case as well (InRelease just defers to the duo if download fails) and print a message accompaning the insecure error to provide a hint on what is going on.
* | | | | make --allow-insecure-repositories message an errorDavid Kalnischkies2014-10-131-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not using this option, but using unsigned (and co) repositories will cause these repositories to be ignored and data acquiring from them fails, so this is very well in the realms of an error and helps in making 'apt-get update' fail with a non-zero error code as well.
* | | | | remove useless pdiff filename outputDavid Kalnischkies2014-10-101-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Looks like a leftover from debugging. Absolutely no need for it and destroys progess reporting completely. Closes: 764737
* | | | | Only rename StatError files in AbortTransaction()Michael Vogt2014-10-081-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a race that we see in travis when two copy operations finish at about the same time but the bad one first. This lead to a rename of the good one and triggers a error when apt tries to verify the good version but can no longer find it.
* | | | | releasing package apt version 1.1~exp4Michael Vogt2014-10-081-1/+1
| | | | |
* | | | | prepare 1.1~exp4Michael Vogt2014-10-081-0/+80
| | | | |
* | | | | Fix ServerMethod::FindMaximumObjectSizeInQueue()Michael Vogt2014-10-081-1/+1
| | | | | | | | | | | | | | | | | | | | Git-Dch: ignore
* | | | | pkgAcqArchive::QueueNext(): change owner/permission of DestFileMichael Vogt2014-10-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | The code was using FinalFile before but we only test the existance of DestFile so we use that instead.
* | | | | Merge branch 'debian/sid' into debian/experimentalMichael Vogt2014-10-081-0/+28
|\| | | | | | | | | | | | | | | | | | | | | | | | Conflicts: debian/changelog
| * | | | releasing package apt version 1.0.9.2Michael Vogt2014-10-021-0/+28
| | | | |
| * | | | apt-get: Create the temporary downloaded changelog inside tmpdirGuillem Jover2014-10-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code is creating a secure temporary directory, but then creates the changelog alongside the tmpdir in the same base directory. This defeats the secure tmpdir creation, making the filename predictable. Inject a '/' between the tmpdir and the changelog filename.
| * | | | debian/rules: add hardening=+allMichael Vogt2014-10-011-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because of dpkg-buildflags we already get most of the hardening features, +all adds -fPIE and ld -z now Thanks: Simon Ruderich, Markus Waldeck
* | | | | Merge remote-tracking branch 'mvo/feature/expected-size' into ↵Michael Vogt2014-10-0815-39/+155
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | debian/experimental
| * | | | | Fix http pipeline messup detectionMichael Vogt2014-10-082-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Maximum-Size protection breaks the http pipeline reorder code because it relies on that the object got fetched entirely so that it can compare the hash of the downloaded data. So instead of stopping when the Maximum-Size of the expected item is reached we only stop when the maximum size of the biggest item in the queue is reached. This way the pipeline reoder code keeps working.
| * | | | | Merge remote-tracking branch 'donkult/feature/acq-trans' into ↵Michael Vogt2014-10-084-11/+26
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | feature/expected-size
| * | | | | | Send "Fail-Reason: MaximumSizeExceeded" from the methodMichael Vogt2014-10-076-6/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Communicate the fail reason from the methods to the parent and Rename() failed files.
| * | | | | | Add new Acquire::MaxReleaseFileSize=10*1000*1000 optionMichael Vogt2014-10-073-31/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This option controls the maximum size of Release/Release.gpg/InRelease files. The rational is that we do not know the size of these files in advance and we want to protect against a denial of service attack where someone sends us endless amounts of data until the disk is full (we do know the size all other files (Packages/Sources/debs)).
| * | | | | | Merge branch 'feature/acq-trans' into feature/expected-sizeMichael Vogt2014-10-0743-1146/+2043
| |\ \ \ \ \ \
| * | | | | | | make expected-size a maximum-size check as this is what we want at this pointMichael Vogt2014-10-0710-19/+31
| | | | | | | |
| * | | | | | | fix test-cve-2013-1051-InRelease-parsing (fails now in the method)Michael Vogt2014-10-071-1/+1
| | | | | | | |
| * | | | | | | add ftp expected size checkMichael Vogt2014-10-073-5/+8
| | | | | | | |
| * | | | | | | methods/https.cc: use File->Tell() here tooMichael Vogt2014-10-071-2/+1
| | | | | | | |
| * | | | | | | make http size check workMichael Vogt2014-10-06308-81287/+92461
| |\ \ \ \ \ \ \
| * | | | | | | | make https honor ExpectedSize as wellMichael Vogt2014-08-262-1/+8
| | | | | | | | |
| * | | | | | | | Pass ExpectedSize to tthe backend methodMichael Vogt2014-08-267-3/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ensures that we can stop downloading if the server send too much data by accident (or by a malicious attempt)