summaryrefslogtreecommitdiff
path: root/apt-pkg
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Merge branch 'debian/sid' into debian/experimentalMichael Vogt2014-10-141-57/+73
|\
| * Update Status field values handlingGuillem Jover2014-10-081-12/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * implement the updated build profile specjosch2014-10-061-45/+67
| |
* | 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.
* | do not load filesize in pkgAcqIndexTrans explicitlyDavid Kalnischkies2014-10-131-4/+0
| | | | | | | | | | | | | | | | 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-135-10/+10
| | | | | | | | | | | | 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-134-6/+21
| | | | | | | | | | | | | | | | 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.
* | trusted=yes sources are secure, we just don't know whyDavid Kalnischkies2014-10-134-14/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | 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 remote-tracking branch 'mvo/feature/expected-size' into ↵Michael Vogt2014-10-085-29/+46
|\ \ | | | | | | | | | debian/experimental
| * \ Merge remote-tracking branch 'donkult/feature/acq-trans' into ↵Michael Vogt2014-10-081-1/+4
| |\ \ | | | | | | | | | | | | feature/expected-size
| * | | Send "Fail-Reason: MaximumSizeExceeded" from the methodMichael Vogt2014-10-071-1/+5
| | | | | | | | | | | | | | | | | | | | Communicate the fail reason from the methods to the parent and Rename() failed files.
| * | | Add new Acquire::MaxReleaseFileSize=10*1000*1000 optionMichael Vogt2014-10-072-28/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-079-1073/+1300
| |\ \ \
| * | | | make expected-size a maximum-size check as this is what we want at this pointMichael Vogt2014-10-073-6/+11
| | | | |
| * | | | make http size check workMichael Vogt2014-10-0665-1352/+2835
| |\ \ \ \
| * | | | | Pass ExpectedSize to tthe backend methodMichael Vogt2014-08-263-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ensures that we can stop downloading if the server send too much data by accident (or by a malicious attempt)
* | | | | | Merge remote-tracking branch 'mvo/feature/acq-trans' into debian/experimentalMichael Vogt2014-10-0810-1074/+1304
|\ \ \ \ \ \ | | |_|_|/ / | |/| | | |
| * | | | | do not show IP in output of testcasesDavid Kalnischkies2014-10-071-1/+4
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On travis-ci connect.cc detects a rotation, triggering it store the IP which is later appended to the error message, which is all nice and great if we deal with a real server, but in the testcases it just triggers failures as strings do not match. Git-Dch: Ignore
| * | | | Merge remote-tracking branch 'upstream/debian/experimental' into ↵Michael Vogt2014-10-0727-300/+423
| |\ \ \ \ | | | |/ / | | |/| | | | | | | | | | | | | | | | | | | | | | feature/acq-trans Conflicts: apt-pkg/acquire-item.cc
| * | | | UpperCase some functions for consistencyMichael Vogt2014-10-071-25/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | changeOwnerAndPermissionOfFile->ChangeOwnerAndPermissionOfFile preparePartialFile->GetPartialFileName preparePartialFileFromURI->GetPartialFileNameFromURI Git-Dch: ignore
| * | | | display errortext for all Err as well as Ign logsDavid Kalnischkies2014-10-071-41/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | consistently using Item::Failed in all specializec classes helps setting up some information bits otherwise unset, so some errors had an empty reason as an error. Ign is upgraded to display the error message we ignored to further help in understanding what happens.
| * | | | use _apt:root only for partial directoriesDavid Kalnischkies2014-10-073-59/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using a different user for calling methods is intended to protect us from methods running amok (via remotely exploited bugs) by limiting what can be done by them. By using root:root for the final directories and just have the files in partial writeable by the methods we enhance this in sofar as a method can't modify already verified data in its parent directory anymore. As a side effect, this also clears most of the problems you could have if the final directories are shared without user-sharing or if these directories disappear as they are now again root owned and only the partial directories contain _apt owned files (usually none if apt isn't running) and the directory itself is autocreated with the right permissions.
| * | | | ensure partial dirs are 0700 and owned by _apt:rootDavid Kalnischkies2014-10-073-31/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reworks the API involved in creating and setting up the fetcher to be a bit more pleasent to look at and work with as e.g. an empty string for no lock isn't very nice. With the lock we can also stop creating all our partial directories "just in case". This way we can also be a bit more aggressive with the partial directory itself as with a lock, we know we will gone need it.
| * | | | fixup foldmarkers in acquire-item.ccDavid Kalnischkies2014-10-071-91/+51
| | | | | | | | | | | | | | | | | | | | Git-Dch: Ignore
| * | | | fix warningsMichael Vogt2014-10-061-3/+3
| | | | |
| * | | | rename StopAuthentication -> CheckStopAuthentication and make it protectedMichael Vogt2014-10-062-9/+11
| | | | |
| * | | | rename AuthDone() -> CheckAuthDone()Michael Vogt2014-10-062-6/+4
| | | | |
| * | | | cleanup pkgAcq*::Failed()Michael Vogt2014-10-062-72/+54
| | | | |
| * | | | add missing TransactionStageCopy() in pkgAcqDiffIndex::Done()Michael Vogt2014-10-061-12/+5
| | | | |
| * | | | Rework pkgAcqMeta{Index,Sig,ClearSig}::Done() for readabilityMichael Vogt2014-10-062-209/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move common code out but do not use subclassing for ::Done to make it easier to understand what each class is doing when its done
| * | | | fix incorrect docstrings for ↵Michael Vogt2014-10-061-2/+2
| | | | | | | | | | | | | | | | | | | | AcqMetaBase::TransactionStageRemoval/AcqMetaBase::TransactionStageCopy
| * | | | add new "SetActiveSubprocess()Michael Vogt2014-10-062-46/+25
| | | | |
| * | | | really do not download Release if InRelease does not verifyMichael Vogt2014-10-031-20/+24
| | | | |
| * | | | cleanup around pkgAcqMetaSig and improved testsMichael Vogt2014-10-022-47/+47
| | | | |
| * | | | add a bunch of docstrings etcMichael Vogt2014-10-022-14/+40
| | | | |
| * | | | fix crashMichael Vogt2014-10-022-11/+14
| | | | |
| * | | | donkults fixesMichael Vogt2014-10-022-40/+37
| | | | |
| * | | | Cleanup pkgAcqIndexMichael Vogt2014-10-022-135/+171
| | | | |
| * | | | refactor and add pkgAcqIndex::ValidateFile()Michael Vogt2014-10-012-25/+39
| | | | |
| * | | | fix leftover files from Acquire::GzipIndexMichael Vogt2014-10-011-1/+1
| | | | |
| * | | | hack around test-apt-update-unauth failureMichael Vogt2014-10-011-0/+9
| | | | |
| * | | | update test/integration/test-releasefile-verificationMichael Vogt2014-10-011-9/+9
| | | | |
| * | | | Use Acquire::Allow{InsecureRepositories,DowngradeToInsecureRepositories}Michael Vogt2014-10-012-11/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The configuration key Acquire::AllowInsecureRepositories controls if apt allows loading of unsigned repositories at all. The configuration Acquire::AllowDowngradeToInsecureRepositories controls if a signed repository can ever become unsigned. This should really never be needed but we provide it to avoid having to mess around in /var/lib/apt/lists if there is a use-case for this (which I can't think of right now).