summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib
Commit message (Collapse)AuthorAgeFilesLines
* 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
* 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.
* Merge branch 'debian/sid' into debian/experimentalMichael Vogt2014-09-233-6/+24
|\ | | | | | | | | | | | | | | | | Conflicts: apt-pkg/acquire-item.cc apt-pkg/acquire-item.h apt-pkg/cachefilter.h configure.ac debian/changelog
| * SECURITY UPDATE for CVE-2014-{0488,0487,0489}Michael Vogt2014-09-161-0/+2
| | | | | | | | | | | | 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
| * strip everything spacey in APT::String::StripDavid Kalnischkies2014-09-071-6/+18
| | | | | | | | Git-Dch: Ignore
* | Merge branch 'debian/sid' into debian/experimentalMichael Vogt2014-09-053-3/+104
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * 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
| * 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.
* | 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.
* | Add new Base256ToNum long long overload functionGuillem Jover2014-07-082-1/+19
| |
* | Merge remote-tracking branch 'donkult/debian/sid' into debian/experimentalMichael Vogt2014-06-181-7/+14
|\| | | | | | | | | Conflicts: apt-private/private-install.cc
| * fix SubstVar to be usable as a replace_all methodDavid Kalnischkies2014-06-181-7/+14
| | | | | | | | | | | | | | The name suggests that it is supposed to substitute a variable with a value, but we tend to use it in a more liberal replace_all() fashion, but this breaks if either of the parameters is empty or more importantly if two "variable" occurrences follow each other directly.
* | Merge remote-tracking branch 'mvo/feature/drop-rights' into debian/experimentalMichael Vogt2014-06-182-0/+22
|\ \ | | | | | | | | | | | | | | | Conflicts: apt-pkg/contrib/fileutl.cc apt-pkg/contrib/fileutl.h
| * | DropPrivs in the solvers (just to be on the safe side)Michael Vogt2014-06-112-0/+20
| |/
* | Merge branch 'debian/sid' into debian/experimentalMichael Vogt2014-06-181-2/+4
|\| | | | | | | | | Conflicts: debian/changelog
| * without a filename we can't stat pipesDavid Kalnischkies2014-05-301-1/+2
| | | | | | | | | | | | | | | | | | EDSP code uses pipes opened via an FD as sources and later for those files modification times and filesize are read - but never really used again. The result we get from FileFd is probably wrong, but as we don't use it anyway, we just don't fallback if we have nothing to fallback to Git-Dch: Ignore
| * use free() instead of delete() when realloc is usedMichael Vogt2014-05-271-1/+2
| | | | | | | | | | | | | | ContentsExtract::~ContentsExtract() needs to use free() because Data got allocated via realloc() Reported-By: clang -fsanitize=address -fno-omit-frame-pointer
* | use HashStringList in the acquire systemDavid Kalnischkies2014-05-092-44/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | It is not very extensible to have the supported Hashes hardcoded everywhere and especially if it is part of virtual method names. It is also possible that a method does not support the 'best' hash (yet), so we might end up not being able to verify a file even though we have a common subset of supported hashes. And those are just two of the cases in which it is handy to have a more dynamic selection. The downside is that this is a MAJOR API break, but the HashStringList has a string constructor for compatibility, so with a bit of luck the few frontends playing with the acquire system directly are okay.
* | add a simple container for HashStringsDavid Kalnischkies2014-05-092-16/+187
| | | | | | | | | | | | | | | | APT supports more than just one HashString and even allows to enforce the usage of a specific hash. This class is intended to help with storage and passing around of the HashStrings. Git-Dch: Ignore
* | Merge remote-tracking branch 'mvo/bugfix/update-progress-reporting' into ↵Michael Vogt2014-05-082-1/+3
|\| | | | | | | debian/experimental
| * Merge remote-tracking branch 'mvo/feature/apt-ftparchive-srccache2' into ↵Michael Vogt2014-05-072-1/+3
| |\ | | | | | | | | | debian/sid
| | * Implement CacheDB for source packages in apt-ftparchiveMichael Vogt2014-04-042-1/+3
| | |
* | | fix some compile errors in the now enabled #if (APT_PKG_MAJOR >= 4 && ↵Michael Vogt2014-05-072-5/+5
| | | | | | | | | | | | APT_PKG_MINOR < 13)
* | | apt-pkg/contrib/macros.h: bump library version to 4.13Michael Vogt2014-05-071-1/+1
| | |
* | | Merge remote-tracking branch 'mvo/feature/apt-install-deb' into ↵Michael Vogt2014-05-072-1/+114
|\ \ \ | | | | | | | | | | | | debian/experimental
| * \ \ Merge branch 'feature/abspath' into feature/apt-install-debMichael Vogt2014-04-282-0/+20
| |\ \ \ | | | | | | | | | | | | | | | | | | | | Conflicts: test/libapt/fileutl_test.cc
| | * | | add flAbsPath() as a wrapper to realpath()Michael Vogt2014-04-282-0/+20
| | | | |
| * | | | Merge branch 'feature/popen' into feature/apt-install-debMichael Vogt2014-04-282-0/+67
| |\ \ \ \
| | * | | | Implement Popen() execv helper to avoid popen()Michael Vogt2014-04-282-0/+67
| | |/ / /
| * / / / WIP local deb installMichael Vogt2014-04-282-1/+27
| |/ / /
* | | | Merge branch 'debian/sid' into debian/experimentalMichael Vogt2014-05-0730-389/+743
|\ \ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: apt-pkg/cachefilter.h apt-pkg/contrib/fileutl.cc apt-pkg/contrib/netrc.h apt-pkg/deb/debsrcrecords.cc apt-pkg/init.h apt-pkg/pkgcache.cc debian/apt.install.in debian/changelog
| * | | fix FileFd::Size bitswap on big-endian architecturesAdam Conrad2014-04-261-13/+4
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | gzip only gives us 32bit of size, storing it in a 64bit container and doing a 32bit flip on it has therefore unintended results. So we just go with a exact size container and let the flipping be handled by eglibc provided le32toh removing our #ifdef machinery. Closes: 745866
| * | clear HitEof flag in FileFd::SeekDavid Kalnischkies2014-04-161-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | fseek and co do this to their eof-flags and it is more logic this way as we will usually seek away from the end (e.g. to re-read the file). The commit also improves the testcase further and adds a test for the binary compressor codepath (as gz, bzip2 and xz are handled by libraries) via the use of 'rev' as a 'compressor'.
| * | deal with umask only if we really need to for mkstempDavid Kalnischkies2014-04-111-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | As the comment actually says: open() does the umask dance by itself, so we don't need to do it for it. We have to do it after mkstemp in Atomic though, so move it into the if. Also removes the "micro-optimisation" "FilePermissions == 600" as it doesn't trigger at the moment anyway as 600 != 0600.
| * | don't double-count seeks in FileFd::Skip for bzip/xzDavid Kalnischkies2014-04-111-1/+0
| | | | | | | | | | | | | | | FileFd::Read already deals with the increase of the skipposition so that we as the caller in FileFd::Skip really shouldn't increase it, too.
| * | improve umask/fchmod code readabilityMichael Vogt2014-04-101-5/+8
| | |
| * | Rename FileFd::Open() Perms to AccessModeMichael Vogt2014-04-102-14/+14
| | | | | | | | | | | | | | | | | | | | | Bug lp:#1304657 was caused by confusion around the name Perms. The new name AccessMode should make it clear that its not the literal file permissions but instead the AccessMode passed to open() (i.e. the umask needs to be applied)
| * | Fix insecure file permissions when using FileFd with OpenMode::AtomicMichael Vogt2014-04-101-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 7335eebea6dd43581d4650a8818b06383ab89901 introduced a bug that caused FileFd to create insecure permissions when FileFd::Atomic is used. This commit fixes the permissions and adds a test. The bug is most likely caused by the confusing "Perm" parameter that is passed to Open() - its not the file permissions but intead the "mode" part of open/creat.
| * | Add new Debug::RunScripts optionMichael Vogt2014-04-011-1/+5
| |/ | | | | | | | | This debug option will display all scripts that are run by apts RunScripts and RunScriptsWithPkgs helpers.
| * mark optional (private) symbols as hiddenDavid Kalnischkies2014-03-211-3/+3
| | | | | | | | | | | | | | | | This methods should not be used by anyone expect the library itself as they are helpers for the specific class and therefore perfect candidates for hidding. Git-Dch: Ignore