summaryrefslogtreecommitdiff
path: root/usr.bin/bsdiff/bspatch
AgeCommit message (Collapse)Author
2024-07-15Remove residual blank line at start of MakefileWarner Losh
This is a residual of the $FreeBSD$ removal. MFC After: 3 days (though I'll just run the command on the branches) Sponsored by: Netflix
2024-04-19bsdiff: Use mmap instead of mallocRicardo Branco
Note: This follows the current style of the bsdiff.c and bspatch.c files, which is rather far from style(9). Reviewed by: imp, cpervica Pull Request: https://github.com/freebsd/freebsd-src/pull/1076
2023-09-07bspatch: use C23 overflow checking math now that it is availableEd Maste
Reviewed by: des Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D41771
2023-08-16Remove $FreeBSD$: two-line nroff patternWarner Losh
Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
2023-08-16Remove $FreeBSD$: one-line sh patternWarner Losh
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
2023-08-16Remove $FreeBSD$: one-line .c patternWarner Losh
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
2023-05-12spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause. Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
2023-04-18Update/fix Makefile.depend for userlandSimon J. Gerraty
2022-12-22bspatch.1: fix missing argumentMike Karels
Fix typo MFC after: 3 days Reviewed by: gbe Differential Revision: https://reviews.freebsd.org/D37727
2019-09-26bspatch: add integer overflow checksEd Maste
Introduce a new add_off_t static function that exits with an error message if there's an overflow, otherwise returns their sum. Use this when adding values obtained from the input patch. Reviewed by: delphij, allanjude (earlier) MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D7897 Notes: svn path=/head/; revision=352742
2019-07-18errno.h is no longer needed as of r340239 so remove it.Xin LI
No MFC planned as that revision was not merged. Notes: svn path=/head/; revision=350109
2019-07-18Remove support for FreeBSD 10.x.Xin LI
MFC after: 1 month Notes: svn path=/head/; revision=350108
2018-11-07bspatch: simplify capsicumizationMariusz Zaborski
Assume that user wants to run with capsicum support if he builds the software with HAVE_CAPSICUM. Treat running application without capsicum in the kernel as an error. MFC after: 3 weeks Notes: svn path=/head/; revision=340239
2017-11-27various: general adoption of SPDX licensing ID tags.Pedro F. Giffuni
Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. No functional change intended. Notes: svn path=/head/; revision=326276
2017-10-31DIRDEPS_BUILD: Update dependencies.Bryan Drewery
Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
2016-09-20bspatch: Remove backwards-compatibility sys/capability.h supportEd Maste
bspatch previously included sys/capability.h or sys/capsicum.h based on __FreeBSD_version, as FreeBSD is the upstream for bsdiff and we may see this file incorporated into other third-party software. The Capsicum header is now installed as sys/capsicum.h in stable/10 and FreeBSD 10.3, so we can just use sys/capsicum.h and simplify the logic. Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D7954 Notes: svn path=/head/; revision=306026
2016-09-15bspatch: use #define for header size instead of magic numberEd Maste
Reviewed by: allanjude, kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D7861 Notes: svn path=/head/; revision=305822
2016-09-12bspatch: remove superfluous newlines from errx stringsEd Maste
Notes: svn path=/head/; revision=305737
2016-09-06bspatch: add sanity checks on sizes to avoid integer overflowEd Maste
Note that this introduces an explicit 2GB limit, but this was already implicit in variable and function argument types. This is based on the "non-cryptanalytic attacks against freebsd update components" anonymous gist. Further refinement is planned. Reviewed by: allanjude, cem, kib Obtained from: anonymous gist MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D7619 Notes: svn path=/head/; revision=305486
2016-08-25bspatch: remove output file in the case of errorEd Maste
Reviewed by: oshogbo Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D7644 Notes: svn path=/head/; revision=304821
2016-08-25Capsicumize bspatchAllan Jude
Move all of the fopen() and open() calls to the top of main() Restrict each FD to least privilege (read/seek only, write only, etc) cap_enter(), and make all except the output FD read/seek only. Reviewed by: emaste, ed, oshogbo, delphij Approved by: so MFC after: 3 days Relnotes: yes Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D7358 Notes: svn path=/head/; revision=304807
2016-08-23bspatch: apply style(9)Ed Maste
Make style changes (and trivial refactoring of open calls) now in order to reduce noise in diffs for future capsicum changes. Reviewed by: oshogbo No objection: cperciva Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D7610 Notes: svn path=/head/; revision=304691
2016-07-25Fix bspatch heap overflow vulnerability.Xin LI
Obtained from: Chromium Reported by: Lu Tung-Pin Security: FreeBSD-SA-16:25.bspatch Notes: svn path=/head/; revision=303298
2016-04-15Cleanup unnecessary semicolons from utilities we all love.Pedro F. Giffuni
Notes: svn path=/head/; revision=298089
2015-06-13Add META_MODE support.Simon J. Gerraty
Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Notes: svn path=/head/; revision=284345
2015-06-08dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty
Notes: svn path=/projects/bmake/; revision=284172
2015-05-27Merge sync of headSimon J. Gerraty
Notes: svn path=/projects/bmake/; revision=283595
2014-11-25Convert to usr.bin/ to LIBADDBaptiste Daroussin
Reduce overlinking Notes: svn path=/head/; revision=275042
2014-08-19Merge head from 7/28Simon J. Gerraty
Notes: svn path=/projects/bmake/; revision=270164
2014-06-23use .Mt to mark up email addresses consistently (part3)Baptiste Daroussin
PR: 191174 Submitted by: Franco Fichtner <franco at lastsummer.de> Notes: svn path=/head/; revision=267773
2014-05-16Updated dependenciesSimon J. Gerraty
Notes: svn path=/projects/bmake/; revision=266219
2014-05-10Updated dependenciesSimon J. Gerraty
Notes: svn path=/projects/bmake/; revision=265802
2014-04-28Merge headSimon J. Gerraty
Notes: svn path=/projects/bmake/; revision=265044
2014-04-23Make usage printing more consistent with other tools.Ed Schouten
- Introduce a separate usage() function. - Don't use argv[0]. Directly name the application, as we do elsewhere. - Don't prepend the application name. - Don't print two newlines. Notes: svn path=/head/; revision=264823
2013-03-11Updated dependenciesSimon J. Gerraty
Notes: svn path=/projects/bmake/; revision=248169
2013-02-16Updated dependenciesSimon J. Gerraty
Notes: svn path=/projects/bmake/; revision=246868
2012-08-22Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar
Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
2010-05-13mdoc: move CAVEATS, BUGS and SECURITY CONSIDERATIONS sections to theUlrich Spörlein
bottom of the manpages and order them consistently. GNU groff doesn't care about the ordering, and doesn't even mention CAVEATS and SECURITY CONSIDERATIONS as common sections and where to put them. Found by: mdocml lint run Reviewed by: ru Notes: svn path=/head/; revision=208027
2009-10-30Add notes pointing out that bsdiff does not store file hashes andColin Percival
bspatch thus does not verify file hashes, and that consequently it is recommended that users store hashes separately and verify files before and after running bspatch. Requested by: BugMagnet MFC after: 1 week Notes: svn path=/head/; revision=198671
2006-12-05Portability fix for non-POSIX operating systems: Open files in binary mode.Colin Percival
PR: bin/106358 Submitted by: techtonik at php dot net Notes: svn path=/head/; revision=164922
2005-11-18Fix up markup.Ruslan Ermilov
Notes: svn path=/head/; revision=152573
2005-08-06Add bsdiff and bspatch to the base system. These are tools forColin Percival
constructing and applying binary patches; in particular, they perform well (in the sense of constructing small patches) for executable code. Both portsnap (coming to the base system Real Soon Now) and FreeBSD Update (coming to the base system a bit later) use bspatch. This is the same code as the bsdiff-4.2 which has been in the ports tree (misc/bsdiff) for the past year, with the following exceptions: 1. The license is now the traditional 2-clause BSD; 2. Instead of forking and execing bzip2, the code now uses libbz2; and 3. Some minor changes have been made to fit this code into the base system (adding $FreeBSD$ tags, putting bsdiff and bspatch into separate directories, etc.) This code is rather ugly and has lots of style bugs (mostly because I wrote it before I had ever heard of style(9)). Some day I'll come back and clean it up. Discussed on: freebsd-arch MFC before: 5.5-RELEASE Tested by: Several million users (earlier version). Notes: svn path=/head/; revision=148771