summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib
Commit message (Collapse)AuthorAgeFilesLines
* fix typo (mkostemp->mkstemp)Michael Vogt2013-08-311-1/+1
|
* use mkstemp instead of mkostemp in FileFd::Open()David Kalnischkies2013-08-271-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
* replace usage of potential dangerous mktemp with mkstempAngel Guzman Maeso2013-08-271-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.
* apt-pkg:contrib Avoid compiler warning about sign-compareÁngel Guzmán Maeso2013-08-221-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
* Merge remote-tracking branch 'mvo/bugfix/coverity' into debian/sidMichael Vogt2013-08-222-0/+3
|\ | | | | | | | | Conflicts: apt-pkg/tagfile.h
| * some more coverity fixesMichael Vogt2013-08-122-0/+3
| |
* | Merge remote-tracking branch 'mvo/feature/apt-binary2' into debian/sidMichael Vogt2013-08-174-0/+70
|\ \ | | | | | | | | | | | | Conflicts: cmdline/apt-get.cc
| * | squash merge of the feature/apt-binary branch without the changes from ↵Michael Vogt2013-08-124-0/+70
| |/ | | | | | | experimental
* | * lp:~mvo/apt/add-glob-function:Michael Vogt2013-08-152-0/+34
| | | | | | | | | | | | | | - add Glob() to fileutl.{cc,h} Conflicts: apt-pkg/contrib/fileutl.h debian/changelog
* | * lp:~mvo/apt/config-clear:Michael Vogt2013-08-152-0/+13
|/ | | | | | | - support Configuration.Clear() for a clear of the entire configuration Conflicts: debian/changelog
* Merge remote-tracking branch 'upstream/debian/sid' into bugfix/coverityMichael Vogt2013-08-052-9/+24
|\
| * Merge remote-tracking branch 'mvo/bugfix/coverity' into debian/sidMichael Vogt2013-07-284-13/+15
| |\
| * | ensure that FileFd::Size returns 0 in error casesDavid Kalnischkies2013-07-261-5/+18
| | |
| * | proper cleanup varargs in _error (uncovered by Coverity)David Kalnischkies2013-07-261-4/+6
| | | | | | | | | | | | Git-Dch: Ignore
* | | fix some unitialized data membersMichael Vogt2013-08-051-1/+3
| |/ |/|
* | fix another missing va_end()Michael Vogt2013-07-261-3/+3
| |
* | add missing "free(buffer) for allocated bufferMichael Vogt2013-07-251-1/+0
| |
* | fix resource leak (thanks coverity)Michael Vogt2013-07-251-4/+8
| |
* | rework the code in cdromutl.cc to make coverity (more) happyMichael Vogt2013-07-251-1/+2
| |
* | fix off-by-one error and do not use magic constant of 100 when checking ↵Michael Vogt2013-07-251-1/+1
| | | | | | | | StackPost
* | always "delete d" in FileFd::~FileFd to coverity happyMichael Vogt2013-07-251-4/+2
|/
* fix SHA2* cleanups to zero-out the complete contextDavid Kalnischkies2013-06-241-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
* trigger NODATA error for invalid InRelease filesDavid Kalnischkies2013-06-202-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
* support \n and \r\n line endings in ReadMessagesDavid Kalnischkies2013-06-201-2/+3
|
* fail in CopyFile if the FileFds have error flag setDavid Kalnischkies2013-06-091-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.
* OpenDescriptor should autoclose fd always on errorDavid Kalnischkies2013-06-091-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
* set Fail flag in FileFd on all errors consistentlyDavid Kalnischkies2013-06-092-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.
* make the vprintf like _error->Insert publicDavid Kalnischkies2013-06-091-6/+35
| | | | Git-Dch: Ignore
* fix double free (closes: #711045)Michael Vogt2013-06-061-2/+5
|
* merged patch from Daniel Hartwig to fix URI and proxy releated issuesMichael Vogt2013-05-081-4/+5
|
* merged bundle from davidMichael Vogt2013-04-084-15/+13
|\
| * various simple changes to fix cppcheck warningsDavid Kalnischkies2013-03-104-15/+13
| |
* | apt-pkg/contrib/gpgv.cc: fix InRelease checkMichael Vogt2013-04-031-2/+2
| |
* | merged lp:~mvo/apt/fix-inrelease5Michael Vogt2013-04-024-1/+475
|\ \ | |/ |/|
| * support dash-escaped text in clearsigned files as implementations areDavid Kalnischkies2013-03-192-14/+12
| | | | | | | | | | | | | | | | free to escape all lines (we have no lines in our files which need to be escaped as these would be invalid fieldnames) and while ExecGPGV would detect dash-escaped text as invalid (as its not expected in messages with detached signatures) it would be possible to "comment" lines in (signed) dsc files which are only parsed but not verified
| * use FileFd instead of int fds to tidy up the interface a bitDavid Kalnischkies2013-03-192-62/+53
| |
| * * apt-pkg/deb/debindexfile.cc,David Kalnischkies2013-03-182-56/+2
| | | | | | | | | | | | | | | | | | | | | | apt-pkg/deb/deblistparser.cc: - use OpenMaybeClearSignedFile to be free from detecting and skipping clearsigning metadata in dsc and Release files We can't write a "clean" file to disk as not all acquire methods copy Release files before checking them (e.g. cdrom), so this reverts recombining, but uses the method we use for dsc files also in the two places we deal with Release files
| * - add method to open (maybe) clearsigned files transparentlyDavid Kalnischkies2013-03-182-1/+76
| | | | | | | | | | * ftparchive/writer.cc: - use OpenMaybeClearSignedFile to be free from detecting and skipping clearsigning metadata in dsc files
| * ensure that we fclose/unlink/free in the new gpg-code as soon as possibleDavid Kalnischkies2013-03-161-5/+22
| |
| * - if ExecGPGV deals with a clear-signed file it will split this fileDavid Kalnischkies2013-03-152-45/+298
| | | | | | | | | | | | | | | | into data and signatures, pass it to gpgv for verification and recombines it after that in a known-good way without unsigned blocks and whitespaces resulting usually in more or less the same file as before, but later code can be sure about the format * apt-pkg/deb/debmetaindex.cc: - reenable InRelease by default
| * split out a method to strip whitespaces only on the right sideMichael Vogt2013-03-152-1/+8
| |
| * don't close stdout/stderr if it is also the statusfdDavid Kalnischkies2013-03-151-10/+11
| |
| * * apt-pkg/contrib/gpgv.cc:David Kalnischkies2013-03-152-12/+36
| | | | | | | | - ExecGPGV is a method which should never return, so mark it as such and fix the inconsistency of returning in error cases
| * * apt-pkg/indexcopy.cc:David Kalnischkies2013-03-152-0/+162
| | | | | | - rename RunGPGV to ExecGPGV and move it to apt-pkg/contrib/gpgv.cc
* | include two missing patches to really fix bug #696225, thanks toMichael Vogt2013-03-011-1/+1
| | | | | | Guillem Jover
* | * apt-pkg/contrib/progress.cc:Michael Vogt2013-01-091-2/+2
|/ | | | | | - Make "..." translatable to fix inconsistencies in the output of e.g. apt-get update. While this adds new translatable strings, not having translations for them will not break anything. Thanks to Guillem Jover. Closes: #696225
* merge from lp:~donkult/apt/sidMichael Vogt2012-10-152-35/+36
|\
| * remove 256 char line limit by using getline() (POSIX.1-2008)David Kalnischkies2012-10-131-3/+5
| |
| * * apt-pkg/contrib/netrc.cc:David Kalnischkies2012-10-131-16/+27
| | | | | | - remove the 64 char limit for login/password in internal usage
* | merged lp:~mvo/apt/mvoMichael Vogt2012-10-121-5/+16
|\ \ | |/ |/|