aboutsummaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Don't leak information via uninitialized space in db(3) records. [09:07]Colin Percival2009-04-223-5/+8
| | | | | | | | | | | | | | Sanity-check string lengths in order to stop OpenSSL crashing when printing corrupt BMPString or UniversalString objects. [09:08] Security: FreeBSD-SA-09:07.libc Security: FreeBSD-SA-09:08.openssl Security: CVE-2009-0590 Approved by: re (kensmith) Approved by: so (cperciva) Notes: svn path=/releng/6.4/; revision=191381
* MFC r183565:Ed Schouten2008-10-273-32/+25
| | | | | | | | | | | | | | | | | | | | | | | | | Small cleanups to openpty(). - Pass O_NOCTTY to posix_openpt(2). This makes the implementation work consistently on implementations that make the PTY the controlling TTY by default. - Call unlockpt() before opening the slave device. POSIX mentions that de slave device should only be opened after grantpt() and unlockpt() have been called. - Replace some redundant code by a label. As a safety net, add a call to revoke() to unlockpt(). All applications out there use openpty(), explicitly call revoke() or implement their own PTY allocation routines. Adding the call to unlockpt() won't hurt, but will prevent foot-shooting. Reviewed by: jhb, kib Approved by: re Notes: svn path=/releng/6.4/; revision=184322
* Merge r184172 (pthread condvar race fix) into 6.4-release.Alfred Perlstein2008-10-252-36/+37
| | | | | | | | Reviewed by: re, davidxu Approved by: re Notes: svn path=/releng/6.4/; revision=184239
* MFC r184038: Restore mtime *after* restoring ACLs. Otherwise,Tim Kientzle2008-10-233-4/+248
| | | | | | | | | | | | setting the ACL changes the mtime. (Plus a new test to exercise basic ACL restore logic.) PR: kern/128203 Submitted by: Udo Schweigert Approved by: re (Kostik Belousov) Notes: svn path=/releng/6.4/; revision=184197
* MFC r182838: Fix tar -xP to follow symlinks to dirs. Without -P, itTim Kientzle2008-09-122-6/+90
| | | | | | | | | still refuses on security grounds. Approved by: re (Kostik Belousov) Notes: svn path=/stable/6/; revision=182957
* MFC r182587: If atime is missing, use time at which program startedTim Kientzle2008-09-062-7/+17
| | | | | | | | | instead of substituting mtime Approved by: re (Ken Smith) Notes: svn path=/stable/6/; revision=182810
* Update for version 9.3.5-P2Doug Barton2008-09-012-5/+9
| | | | Notes: svn path=/stable/6/; revision=182648
* MFC r182360, r182470: If atime isn't specified, restore atime == mtime.Tim Kientzle2008-08-312-1/+11
| | | | | | | PR: bin/124915 Notes: svn path=/stable/6/; revision=182513
* MFC r181281: Make swprintf("%s", "") not fail randomly depending onColin Percival2008-08-311-1/+3
| | | | | | | uninitialized variables. Notes: svn path=/stable/6/; revision=182502
* MFC r181280: Avoid printing bogus error messages if BLOCKSIZE is garbage.Colin Percival2008-08-311-0/+1
| | | | Notes: svn path=/stable/6/; revision=182501
* MFC r178234: Fix one-byte buffer overflow in configuration file parsing.Colin Percival2008-08-311-1/+1
| | | | Notes: svn path=/stable/6/; revision=182500
* MFC r181312:Tom Rhodes2008-08-291-1/+3
| | | | | | | | | | Add EPERM to the ERRORS section. PR: 125746 Notes: svn path=/stable/6/; revision=182421
* SVN rev 181743Maksim Yevmenkin2008-08-283-2/+148
| | | | | | | | | | | | Import the uuid_enc_le(), uuid_dec_le(), uuid_enc_be() and uuid_dec_be() functions. These routines are not part of the DCE RPC API. They are provided for convenience. Reviewed by: marcel Obtained from: NetBSD Notes: svn path=/stable/6/; revision=182410
* MFC SVN rev 181698Maksim Yevmenkin2008-08-283-2/+67
| | | | | | | | | | Import handy shorthand Bluetooth address (BD_ADDR) utility functions from NetBSD and document them. Obtained from: NetBSD Notes: svn path=/stable/6/; revision=182408
* MFC r182097,r182101: Accept requests to write path/.. if SECURE_NODOTDOTTim Kientzle2008-08-281-15/+3
| | | | | | | | is not specified. If it is, '..' elements are warned for generically, so we don't need to special case the final element. Notes: svn path=/stable/6/; revision=182359
* MFC r182093: Even if a dir is newer and we're using NO_OVERWRITE_NEWER,Tim Kientzle2008-08-281-1/+5
| | | | | | | | | | | | update the metadata anyway. This necessary to correctly extract archives where the directory entries follow the contents: the directory gets implicitly created at restore time and is thus automatically newer than the final directory in the archive. Some tar programs do this now, and "find -d | cpio" is recommended by a lot of references. Notes: svn path=/stable/6/; revision=182358
* MFC r179793: Use an 'h' to flag hardlinks that have no other file typeTim Kientzle2008-08-281-0/+5
| | | | | | | information instead of a '?' Notes: svn path=/stable/6/; revision=182357
* MFC r175798:Tom Rhodes2008-08-281-6/+13
| | | | | | | | | | | | Update this manual page to describe the extattr_list_file() and the extattr_list_fd() functions. PR: 108142 Submitted by: Richard Dawe <rich@phekda.gotadsl.co.uk> Reviewed by: kientzle Notes: svn path=/stable/6/; revision=182313
* MFC r182102: Track total bytes transferred when writing to archive_write_disk.Tim Kientzle2008-08-271-0/+2
| | | | Notes: svn path=/stable/6/; revision=182245
* MFC r181269: Mark __archive_errx() as __dead2 to help out static code checkers.Tim Kientzle2008-08-271-1/+1
| | | | Notes: svn path=/stable/6/; revision=182243
* MFC r180270: Always plan to fix dir permissions if EXTRACT_PERM wasTim Kientzle2008-08-271-5/+9
| | | | | | | | | specified. On filesystems with SysV-style SGID inheritance, the mode provided to mkdir() isn't necessarily the mode that landed on the disk, so this is often unavoidable. Notes: svn path=/stable/6/; revision=182242
* MFC r180029,r182149: style fixes to the test makefileTim Kientzle2008-08-271-8/+8
| | | | Notes: svn path=/stable/6/; revision=182241
* MFH OpenPAM HydrangeaDag-Erling Smørgrav2008-08-234-7/+8
| | | | Notes: svn path=/stable/6/; revision=182040
* MFC r181485: Make 'ar' and 'pax' writers robust against multipleTim Kientzle2008-08-132-0/+6
| | | | | | | calls to their destroy() functions. Notes: svn path=/stable/6/; revision=181669
* MFC r180423: GC an unused variableTim Kientzle2008-08-131-2/+0
| | | | Notes: svn path=/stable/6/; revision=181668
* MFC r179914: If we fail to open the file, return ARCHIVE_FAILEDTim Kientzle2008-08-131-3/+3
| | | | | | | | so that clients (such as bsdtar) will know they shouldn't try to write the file body. Notes: svn path=/stable/6/; revision=181667
* MFC r179794: Recover after seeing a Zip entry with an unsupportedTim Kientzle2008-08-131-2/+6
| | | | | | | compression method. Notes: svn path=/stable/6/; revision=181665
* Remove archive.h.in, now that archive.h is no longer a constructed file.Tim Kientzle2008-08-131-592/+0
| | | | Notes: svn path=/stable/6/; revision=181664
* MFC r179798,179916,180026,180204,180209: Various test harness improvementsTim Kientzle2008-08-1318-130/+186
| | | | Notes: svn path=/stable/6/; revision=181663
* MFC r179791-179792,179800,180269,180271: Several minor portability tweaks:Tim Kientzle2008-08-137-51/+72
| | | | Notes: svn path=/stable/6/; revision=181662
* MFC r179351: Check that end of string exists before trying to access it.Tim Kientzle2008-08-131-1/+1
| | | | Notes: svn path=/stable/6/; revision=181661
* MFC r180016,180027-180028,180122-180123,181489: Implement CRC validationTim Kientzle2008-08-134-27/+36
| | | | | | | | when reading Zip archives. Update the test suite to check that the CRC actually fails for damaged entries. Notes: svn path=/stable/6/; revision=181660
* MFC r179789: Never match dirs as hardlinks.Tim Kientzle2008-08-132-0/+21
| | | | Notes: svn path=/stable/6/; revision=181659
* MFC r179679,179799,179915: Various fixes to the mtree reader:Tim Kientzle2008-08-131-15/+83
| | | | | | | | | * Parsing of malformed device specifications * Be more careful about closing file descriptors * Handle quoted newlines and C-style escapes Notes: svn path=/stable/6/; revision=181658
* Merge of r181555 missed a line. Now the test harness runs again.Tim Kientzle2008-08-131-1/+0
| | | | Notes: svn path=/stable/6/; revision=181657
* MFC r181555: Fix test suite to work with libarchive 1.x API.Tim Kientzle2008-08-135-2/+31
| | | | Notes: svn path=/stable/6/; revision=181656
* MFC r179321,179349,179790,179797,179801-179802Tim Kientzle2008-08-1349-903/+4179
| | | | | | | | | | | This brings in all of the updates from libarchive 2.5.4b plus the most critical of the fixes from 2.5.5. Note the internal version is 1.9.25 to mark the fact that it still uses the libarchive 1.x API in order to preserve API/ABI compatibility with previous FreeBSD 6 releases. Notes: svn path=/stable/6/; revision=181654
* MFC r177217,r177218: a few improvements to the mtree readerTim Kientzle2008-08-111-107/+173
| | | | Notes: svn path=/stable/6/; revision=181592
* MFC r179125, r179234, r179235: A couple of bugs discovered by ColinTim Kientzle2008-08-114-6/+10
| | | | | | | using Coverity Prevent Notes: svn path=/stable/6/; revision=181591
* MFC r176404: portability to WindowsTim Kientzle2008-08-111-1/+4
| | | | Notes: svn path=/stable/6/; revision=181590
* MFC r177473: link manpage for archive_write_closeTim Kientzle2008-08-111-0/+1
| | | | Notes: svn path=/stable/6/; revision=181589
* MFC r177226: comment updateTim Kientzle2008-08-111-9/+2
| | | | Notes: svn path=/stable/6/; revision=181588
* MFC r177221, r177223: clean up after testsTim Kientzle2008-08-112-0/+6
| | | | Notes: svn path=/stable/6/; revision=181587
* MFC r177220: Remove duplicate fields and update the code to use the correctTim Kientzle2008-08-117-29/+22
| | | | | | | ones. Notes: svn path=/stable/6/; revision=181586
* MFC r177213: use fstat() on FreeBSD, and use it correctly.Tim Kientzle2008-08-112-1/+2
| | | | Notes: svn path=/stable/6/; revision=181585
* MFC r177201, r177212: Implement /PaxHeader.<pid>/ as the fake directoryTim Kientzle2008-08-112-12/+32
| | | | | | | | used to store the pax extended headers, per SUS, but disable it because it mucks up testing. Notes: svn path=/stable/6/; revision=181584
* MFC r177200: GC an unused variableTim Kientzle2008-08-111-1/+1
| | | | Notes: svn path=/stable/6/; revision=181583
* MFC r177189: Minor type fix.Tim Kientzle2008-08-111-1/+1
| | | | Notes: svn path=/stable/6/; revision=181576
* MFC r177193, r177199: If the locale of the filename on disk doesn'tTim Kientzle2008-08-117-260/+589
| | | | | | | | | | | | | match the locale in effect when the archiver is run, then attempts to convert filenames to UTF-8 can fail and result in truncated filenames in pax format archives. Detect such failures and fall back on storing the filename as a binary string in such cases. Read the log message for r177199 for more details about this problem. On FreeBSD, using "C" locale is a good workaround. Notes: svn path=/stable/6/; revision=181574
* MFC r177191: new public functions archive_entry_copy_link() andTim Kientzle2008-08-115-1/+58
| | | | | | | archive_entry_copy_link_w() Notes: svn path=/stable/6/; revision=181573