Commit graph

10916 commits

Author SHA1 Message Date
Tim Kientzle fac89d2743 Fix the build.
N.B. 'ar' format support is broken right now, it's not
passing tests.  If I can't find the problem soon, I'll
back out the last commit.
2007-04-14 08:42:50 +00:00
Tim Kientzle 22ff6c7af3 Fixes from Joerg Sonnenberger, reviewed by Kai Wang. 2007-04-14 08:30:21 +00:00
Tim Kientzle 015f35775b Conventionally, tar archives have always included a trailing '/'
for directories.  bsdtar used to add this, but that recently got
lost somehow.  So now I'm adding it back in libarchive.
The only odd part of doing this in libarchive:  Adding a directory to
a tar archive and then reading it back again can yield a different name.

Add a test case to exercise some boundary conditions with
tar filenames and ensure that trailing slashes are added to
dir names only as necessary.

Thanks to: Oliver Lehmann for bringing this regression to my attention.
2007-04-14 08:20:31 +00:00
Tim Kientzle 76aa565c72 Portability: Don't use mkdtemp() when mkdir() will suffice.
If we can't create the dir, just give up.
2007-04-14 05:17:06 +00:00
Tim Kientzle 1df7aefccf More portability improvements from Martin Koeppe:
conditionally use utime() when utimes() is not available;
allow the most common wide-char functions to be replaced
when local alternatives are lacking.
2007-04-14 02:37:22 +00:00
Tim Kientzle 260c3399c8 Portability. 2007-04-13 16:07:25 +00:00
Joseph Koshy d62f5d4e5c Fix a bug in the description of the "p6-div" event. [1]
Update the description of the "p6-div" and "p6-mul" events according
to the "Intel(r) 64 and IA-32 Architectures Software Developers
Manual Volume 3B: System Programming Guide, Part 2, November 2006".

Reported by: 	Harald Servat <redcrash at gmail dot com> [1]
2007-04-12 09:16:54 +00:00
Tim Kientzle da7bcba2e8 Now that libarchive is being built in more environments,
factor out the platform-specific configuration header a bit
more cleanly.
Suggested by: Joerg Sonnenberger
2007-04-12 04:44:21 +00:00
Tim Kientzle 782a032689 Make Lint happier. 2007-04-12 04:42:57 +00:00
Ed Maste f82b931e69 Belatedly bump Dd for my recent changes. 2007-04-11 20:31:06 +00:00
Joseph Koshy 73e2d811e8 Correct a typo in an event name alias.
Reported by: 	Harald Servat <redcrash at gmail dot com>
2007-04-11 04:52:09 +00:00
Ruslan Ermilov 204542dd4c Expand the description of the host's UUID.
OK'ed by:	pjd
2007-04-10 11:19:52 +00:00
Ruslan Ermilov 41e0cfabe9 Swap "underflow"/"overflow" in the table header.
Submitted by:	Ricardo Nabinger Sanchez
MFC after:	3 days
2007-04-10 11:17:00 +00:00
Alexander Kabaev 445eba04a8 Clean-ip TLS symbol versions. [_]__tls_get_addr function is part of
the platform ABI and as such does not belong in FBSDprivate.

__libc_tls_* functions do not have to be visible to outside world
at all.
2007-04-09 22:48:08 +00:00
Pawel Jakub Dawidek 1f13edbe4b Document KERN_HOSTUUID.
Reminded by:	ru
2007-04-09 20:21:49 +00:00
Ed Maste 52530e556c Document PT_GETNUMLWPS. 2007-04-09 14:56:31 +00:00
Gregory Neil Shapiro 4881b9c324 New files in sendmail 8.14.1 2007-04-09 01:45:30 +00:00
Tim Kientzle 2db6c18909 Fix build on Solaris. 2007-04-07 19:35:02 +00:00
Tim Kientzle 94451fa8a0 Enable 'ar' support; hook it up to the build and
enable it with _read_support_format_all().
2007-04-07 05:54:23 +00:00
Tim Kientzle 06d581da80 Clarification: Point people to archive_read_data(), which
should be used instead of archive_read_data_into_buffer().
2007-04-07 05:53:11 +00:00
Colin Percival e95f7ff4ee When copying data from one archive to another, only set the error
message in the reader to the error message from the writer if the
error which occurred was in the writer.  This avoids error messages
of "Empty error message" when extracting truncated archives.
2007-04-07 03:37:59 +00:00
Ed Maste 59513fc4ee Describe PT_GETLWPLIST's arguments. 2007-04-07 03:16:23 +00:00
Alexander Kabaev 84830e00cf __p_rcode_syms is declared as external in resolv.conf, so it cannot be
redeclared as static in res_debug.c.

Make __p_rcode_syms global and add it to Symbol map. The rest of
__p_??_syms are already global.

Choice of FBSD_1.0 version for these debug symbols seems strange and
should be revisited before symbol  versioning is enabled for libc.so.7.
2007-04-06 19:45:17 +00:00
Pawel Jakub Dawidek 4e9f341722 Bump date. 2007-04-05 21:17:52 +00:00
Pawel Jakub Dawidek f6521d1c31 Implement SEEK_DATA and SEEK_HOLE extensions to lseek(2) as found in
OpenSolaris. For more information please refer to:

	http://blogs.sun.com/bonwick/entry/seek_hole_and_seek_data
