summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib
AgeCommit message (Collapse)AuthorFilesLines
2014-01-16rework some code to fix some scan-build warningsDavid Kalnischkies2-4/+10
No visible functional changes, just code moved around and additional checks to eliminate impossible branches Reported-By: scan-build Git-Dch: Ignore
2013-12-23add basic tests for GetTempDir()Michael Vogt1-1/+1
2013-12-22factor GetTempDir outMichael Vogt3-13/+21
2013-12-22apt-pkg/contrib/gpgv.cc: use /tmp as fallback dirThomas Bechtold1-1/+6
if the directory given by $TMPDIR is not available, use /tmp as fallback.
2013-11-30truncating /dev/null to zero is always successfulDavid Kalnischkies1-0/+3
Calling truncate on /dev/null can happen by the download methods if they are instructed to download a file to /dev/null (as testcases are only interested in the status code, but do not support HEAD requests yet) So just ignore truncate calls on the /dev/null file as it is always empty anyway, so truncating to zero isn't a problem. Git-Dch: Ignore
2013-11-29Merge remote-tracking branch 'mvo/debian/sid' into debian/sidMichael Vogt4-5/+38
Conflicts: apt-private/private-cmndline.cc
2013-11-29add "APT::String::Endswith" and automatic adding of ".list" in apt edit-sourceMichael Vogt2-0/+9
2013-11-28fix regression that APT::Keep-Fds is not honored (closes: #730490)Michael Vogt2-8/+19
2013-11-26add check when sources.list changedMichael Vogt2-5/+29
2013-11-01small documentation updates0.9.13_exp1Michael Vogt1-1/+2
2013-10-31add new pid_t ExecFork(std::set<int> KeepFDs) to get rid of the super ugly ↵Michael Vogt2-14/+21
APT::Keep-Fds hack and also add a new PackageManagerProgressFd::StartDpkg() progress state
2013-10-18re-add missing APT::String::StripMichael Vogt2-1/+23
2013-10-07fix libapt-inst for >2G debs (closes: #725483)Michael Vogt1-8/+8
2013-10-01change maxsplit default from "0" to maxintMichael Vogt2-3/+3
2013-10-01improve documentation for StringSplit()Michael Vogt2-6/+19
2013-09-07doc updateMichael Vogt2-8/+17
2013-09-07add maxsplit parameter to StringSplitMichael Vogt2-6/+14
2013-09-07implement StringSplit() as we need this to fix the dpkg status-fd output parsingMichael Vogt2-0/+24
2013-08-31fix typo (mkostemp->mkstemp)Michael Vogt1-1/+1
2013-08-27use mkstemp instead of mkostemp in FileFd::Open()David Kalnischkies1-8/+4
FileFd currently supports no fileflags which would make sense to provide via mkostemp, so we can just use mkstemp here which is a standard function compared to glib extension mkostemp. O_CREAT (Create) and O_TRUNC (Empty) are implied by O_EXCL, which is the mode mkstemp uses by default. The file description is opened ReadWrite, but that used to be the default for FileFd in the old times and not a problem as the difference is needed by FileFd to decide in which way the compressor pipeline needs to be created (if any). Git-Dch: Ignore
2013-08-27replace usage of potential dangerous mktemp with mkstempAngel Guzman Maeso1-5/+19
Avoid the warning "the use of `mktemp' is dangerous, better use `mkstemp' or `mkdtemp'". It is not strictly necessary to change the usage from a security point of view here, but mktemp is also removed from the standard since POSIX.1-2008. The mkostemp call returns a file descriptor the logic for TemporaryFileName has been changed accordingly to get the same results. The file permissions are corrected by using fchmod() as the default for FileFd is 666 while mkstemp creates files with 600 by default.
2013-08-22apt-pkg:contrib Avoid compiler warning about sign-compareÁngel Guzmán Maeso1-1/+2
The fix avoid the warning "comparison between signed and unsigned integer expressions [-Wsign-compare]"· The index for the loop needs to be unsigned for compare with globbuf.gl_pathc structure member
2013-08-22Merge remote-tracking branch 'mvo/bugfix/coverity' into debian/sidMichael Vogt2-0/+3
Conflicts: apt-pkg/tagfile.h
2013-08-17Merge remote-tracking branch 'mvo/feature/apt-binary2' into debian/sidMichael Vogt4-0/+70
Conflicts: cmdline/apt-get.cc
2013-08-15* lp:~mvo/apt/add-glob-function:Michael Vogt2-0/+34
- add Glob() to fileutl.{cc,h} Conflicts: apt-pkg/contrib/fileutl.h debian/changelog
2013-08-15* lp:~mvo/apt/config-clear:Michael Vogt2-0/+13
- support Configuration.Clear() for a clear of the entire configuration Conflicts: debian/changelog
2013-08-12squash merge of the feature/apt-binary branch without the changes from ↵Michael Vogt4-0/+70
experimental
2013-08-12some more coverity fixesMichael Vogt2-0/+3
2013-08-05Merge remote-tracking branch 'upstream/debian/sid' into bugfix/coverityMichael Vogt2-9/+24
2013-08-05fix some unitialized data membersMichael Vogt1-1/+3
2013-07-28Merge remote-tracking branch 'mvo/bugfix/coverity' into debian/sidMichael Vogt4-13/+15
2013-07-26fix another missing va_end()Michael Vogt1-3/+3
2013-07-26ensure that FileFd::Size returns 0 in error casesDavid Kalnischkies1-5/+18
2013-07-26proper cleanup varargs in _error (uncovered by Coverity)David Kalnischkies1-4/+6
Git-Dch: Ignore
2013-07-25add missing "free(buffer) for allocated bufferMichael Vogt1-1/+0
2013-07-25fix resource leak (thanks coverity)Michael Vogt1-4/+8
2013-07-25rework the code in cdromutl.cc to make coverity (more) happyMichael Vogt1-1/+2
2013-07-25fix off-by-one error and do not use magic constant of 100 when checking ↵Michael Vogt1-1/+1
StackPost
2013-07-25always "delete d" in FileFd::~FileFd to coverity happyMichael Vogt1-4/+2
2013-06-24fix SHA2* cleanups to zero-out the complete contextDavid Kalnischkies1-6/+6
GCC 4.8 is now clever enough to warn about: contrib/sha2_internal.cc: In function ‘char* SHA256_End(SHA256_CTX*, char*)’: contrib/sha2_internal.cc:656:31: warning: argument to ‘sizeof’ in ‘void* memset(void*, int, size_t)’ call is the same expression as the destination; did you mean to dereference it? [-Wsizeof-pointer-memaccess] MEMSET_BZERO(context, sizeof(context)); So fix it as suggested. Its interesting though that the SHA2* calculation as far as we need it works even without zeroing out. Git-Dch: Ignore
2013-06-20trigger NODATA error for invalid InRelease filesDavid Kalnischkies2-4/+13
With the selfgrown splitting we got the problem of not recovering from networks which just reply with invalid data like those sending us login pages to authenticate with the network (e.g. hotels) back. The good thing about the InRelease file is that we know that it must be clearsigned (a Release file might or might not have a detached sig) so if we get a file but are unable to split it something is seriously wrong, so there is not much point in trying further. The Acquire system already looks out for a NODATA error from gpgv, so this adds a new error message sent to the acquire system in case the splitting we do now ourselves failed including this magic word. Closes: #712486
2013-06-20support \n and \r\n line endings in ReadMessagesDavid Kalnischkies1-2/+3
2013-06-09fail in CopyFile if the FileFds have error flag setDavid Kalnischkies1-1/+2
Testing for global PendingErrors in users of CopyFile is incorrect in so far as unrelated errors will prevent us from copying perfectly fine files and checking for the validity of the files is just better in CopyFiles as it already checks if files are at least opened. Add also a higher-level error message to the error stack if it fails.
2013-06-09OpenDescriptor should autoclose fd always on errorDavid Kalnischkies1-4/+19
OpenInternDescriptor failures would cause additional errors to be generated by double-closing an fd. Other errors (although these are generated if the method is used incorrectly, so unlikely) didn't close the fd aswell. Closes: 704608
2013-06-09set Fail flag in FileFd on all errors consistentlyDavid Kalnischkies2-96/+75
Previously some errors would set the Fail flag while some didn't without a clear reason as all errors leave a bad FileFd behind, so we use a helper now to ensure that all errors set the flag.
2013-06-09make the vprintf like _error->Insert publicDavid Kalnischkies1-6/+35
Git-Dch: Ignore
2013-06-06fix double free (closes: #711045)Michael Vogt1-2/+5
2013-05-08merged patch from Daniel Hartwig to fix URI and proxy releated issuesMichael Vogt1-4/+5
2013-04-08merged bundle from davidMichael Vogt4-15/+13
2013-04-03apt-pkg/contrib/gpgv.cc: fix InRelease checkMichael Vogt1-2/+2