aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/gzip
Commit message (Collapse)AuthorAgeFilesLines
* Update NetBSD RCS IDs to reflect the changes being upstreamed.Xin LI2015-10-272-2/+2
| | | | | | | | MFC after: 13 days X-MFC-With: r290024 Notes: svn path=/head/; revision=290073
* In gunzip(1), treat trailing garbage as a warning and not an error. ThisXin LI2015-10-262-3/+10
| | | | | | | | | | | | | | allows scripts to distinguish it between real fatal errors, for instance a CRC mismatch. Update manual page for the behavior change. PR: bin/203873 Submitted by: Eugene Grosbein <eugen grosbein net> MFC after: 2 weeks Notes: svn path=/head/; revision=290024
* Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) andEnji Cooper2015-10-121-6/+3
| | | | | | | | | | | | | | | netbsd-tests.test.mk (r289151) - Eliminate explicit OBJTOP/SRCTOP setting - Convert all ad hoc NetBSD test integration over to netbsd-tests.test.mk - Remove unnecessary TESTSDIR setting - Use SRCTOP where possible for clarity MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Divison Notes: svn path=/head/; revision=289172
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+22
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty2015-06-081-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Merge sync of headSimon J. Gerraty2015-05-274-21/+33
| |\ | |/ |/| | | Notes: svn path=/projects/bmake/; revision=283595
| * Merge from head@274682Simon J. Gerraty2014-11-196-17/+57
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=274683
| * \ Merge head from 7/28Simon J. Gerraty2014-08-192-3/+3
| |\ \ | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=270164
| * | | Updated dependenciesSimon J. Gerraty2014-05-161-1/+0
| | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=266219
| * | | Updated dependenciesSimon J. Gerraty2014-05-101-0/+2
| | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265802
| * | | Merge from headSimon J. Gerraty2014-05-081-1/+1
| |\ \ \ | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265720
| * | | | Updated dependenciesSimon J. Gerraty2013-03-111-0/+1
| | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=248169
| * | | | Updated dependenciesSimon J. Gerraty2013-02-161-2/+0
| | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246868
| * | | | Sync from headSimon J. Gerraty2012-11-042-5/+4
| |\ \ \ \ | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=242545
| * | | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar2012-08-221-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
* | | | | | r281540 was upstreamed as NetBSD r1.108 of gzip.c, note it as merged.Xin LI2015-04-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/head/; revision=281626
* | | | | | When reading in the original file name from gzip header, we readXin LI2015-04-151-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in PATH_MAX + 1 bytes from the file. In r281500, strrchr() is used to strip possible path portion of the file name to mitigate a possible attack. Unfortunately, strrchr() expects a buffer that is NUL-terminated, and since we are processing potentially untrusted data, we can not assert that be always true. Solve this by reading in one less byte (now PATH_MAX) and explicitly terminate the buffer after the read size with NUL. Reported by: Coverity CID: 1264915 X-MFC-with: 281500 MFC after: 13 days Notes: svn path=/head/; revision=281540
* | | | | | Sync with NetBSD:Xin LI2015-04-132-10/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Mention xz(1) in gzip(1). - Strip away path from header name when decompressing. MFC after: 2 weeks Notes: svn path=/head/; revision=281500
* | | | | | compress,gzip,xz: Preserve timestamps with nanosecond precision.Jilles Tjoelker2015-02-171-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/head/; revision=278896
* | | | | | Convert to usr.bin/ to LIBADDBaptiste Daroussin2014-11-251-4/+2
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce overlinking Notes: svn path=/head/; revision=275042
* | | | | Sync with NetBSD.Xin LI2014-10-235-17/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=273507
* | | | | Integrate usr.bin/gzip/tests from NetBSD into atf/kyuaEnji Cooper2014-10-092-0/+16
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=272788
* | | | Correct buffer size.Xin LI2014-06-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Submitted by: Sascha Wildner <swildner dragonflybsd org> MFC after: 2 weeks Notes: svn path=/head/; revision=267887
* | | | use .Mt to mark up email addresses consistently (part3)Baptiste Daroussin2014-06-231-2/+2
| |_|/ |/| | | | | | | | | | | | | | | | | | | | PR: 191174 Submitted by: Franco Fichtner <franco at lastsummer.de> Notes: svn path=/head/; revision=267773
* | | Use src.opts.mk in preference to bsd.own.mk except where we need stuffWarner Losh2014-05-061-1/+1
| |/ |/| | | | | | | | | | | from the latter. Notes: svn path=/head/; revision=265420
* | More -Wmissing-variable-declarations fixes.Ed Schouten2012-10-191-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In addition to adding `static' where possible: - bin/date: Move `retval' into extern.h to make it visible to date.c. - bin/ed: Move globally used variables into ed.h. - sbin/camcontrol: Move `verbose' into camcontrol.h and fix shadow warnings. - usr.bin/calendar: Remove unneeded variables. - usr.bin/chat: Make `line' local instead of global. - usr.bin/elfdump: Comment out unneeded function. - usr.bin/rlogin: Use _Noreturn instead of __dead2. - usr.bin/tset: Pull `Ospeed' into extern.h. - usr.sbin/mfiutil: Put global variables in mfiutil.h. - usr.sbin/pkg: Remove unused `os_corres'. - usr.sbin/quotaon, usr.sbin/repquota: Remove unused `qfname'. Notes: svn path=/head/; revision=241737
* | Fix style nit: don't use leading zero for dates in .DdEitan Adler2012-06-051-1/+1
|/ | | | | | | | | Prompted by: brueffer Approved by: brueffer MFC after: 3 days Notes: svn path=/head/; revision=236596
* According to the NetBSD foundation [1]:Xin LI2011-10-161-7/+0
| | | | | | | | | | | | | | Third parties are encouraged to change the license on any files which have a 4-clause license contributed to the NetBSD Foundation to a 2-clause license. We would also encourage you to inform us about these files, so that we can continue to track the many places in which NetBSD is used. http://www.netbsd.org/about/redistribution.html#why2clause [1] Requested by: joel@ Notes: svn path=/head/; revision=226418
* Incorporate recent changes from NetBSD. Most notable change is the additionXin LI2011-10-104-33/+233
| | | | | | | | | of support of decompressing xz files. Obtained from: NetBSD Notes: svn path=/head/; revision=226184
* Sync RCS id with NetBSD, this was intentionally omitted from the advisoryXin LI2011-09-281-1/+1
| | | | | | | | | in order to reduce patchset size. MFC after: 3 days Notes: svn path=/head/; revision=225845
* Fix handling of corrupt compress(1)ed data. [11:04]Bjoern A. Zeeb2011-09-281-12/+19
| | | | | | | | | | | | | Add missing length checks on unix socket addresses. [11:05] Approved by: so (cperciva) Approved by: re (kensmith) Security: FreeBSD-SA-11:04.compress Security: CVE-2011-2895 [11:04] Security: FreeBSD-SA-11:05.unix Notes: svn path=/head/; revision=225827
* Fix a regression introduced with previous changeset: if output is stdout,Xin LI2011-05-251-1/+2
| | | | | | | do not check for symbolic link. Notes: svn path=/head/; revision=222287
* Match symbolic link handling behavior with GNU gzip, bzip2 and xz:Xin LI2011-05-232-5/+5
| | | | | | | | | | | When we are operating on a symbolic link pointing to an existing file, bail out by default, but go ahead if -f is specified. Submitted by: arundel MFC after: 2 weeks Notes: svn path=/head/; revision=222211
* Diff reduction against NetBSD. The most notable change is to zdiff(1) toXin LI2011-05-235-63/+128
| | | | | | | | | handle more file formats including bzip2 and xz. MFC after: 2 weeks Notes: svn path=/head/; revision=222210
* Update manpage to remove CRT reference.Glen Barber2011-02-071-2/+2
| | | | | | | | | | | PR: 154441 Submitted by: Ben Haga (bhaga of absoludicrous com) Suggestion by: pluknet Approved by: keramida (mentor) MFC after: 3 days Notes: svn path=/head/; revision=218421
* Correct some typos in comments, no functional changes.Benedict Reuschling2010-10-163-9/+9
| | | | Notes: svn path=/head/; revision=213927
* In the past gunzip(1) write()'s after each inflate return. This isXin LI2010-09-231-0/+2
| | | | | | | | | | | | | | | | | not optimal from a performance standpoint since the write buffer is not necessarily be filled up when the inflate rountine reached the end of input buffer and it's not the end of file. This problem gets uncovered by trying to pipe gunzip -c output to a GEOM device directly, which enforces the writes be multiple of sector size. Sponsored by: iXsystems, Inc. Reported by: jpaetzel MFC after: 2 weeks Notes: svn path=/head/; revision=213044
* Check return value of dup(), it could be -1 when the system is runningXin LI2010-08-191-1/+8
| | | | | | | | | | | out of file descriptors for instance. Found with: Coverity Prevent(tm) CID: 6084 MFC after: 1 month Notes: svn path=/head/; revision=211475
* Several style fixes as prompted by bde@.Xin LI2010-06-101-28/+22
| | | | | | | | While I'm there, loosen the st_nlink check and fix grammar for 1 extra links. Notes: svn path=/head/; revision=209017
* Follow up revision 208888 with purely ident changes.Xin LI2010-06-071-6/+6
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=208889
* Correct a bug in gzip(1): make sure that initialize isb with fstat() onXin LI2010-06-071-3/+9
| | | | | | | | | | | input file before using it. PR: bin/147275 Submitted by: thomas MFC after: 1 week Notes: svn path=/head/; revision=208888
* Use _exit(2) system call directly instead of using exit(3) in signalXin LI2010-04-271-1/+1
| | | | | | | | | | | handler, as the latter is not guaranteed to be signal safe, and we do not really care about flushing the stream during SIGINT. Suggested by: Maxim Konovalov <maxim.konovalov gmail com> MFC after: 13 days Notes: svn path=/head/; revision=207284
* Language improvements to make the BUGS section easier to read.Xin LI2010-04-271-3/+3
| | | | | | | | Reviewed by: Alexander Best <alexbestms wwu de> MFC after: 13 days Notes: svn path=/head/; revision=207283
* Add a signal handler for SIGINT which removes output file when necessary.Xin LI2010-04-261-4/+21
| | | | | | | | | | While I'm there, move unlink_input() slightly down to after closing the output file, in uncompression path. MFC after: 2 weeks Notes: svn path=/head/; revision=207247
* Diff reduction against NetBSD and add myself to AUTHORS section of theXin LI2010-04-073-13/+14
| | | | | | | | manual page as I wrote the unpack functionality. No actual executable code change verified with md5(1). Notes: svn path=/head/; revision=206387
* Change all our own code to use st_*tim instead of st_*timespec.Ed Schouten2010-03-281-2/+2
| | | | | | | Also remove some local patches to diff(1) which are now unneeded. Notes: svn path=/head/; revision=205793
* Build usr.bin/ with WARNS=6 by default.Ed Schouten2010-01-021-1/+0
| | | | | | | Also add some missing $FreeBSD$ to keep svn happy. Notes: svn path=/head/; revision=201386
* We should distinguish between a real truncated case and EOF afterXin LI2009-11-161-3/+14
| | | | | | | | | | | | | | BZ_STREAM_END triggered re-init. Do it by introducing a new flag to represent the 'cold' case after bzip2 state is reinitialized. This fixes regression reported on -current@ as well as another one I found during twiddling with gzip. Reported by: swell.k gmail.com MFC after: 1 week Notes: svn path=/head/; revision=199339
* Apply a NetBSD fix (revision 1.12) to handle multi-session bzip2 filesXin LI2009-11-091-5/+14
| | | | | | | | | | as created by pbzip2. Submitted by: mrg (NetBSD.org) MFC after: 1 week Notes: svn path=/head/; revision=199066
* Correct a stack underflow in gzip:Xin LI2009-07-311-1/+5
| | | | | | | | | | | | | | | | | - Limit suffix to be no more than 30 bytes long. This matches GNU behavior. - Correct usage of memcpy(). Note that this commit only corrects the stack underflow issue, we still need some other fixes to cover other edges. [1] Reported by: Ron Jude <ronj wytheville org> Discussed with: Matthew Green (original NetBSD gzip author), Eygene Ryabinkin <rea-fbsd codelabs ru> [1] Approved by: re (kib) Notes: svn path=/head/; revision=195988