2007-04-05 21:10:53 +00:00
Pawel Jakub Dawidek f3a8d2f93c Add security.jail.mount_allowed sysctl, which allows to mount and
unmount jail-friendly file systems from within a jail.
Precisely it grants PRIV_VFS_MOUNT, PRIV_VFS_UNMOUNT and
PRIV_VFS_MOUNT_NONUSER privileges for a jailed super-user.
It is turned off by default.

A jail-friendly file system is a file system which driver registers
itself with VFCF_JAIL flag via VFS_SET(9) API.
The lsvfs(1) command can be used to see which file systems are
jail-friendly ones.

There currently no jail-friendly file systems, ZFS will be the first one.
In the future we may consider marking file systems like nullfs as
jail-friendly.

Reviewed by:	rwatson
2007-04-05 21:03:05 +00:00
Colin Percival ceb38a3142 Move archive_read_data_into_buffer into archive_read.c, simplify its
implementation, and mark it as deprecated.  It will be removed entirely
in libarchive 3.0 (in FreeBSD 8.0?) but there's no reason for anyone to
use it instead of archive_read_data.

Approved by:	kientzle
2007-04-05 15:51:19 +00:00
David Xu 6839e793cf If a thread who's name is being set is not the current thread, use macros
THR_THREAD_LOCK and THR_THREAD_UNLOCK instead, this should fix wrong
lock level problem.

Bug reported by: ed dot maste at gmail dot com
2007-04-05 07:20:31 +00:00
Tim Kientzle 8c338614ac More corrections from Joerg Sonnenberger. 2007-04-05 05:22:13 +00:00
Tim Kientzle fe95f8fde6 Style fixes from Joerg Sonnenberger: use correct types,
spell lint(1) comments correctly.
2007-04-05 05:20:13 +00:00
Tim Kientzle 72654d08e1 From Joerg Sonnenberger: Fix a number of style gaffes,
including type puns and avoidable casts.
2007-04-05 05:18:16 +00:00
Tim Kientzle e44ad922b4 Wordsmithing. 2007-04-05 05:07:53 +00:00
Xin LI 77fbf8f246 Avoid using intermediate variables by just comparing between
two values, the latter does not tend to have sign extension
and/or overflow bugs, and makes the code more obvious.

While I'm there, make use of a macro which is derived from
bin/ps/ps.c: ps_compat() to improve the readability of the
code.

Suggested by:	bde
MFC after:	1 week
2007-04-05 02:07:33 +00:00
Ceri Davies adde36d27a cipher(3) is gone.
MFC after:	3 days
2007-04-04 14:04:55 +00:00
Alexander Kabaev a6a026d5f8 Cast away const qualifier to squash GCC warning. 2007-04-04 03:29:02 +00:00
Alexander Kabaev 7e2f16ba72 First argument of MD5Final is an array of unsigned characters.
Declare 'digest' local variable accordingly.
2007-04-04 03:24:01 +00:00
Alexander Kabaev c5384974d9 Use correct u_int and socklen_t types for parameters if function is
expecting them, not int.
2007-04-04 02:59:54 +00:00
Alexander Kabaev 3aebdb89ad Add include directives for string.h and stdlib.h to get proper function
prototypess of memset, memcpy and malloc respectively.
2007-04-04 02:40:59 +00:00
Alexander Kabaev 84da49ceb2 Include string.h to get proper memcpy prototype. 2007-04-04 02:28:48 +00:00
Jung-uk Kim eef2b291e9 Import amd64 assembly implementations of div(3) family from NetBSD.
Obtained from:	NetBSD
2007-04-04 01:19:54 +00:00
Colin Percival 41948c2530 Parse SCHILY.dev and SCHILY.ino fields. These are ignored when extracting
files, but used during archive creation.  This change unbreaks
# tar -cf rcp.tar /bin/rcp
# tar -cf rcp-copy.tar @rcp.tar
# cmp rcp.tar rcp-copy.tar
2007-04-03 23:53:55 +00:00
Alexander Kabaev f82d4eed2f Add entry for dl_iterate_phdr. 2007-04-03 18:38:01 +00:00
Alexander Kabaev 832a21869c Add stub for dl_iterate_phdr. 2007-04-03 18:35:20 +00:00
Tim Kientzle dedbe8ed70 'ar' format support for libarchive, contributed by Kai Wang. 2007-04-03 05:34:36 +00:00
Colin Percival eeb83a6572 Now that there is always a compression-layer skip function available,
skip over the end-of-entry padding instead of reading and discarding
it.

Considering that tar files normally have a block size of 10kB, this
isn't likely to avoid reading any data, but at least it makes the code
simpler and clearer.
2007-04-02 04:21:22 +00:00
Tim Kientzle 7045ea1dde Fix type-punned pointer, minor style fixes.
Thanks to: Joerg Sonnenberger
2007-04-02 00:41:37 +00:00
Tim Kientzle ce45c68d0c Remove unused variable; use consistent types.
Thanks to: Joerg Sonnenberger
2007-04-02 00:34:36 +00:00
Tim Kientzle e086d708ff Be consistent: file flags are unsigned bitmaps.
Thanks to: Joerg Sonnenberger
2007-04-02 00:32:03 +00:00
Tim Kientzle 0acc551509 Don't compare a signed char to 0xFF.
Thanks to: Joerg Sonnenberger
2007-04-02 00:29:52 +00:00
Tim Kientzle 96e31e81ff Avoid a potential overflow when 'skip' is larger than a pointer.
Thanks to: Joerg Sonnenberger
2007-04-02 00:25:11 +00:00