summaryrefslogtreecommitdiff
path: root/apt-pkg
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | | | deprecate Pkg->Name in favor of Grp->NameDavid Kalnischkies2014-09-274-11/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They both store the same information, so this field just takes up space in the Package struct for no good reason. We mark it "just" as deprecated instead of instantly removing it though as it isn't misleading like Section was and is potentially used in the wild more often.
* | | | | | | | | Remove check for "Translation-" from pkgAcqIndex::Custom600Headers()Michael Vogt2014-09-251-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This unneeded because pkgAcqIndexTrans has its own Custom600Headers() method.
* | | | | | | | | Revert making pkgAcquire::Item::DescURI() "const"Michael Vogt2014-09-251-12/+12
| |_|_|_|_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert because its a API change and the gain does not justify the extra work to make the required changes in the consumers of this interface at this point.
* | | | | | | | DropPrivs: Document what it doesJulian Andres Klode2014-09-241-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Git-Dch: ignore
* | | | | | | | DropPrivs: Use APT::Sandbox::User instead of Apt::User::NobodyJulian Andres Klode2014-09-241-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Git-Dch: ignore
* | | | | | | | DropPrivs: Hard-fail if the user does not existJulian Andres Klode2014-09-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Git-Dch: ignore
* | | | | | | | DropPrivs: Add some comments for the more obscure setuid/setgid functionsJulian Andres Klode2014-09-241-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Git-Dch: ignore
* | | | | | | | DropPrivs: Move the re-set uid/gid thing to the end of the functionJulian Andres Klode2014-09-241-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Git-Dch: ignore
* | | | | | | | methods: Fail if we cannot drop privilegesJulian Andres Klode2014-09-242-1/+13
| | | | | | | |
* | | | | | | | DropPrivs: Improve commentsJulian Andres Klode2014-09-241-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Git-Dch: ignore
* | | | | | | | DropPrivs: Also check for saved set-user-ID and set-group-IDJulian Andres Klode2014-09-241-0/+20
| | | | | | | |
* | | | | | | | DropPrivs: Do not use an invalid return check for setgroups()Julian Andres Klode2014-09-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | setgroups() returns 0 on success Git-Dch: ignore
* | | | | | | | Use _apt as our unprivileged user nameJulian Andres Klode2014-09-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some people want to standardize on it, and BSDs do it too, so let's do the same. Reported-by: Paul Wise <pabs@debian.org>
* | | | | | | | DropPriv: Really call seteuid and not setuid, and add more checksJulian Andres Klode2014-09-241-11/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only thing we are missing is non-portable saved ids support.
* | | | | | | | Drop Privileges to "Debian-apt" in most acquire methodsMichael Vogt2014-09-241-1/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new "Debian-apt" user that owns the /var/lib/apt/lists and /var/cache/apt/archive directories. The methods http, https, ftp, gpgv, gzip switch to this user when they start. Thanks to Julian and "ioerror" and tors "switch_id()" code.
* | | | | | | | fix testsMichael Vogt2014-09-231-1/+1
| |_|_|_|/ / / |/| | | | | |
* | | | | | | Merge branch 'debian/sid' into debian/experimentalMichael Vogt2014-09-238-127/+265
|\| | | | | | | |_|_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: apt-pkg/acquire-item.cc apt-pkg/acquire-item.h apt-pkg/cachefilter.h configure.ac debian/changelog
| * | | | | Ensure that iTFRewritePackageOrder is "MD5sum" to match apt-ftparchiveMichael Vogt2014-09-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The iTFRewritePackageOrder is used in indexcopy to copy and normalize cdrom Packages files. This change will ensure that there is no "normalization" that changes MD5sum -> MD5Sum which alters the hash of the Packages file on disk (oh the irony).
| * | | | | Fix regression for cdrom: sources from latest security updateMichael Vogt2014-09-211-0/+6
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Skip a reverify for cdrom: sources. The reverify step is actually harmful here because the apt-cdrom add code uses the indexcopy.cc which will "normalize" the Packages file from the cdrom when it writes it to the local disk. This leads to changing the "MD5sum" field (notice the lower case "s") on the cdrom Packages file to a "MD5Sum" field on the local file in /var/lib/apt/lists. Which of course alters the hash and makes apt fail to reverify the file.
| * | | | improve test for commit daff4aMichael Vogt2014-09-171-2/+3
| | | | |
| * | | | Fix regression for file:/// uris from CVE-2014-0487Michael Vogt2014-09-171-12/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not run ReverifyAfterIMS() for local file URIs as this will causes apt to mess around in the file:/// uri space. This is wrong in itself, but it will also cause a incorrect verification failure when the archive and the lists directory are on different partitions as rename().
| * | | | SECURITY UPDATE for CVE-2014-{0488,0487,0489}Michael Vogt2014-09-163-22/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | incorrect invalidating of unauthenticated data (CVE-2014-0488) incorect verification of 304 reply (CVE-2014-0487) incorrect verification of Acquire::Gzip indexes (CVE-2014-0489)
| * | | | Allow override of Proxy-Auto-Detect by the users configurationMichael Vogt2014-09-121-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only run the Proxy-Auto-Detect code if there is not already a host specific configuration. Closes: 759264
| * | | | rework PTY magic to fix stair-stepping on kfreebsdDavid Kalnischkies2014-09-082-53/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A pty slave we have got from openpty can only be used for one dpkg child, if we give it to a second child on kfreebsd setting TIOCSCTTY fails causing the output to be stair-stepped from now on. By switching the code to creating a master and opening a new slave in the child for each child we can fix this glitch, so that at least the master remains stable. Closes: 759684
| * | | | fix progress report for upgrade and reinstallDavid Kalnischkies2014-09-081-38/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | APT treats upgrades like installs and dpkg is very similar in this, but prints still a slightly different processing message indicating that it is really an upgrade which we hadn't parsed so far, but this wasn't really visible as we quickly moved on to a 'known' state. More problematic was the reinstall case as apt hadn't recognized this for the package name detection, so that reinstalls had no progress since we introduced MultiArch.
| * | | | strip everything spacey in APT::String::StripDavid Kalnischkies2014-09-071-6/+18
| | | | | | | | | | | | | | | | | | | | Git-Dch: Ignore
| * | | | make GetLocalitySortedVersionSet more genericDavid Kalnischkies2014-09-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No reason in and of by itself at the moment, but prepares for the goal of having 'apt search' and 'apt-cache search' using the same code now that they at least support the same stuff. The 'apt' code is just a multitude slower at the moment… Git-Dch: Ignore
* | | | | Merge branch 'debian/sid' into debian/experimentalMichael Vogt2014-09-059-15/+168
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: apt-pkg/acquire-item.cc configure.ac debian/changelog doc/apt-verbatim.ent doc/po/apt-doc.pot doc/po/de.po doc/po/es.po doc/po/fr.po doc/po/it.po doc/po/ja.po doc/po/pt.po po/ar.po po/ast.po po/bg.po po/bs.po po/ca.po po/cs.po po/cy.po po/da.po po/de.po po/dz.po po/el.po po/es.po po/eu.po po/fi.po po/fr.po po/gl.po po/hu.po po/it.po po/ja.po po/km.po po/ko.po po/ku.po po/lt.po po/mr.po po/nb.po po/ne.po po/nl.po po/nn.po po/pl.po po/pt.po po/pt_BR.po po/ro.po po/ru.po po/sk.po po/sl.po po/sv.po po/th.po po/tl.po po/tr.po po/uk.po po/vi.po po/zh_CN.po po/zh_TW.po test/integration/test-ubuntu-bug-346386-apt-get-update-paywall
| * | | | Ensure we have a Policy in CacheFile.BuildDepCache()Michael Vogt2014-09-051-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This partly reverts d059cc2 and fixes bug #753297 in a more general way by ensuring that CacheFile.BuildDepCache() builds a pkgPolicy if there isn't one already.
| * | | | * apt-pkg/deb/dpkgpm.cc:Michael Vogt2014-09-021-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - update string matching for dpkg I/O errors. (LP: #1363257) - properly parse the dpkg status line so that package name is properly set and an apport report is created. Thanks to Anders Kaseorg for the patch. (LP: #1353171)
| * | | | Make Proxy-Auto-Detect check for each hostMichael Vogt2014-09-022-0/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When doing Acquire::http{,s}::Proxy-Auto-Detect, run the auto-detect command for each host instead of only once. This should make using "proxy" from libproxy-tools feasible which can then be used for PAC style or other proxy configurations. Closes: #759264
| * | | | initialize iPolicyBrokenCount in DepCache::UpdateWarren He2014-08-291-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All other counters are correctly initialized here, expect this one. The practical effect is low as in apt we usually just do "!= 0" checks, but only correct counters are good counters. Closes: 758397
| * | | | support versioned provides as implemented by dpkgDavid Kalnischkies2014-08-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | APT supported versioned provides for a long while in an attempt to get it working with rpm. While this support is old, we can be relatively sure that it works as versioned provides are used internally to make Multi-Arch:foreign work. Previous versions of apt will print a warning indicating that the versioned provides is ignored, so that something which "Provides: foo (= 2)" doesn't provide anything. Note that dpkg does allow only a equals-relation in the provides line as anything else is deemed too complex. apt doesn't support anything else either and such a support would require potentially big changes. Closes: 758153
| * | | | Fix debListParser to accept "no" as a value for the Multi-Arch fieldJulian Andres Klode2014-08-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Seems this was missed somehow. Closes: #759099
| * | | | Fix SmartConfigure to ignore ordering of packages that are already validMichael Vogt2014-07-291-1/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the change of SmartConfigure() in git commit 42d51f the ordering code was trying to re-order dependencies, even when at this point in time this was not needed. Now it will first check all targets of the given dependency and only if there is not a good one try to reorder and unpack/configure as needed. Closes: LP: #1347721
| * | | | apt-pkg/acquire-item.cc: make pkgAcqDiffIndex more uniformMichael Vogt2014-07-171-2/+2
| | | | |
| * | | | StringToBool: only act if the entire string is consumed by strtol()Michael Vogt2014-07-161-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | StringToBool uses strtol() internally to check if the argument is a number. This function stops when it does not find any more numbers. So a string like "0ad" (which is a valid packagename) is interpreted as a "0". The code now checks that the entire string is consumed not just a part of it. Thanks to Johannes Schauer for raising this issue.
* | | | | Fix debListParser to accept "no" as a value for the Multi-Arch fieldJulian Andres Klode2014-08-241-1/+1
| |/ / / |/| | | | | | | | | | | | | | | | | | | Seems this was missed somehow. Closes: #759099
* | | | Do not crash for apt-get install /dev/nullMichael Vogt2014-07-161-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Thanks to Jakub Wilk for the bugreport. Closes: #754904
* | | | Allow passing a full path to apt-get install /foo/bar.debMichael Vogt2014-07-102-10/+27
| | | | | | | | | | | | | | | | CLoses: #752327
* | | | Only allow "apt-get build-dep path" when path starts with ./ or /Michael Vogt2014-07-082-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | This avoid the subtle problem that someone might have a directory with the same package name as the build-depends he/she is trying to fetch. Also print a note that the specific file/dir is used.
* | | | Merge branch 'debian/sid' into debian/experimentalMichael Vogt2014-07-085-36/+28
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: apt-pkg/deb/deblistparser.cc doc/po/apt-doc.pot doc/po/de.po doc/po/es.po doc/po/fr.po doc/po/it.po doc/po/ja.po doc/po/pl.po doc/po/pt.po doc/po/pt_BR.po po/da.po po/mr.po po/vi.po
| * | | Do not clean "/" in pkgAcquire::Clean/pkgArchiveCleanerMichael Vogt2014-07-082-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Having "/" here is most likely a user configuration error and may cause removal of import symlinks like /vmlinuz Closes: #753531
| * | | handle moved mmap after UniqFindTagWrite callDavid Kalnischkies2014-07-071-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A call to UniqFindTagWrite can trigger the need for a bigger mmap, which is usually done by moving it, but with this move all pointers into it become invalid (and have to be remapped). The compiler calculates the pointer before the execution of the call though, so it tries to store the returned value at the old location, resulting in a segfault. We solve this by use of a temprorary variable as we did in the other instances of this problem before. Closes: #753941
| * | | Try not to parse invalid translation files (LP: #756317)Michael Vogt2014-07-032-34/+19
| | | |
* | | | Add new Base256ToNum long long overload functionGuillem Jover2014-07-082-1/+19
| | | |
* | | | apt-pkg/indexrecords.cc: ensure that indexRecords::checkSum::Hash is initializedMichael Vogt2014-06-181-0/+8
| | | |
* | | | apt-pkg/acquire-item.h: add default argument to ExpectedHashes to avoid API ↵Michael Vogt2014-06-181-1/+2
| | | | | | | | | | | | | | | | break
* | | | readd pkgPackageManager::Go() to not break APIMichael Vogt2014-06-183-20/+2
| | | |
* | | | correct 'apt-cache stats' to include moreDavid Kalnischkies2014-06-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It still doesn't reflect the size the cache has on the disk compared to what is given as total size (90 vs 103 MB), but by counting all structs in we are at least a bit closer to the reality. Git-Dch: ignore