Commit Graph

10902 Commits

Author SHA1 Message Date
Robert Watson
158ae6cdf2 Mark data structures used on the wire with IPX SAP as __packed so that
they are not inappropriately padded as a result of compiler changes.

PR:		kern/74105
Submitted by:	Bob Johnson <bob89 at eng dot ufl dot edu>
2007-02-26 12:07:08 +00:00
Tim Kientzle
4813511138 Move _posix1e_acl_name_to_id out of acl_support.c and into
acl_from_text.c.  Since acl_from_text.c is the only place it
is used, we can now make this internal utility function "static."

As a bonus, acl_set_fd() no longer pulls in getpwuid() for no reason.

MFC after: 7 days
2007-02-26 02:07:02 +00:00
Tim Kientzle
0031cdf4d7 Don't assert() the TLS allocation requested is big enough; just
fix the argument.

In particular, this is a step towards breaking crt1's dependence on stdio.
2007-02-25 21:23:50 +00:00
Jason Evans
a326064e24 Modify chunk_alloc() to prefer mmap()ed memory over sbrk()ed memory.
This has no impact unless USE_BRK is defined (32-bit platforms), in
which case user allocations are allocated via mmap() if at all possible,
in order to avoid the possibility of unreclaimable chunks in the data
segment.

Fix an obscure bug in base_alloc() that could have allowed undefined
behavior if an application were to use sbrk() in conjunction with a
USE_BRK-enabled malloc.
2007-02-22 19:10:30 +00:00
Randall Stewart
2cbcccc774 Fixes build breakage.. invalid type casts.. and invalid
type for size in one place.
2007-02-22 14:48:12 +00:00
Randall Stewart
d8b5fd91b9 First cut of the sctp man pages. Still need work. 2007-02-22 14:32:39 +00:00
Randall Stewart
2c0d559d1e Fixes __FreeBSD__ being present (they should not)
and also trailing garbage on undef of magic numbers.
2007-02-22 13:39:57 +00:00
Randall Stewart
804cf64147 Adds a performance improvement for when sctp_sendx is
called with only one address, we then can call the
generic system call. Also fixes some socket api
type issues and cleans up the "magic" numbers that
were being used in the code.

Reviewed by:	gnn
2007-02-22 12:42:43 +00:00
Jean-Sébastien Pédron
2483dd1389 Fix a bug with the release of section's raw data. Both release loops
were using translated data linked list, leading to a memory leak.

Jkoshy's testsuite was used to check for non-regression.
2007-02-21 08:14:22 +00:00
Nick Hibma
85fea78497 Create a link from hosts.allow(5) hosts_access(3), to give the user a
starting point for more information on a file in /etc.

MFC after:	1 week
2007-02-20 23:12:04 +00:00
Tom Rhodes
13d8c69070 Fix mis-reference of incorrect manual page in ERRORS section.
Noticed by:	Harlan Stenn <stenn@ntp.isc.org>
2007-02-17 01:54:00 +00:00
Tom Rhodes
0e37c3dc33 Hook ypclnt.3 up to the build. 2007-02-15 02:43:14 +00:00
Tom Rhodes
86eaa31f67 Add a ypclnt.3 manual page referenced by various other YP based manual pages.
PR:		108980
Obtained from:	OpenBSD (minimal changes for mdoc(7) style)
2007-02-15 02:40:31 +00:00
Christian Brueffer
db47cc8851 New sentence -> new line. While here, fix apostrophe abuse. 2007-02-14 07:38:39 +00:00
Julian Elischer
973884f038 Change the date. 2007-02-13 23:06:39 +00:00
Julian Elischer
d712ee4985 Make the kse man page reflect the removal of the KSEGRP kernel abstraction. 2007-02-13 23:02:15 +00:00
Maxim Konovalov
af48594d13 o s/cgetseq/cgetset/
Obtained from:	DragonFly
2007-02-11 18:14:49 +00:00
John Baldwin
e8865caffb - Move 'struct swdevt' back into swap_pager.h and expose it to userland.
- Restore support for fetching swap information from crash dumps via
  kvm_get_swapinfo(3) to fix pstat -T/-s on crash dumps.

Reviewed by:	arch@, phk
MFC after:	1 week
2007-02-07 17:43:11 +00:00
Colin Percival
a16b1c1fd9 If (a == NULL), don't dereference (a) to record an error message. [1]
Fallout from changing the skip API to use off_t instead of size_t: Print
the skip length using %jd and cast to (intmax_t) instead of %d / (int),
and if ARCHIVE_API_VERSION >= 2, allow the client skipper to be called
for requests longer than SSIZE_MAX. [2]

Approved by:	kientzle
Pointy hats to:	kientzle [1], cperciva [2]
MFC after:	3 days
2007-02-05 16:30:40 +00:00
Rong-En Fan
438e97c073 Remove old libmytinfo link.
Approved by:	delphij (mentor)
Requested by:	ache
2007-02-01 08:45:27 +00:00
Tim Kientzle
a9490c597b Add support for a new archive format "empty" that reads empty files. 2007-02-01 06:18:17 +00:00
Mike Pritchard
cbd21da6b2 Docment the acceptable values for the id parameter. 2007-02-01 02:31:02 +00:00
Jason Evans
38cc6e0a82 Fix a utrace(2)-related bug in calloc(3).
Integrate various pedantic cleanups.

Submitted by:	Andrew Doran <ad@netbsd.org>
2007-01-31 22:54:19 +00:00
Doug Barton
7f4199b213 Update generated files for BIND 9.3.4 2007-01-29 18:33:18 +00:00
Peter Wemm
1fc6f17a31 Remove getobjformat() from libc's symbol map. It probably should have been
in the private area anyway.  Nothing in FreeBSD uses it any more anyway.
2007-01-25 22:36:36 +00:00
Peter Wemm
cddf85e01e Retire more remnants of a.out support, as threatened in 2002.
Laughed-at-by:  kris
2007-01-25 22:25:59 +00:00
Bruce M Simpson
50c317ac7c Docuemnt exactly which functions access which NSS databases.
Point out that FreeBSD libc has compat stubs for GNU glibc NSS
modules which access NSDB_PASSWD/NSDB_GROUP, but not NSDB_HOSTS;
based on painful experience porting nss_mdns.

Reviewed by:	ru
2007-01-22 11:45:25 +00:00
Pawel Jakub Dawidek
d154a420f7 Send not only Access Request, but also Access Challenge with defined
NAS-Identifier and NAS-IP-Address.

Reviewed by:	bz
MFC after:	1 month
2007-01-20 08:52:04 +00:00
Maxim Konovalov
ba5b74d001 o Remove duplicate includes.
Obtained from:	Slava Semushin via NetBSD
2007-01-20 08:24:02 +00:00
Rong-En Fan
90f1c2e488 Retire old ncurses build glue
Approved by:	delphij
2007-01-20 07:49:43 +00:00
Rong-En Fan
af5b5a0f15 Switch to new ncurses build glue
Approved by:	delphij
2007-01-20 07:48:10 +00:00
Rong-En Fan
f737c0d553 Introduce new ncurses build glues which are part of ncurses 5.6 update.
Approved by:	delphij
Inspired by:	DragonFly's and lib/bind
2007-01-20 07:46:45 +00:00
Warner Losh
9685457382 On FreeBSD/arm, any value > 50 bits will result in a rediculously huge
number being returned for mktime and timegm calls.  Choose 48 because
that works well.  This does reduce the dynamic range of tm_year from
about 2 billion years down to "only" about 9 million years.  Please
contact me if this restriction poses a problem.

Due to the complexity of the code, I admit that I didn't trace down
what, exactly, was overflowing with longer bits.  This fixes software
that we run on the embedded systems we have.
2007-01-19 01:16:35 +00:00
Pawel Jakub Dawidek
e9f0620b9f When we try to set set-gid bit with chmod(2) on a file, which we own, but our
effective group ID (and any of our group) doesn't match the group ID of the
file, we get EPERM.  This doesn't conform POSIX. POSIX requires that we should
return 0, but silently clear the set-gid bit.
2007-01-16 15:17:27 +00:00
Tim Kientzle
2a53b50a2c Correct the int->text conversion. <sigh>
MFC after: 3 days
2007-01-13 03:30:14 +00:00
Warner Losh
7dcf45c07b Remove 3rd clause, renumber, ok per email 2007-01-12 07:31:30 +00:00
Warner Losh
fed32d7544 Remove 3rd clause, renumber, ok per email 2007-01-12 07:26:21 +00:00
Maxim Konovalov
eb15e82311 o Document SO_TIMESTAMP and SO_BINSTAMP socket options.
PR:		docs/107696
Submitted by:	Rob Robertson
Reviewed by:	ru
Obtained from:	NetBSD (mostly)
MFC after:	1 week
2007-01-11 18:45:41 +00:00
Warner Losh
891300785a Boris Popov has granted permission to remove the advertising clause
from lib/libncp.  Make it so.  Also, renumbered clauses.
2007-01-09 23:27:39 +00:00
Tim Kientzle
63165a380d Fix the copyright notice; it was always intended to be
a vanilla 2-clause BSD license, but somehow some confusing
extra verbage get copied from somewhere.

Also, update the copyright dates to 2007 for all of the files.

Prompted by: several questions about what those extra words really mean
2007-01-09 08:05:56 +00:00
Warner Losh
ee7093a640 Remove California Regent's clause 3, per letter 2007-01-09 01:02:06 +00:00
Warner Losh
3110d6efa2 Remove silly n that crept in 2007-01-09 00:38:24 +00:00
Warner Losh
c879ae3536 Per Regents of the University of Calfornia letter, remove advertising
clause.

# If I've done so improperly on a file, please let me know.
2007-01-09 00:28:16 +00:00
Warner Losh
5fa78ac5b8 Per Olivier Houchard, use the proper license for this file. He
bogusly used the kvm_powerpc.c file as a template for the license, but
then either wrote the code himself, or cribbed it from the kvm_i386
file.  The only thing from the kvm_powerpc.c file was the license.
Correct this mistake with his blessing.
2007-01-08 18:25:58 +00:00
Warner Losh
67e405315d Remove the advertising clause. UCB did this some time ago, but these
files were never updated to reflect that.

MFC After: 2 days
2007-01-08 17:35:36 +00:00
Pawel Jakub Dawidek
155d1456f5 Be more specific in ENXIO description:
- O_NONBLOCK flag has to be set, if it is not set, open(2) will wait for
  another process opening the fifo for reading,
- Use O_WRONLY which implies that the file has to be opened _only_ for write.
2007-01-07 23:06:53 +00:00
Pawel Jakub Dawidek
bc87da10b6 open(2) returns EROFS when O_CREAT is specified and the named file would
reside on a read-only file system.
2007-01-07 23:01:32 +00:00
Tim Kientzle
435c077c33 Special case to support hard-coded configuration for building on Windows. 2007-01-07 21:32:25 +00:00
Pawel Jakub Dawidek
5a05b91821 - POSIX mentions that EACCES can be returned when O_TRUNC is specified
separately. Do the same.
- Document when EPERM can be returned.
2007-01-07 17:55:19 +00:00
Pawel Jakub Dawidek
6a8780971a Prefer "to be modified" over "to be opened for writing".
This is quite tricky situation, because we allow to open a file with
O_RDONLY|O_TRUNC. O_TRUNC modifies a file, but we actually don't open
it for writing. EISDIR is also returned when we try to open a directory
O_RDONLY|O_TRUNC, which is correct.
POSIX says that "The result of using O_TRUNC with O_RDONLY is undefined.",
we choose to accept it (Solaris did the same), that's why "to be modified"
seems more accurate to me.
2007-01-07 17:32:16 +00:00
David Schultz
9abb1ff616 Implement modfl(). 2007-01-07 07:54:21 +00:00
David Schultz
58d6b4605f Handle inf/nan correctly. 2007-01-06 21:50:04 +00:00
David Schultz
8185b32b5a Fix a problem relating to fesetenv() clobbering i387 register stack.
Details: As a side-effect of restoring a saved FP environment,
fesetenv() overwrites the tag word, which indicates which i387
registers are in use.  Normally this isn't a problem because
the calling convention requires the register stack to be empty
on function entry and exit.  However, fesetenv() is inlined, so we
need to tell gcc explicitly that the i387 registers get clobbered.

PR:	85101
2007-01-06 21:46:23 +00:00
David Schultz
93e0663877 Fix a cut-and-paste-o. 2007-01-06 21:23:20 +00:00
David Schultz
829d55ac9c Correctly handle NaN. 2007-01-06 21:22:57 +00:00
David Schultz
9fa229fc8d Correctly handle inf/nan. This routine is currently unused because we
seem to have assembly versions for all architectures, but it can't
hurt to fix it.
2007-01-06 21:22:38 +00:00
David Schultz
6642c3fa74 Remove modf from libm's symbol map. It's actually in libc for
hysterical raisins.
2007-01-06 21:18:17 +00:00
Colin Percival
a0b84e7498 Change the client skipper API to use off_t instead of size_t/ssize_t; but
wrap this within #if/#else/#endif so that it will only take effect once
ARCHIVE_API_VERSION is increased (which should happen on HEAD some time
between now and when RELENG_7 is branched).
2007-01-05 10:48:18 +00:00
David Schultz
3cb636ce18 Remove an unneeded fnstcw instruction.
Noticed by:	bde
2007-01-05 07:15:26 +00:00
David Schultz
cc0d85b680 Remove a note pertaining to the Alpha. 2007-01-05 07:14:26 +00:00
David Xu
03779e5c2b Insert mutex at tail if it has highest ceiling. 2007-01-05 03:57:11 +00:00
David Xu
da20a63dbb Oops, don't corrupt the list. 2007-01-05 03:33:47 +00:00
David Xu
5470bb56fc Check if the PP mutex is recursive, if we have already locked it, place the
mutex in right order sorted by priority ceiling.
2007-01-05 03:29:15 +00:00
Colin Percival
3c3619cdad Convert compression_skip from taking a size_t skip length request and
returning the length skipped in a ssize_t to using off_t for both.  This
does not break any A[BP]Is, since compression_skip is entirely internal
to libarchive.

If a skip request is > SSIZE_MAX, don't pass it down to the client layer
skip function, since those still uses size_t / ssize_t.  Instead, just
read the data and throw it away.

With this commit, libarchive/bsdtar should now successfully skip archive
entries of >2GB on 32-bit systems, but does so slower than necessary.
The performance will improve with a future A[BP]I breaking commit which
makes client layer skip functions use off_t.

Discussed with:	kientzle
MFC after:	1 week
2007-01-04 12:45:00 +00:00
Colin Percival
b1fa343fae Rewrite and simplify archive_read_format_tar_skip. Compression-layer skip
functions are required to skip the requested distance, so we can avoid
lots of bookkeeping which would otherwise be necessary.

Reviewed by:	kientzle
MFC after:	1 week
2007-01-03 21:47:35 +00:00
Colin Percival
29d7c2fce5 Quiet a compiler warning where (off_t + size_t) has a different sign
from (off_t).

Submitted by:	delphij
2007-01-03 20:01:44 +00:00
Colin Percival
dbc258608e Insert zero-padding between sparse blocks in archive_read_data(). This
fixes "tar -c @foo.tar" where "foo.tar" contains sparse entries.

MFC after:	1 week
2007-01-03 13:16:59 +00:00
David Schultz
266cb5ad57 The distinction between quiet and signaling NaN formats is
machine-dependent; these files tell the latest version of gdtoa
what to do.
2007-01-03 05:00:03 +00:00
David Schultz
ac9913a749 Fix rounding of 0xf for hex fp formats.
PR:	90333
2007-01-03 04:57:58 +00:00
Simon L. B. Nielsen
d076b71719 Bump modification date for last update. 2006-12-28 17:15:21 +00:00
Simon L. B. Nielsen
42d5d7751a Catch up struct cmsghdr and struct msghdr in the manual page with the
actual structures in socket.h (which were updated 7 years ago).

MFC after:	1 week
2006-12-28 17:10:23 +00:00
Colin Percival
9d8f7dccb3 Correct spelling of "accommodate", "guarantee", "guaranteed", "guard",
"return", "ridiculous", and "success".

MFC after:	3 days
2006-12-28 05:21:48 +00:00
Joseph Koshy
5f2891aaa4 Document the additional error returns possible when handling ELF objects
that require extended numbering.
2006-12-25 02:24:39 +00:00
Joseph Koshy
f6c0f35e07 Keep shadow copies of the e_shnum', e_phnum' and `e_shstrndx'
members of the ELF Executable Header inside the library-private
`struct _Elf' descriptor and only update the underlying Elf{32,64}_Ehdr
structure on an elf_update(3) call.  These fields of the Ehdr
structure are technically `out of bounds' for an application program
per the ELF(3) API, but we've seen applications that initialize
a new Ehdr structure using memcpy(), messing up the library's
invariants. [1]

Implement elf_getphnum() and handle ELF objects with more than
64K program header table entries.

Reported by:	jb [1]
2006-12-25 02:22:22 +00:00
Joseph Koshy
a2dc08f2b8 Use strncpy() instead of strlcpy() when copying members of
a `struct ar_hdr'.  These members do not use NUL-termination
while strlcpy() expects its source buffer to be NUL-terminated.
2006-12-25 02:06:32 +00:00
Marius Strobl
63067c1af8 Fix a typo in __fpu_ftox() that caused long double to long (and long long)
conversion of negative numbers to always result in -1.
While at it, rearrange the nearby comment so it fits in 80 chars per line,
like the rest of this file does.

PR:		107130
MFC after:	1 day
2006-12-24 22:24:39 +00:00
Joseph Koshy
5eaae8bafd Correct a logic error. 2006-12-24 09:45:10 +00:00
Jason Evans
ee0ab7cd86 Implement chunk allocation/deallocation hysteresis by caching one spare
chunk per arena, rather than immediately deallocating all unused chunks.
This fixes a potential performance issue when allocating/deallocating
an object of size (4kB..1MB] in a loop.

Reported by:	davidxu
2006-12-23 00:18:51 +00:00
David Xu
74c751131b get LIBPTHREAD_ADAPTIVE_SPIN early, so it can be used for some global
mutexes.
2006-12-20 05:05:44 +00:00
David Xu
842a092b74 Check environment variable PTHREAD_ADAPTIVE_SPIN, if it is set, use
it as a default spin cycle count.
2006-12-20 04:43:34 +00:00
John-Mark Gurney
87a1c270c6 add a missing the...
MFC after:	3 days
2006-12-19 20:20:39 +00:00
Peter Edwards
977e36e94a Clean bound and non-bound pthread structures consistently before
they become candidates for reuse.  Without this fix, some of the
state from a thread structure's previous incarnation could interfere
with its new one. Specifically, a non-bound thread started as
"suspended" (see pthread_attr_setcreatesuspend_np()) might not get
scheduled at all when resumed, as the "active" flag would be set
spuriously.

Reviewed by: deischen@, davidxu@
MFC after: 1 week
2006-12-18 17:08:07 +00:00
Joseph Koshy
2dacb27e06 Use <osreldate.h> rather than the OS version reported by the kernel
to determine which Elf Types are to be handled.  Change the M4
templates to wrap an `#if __FreeBSD_version >= NNN'/`#endif' pair
around the generated code for each ELF data type, where `NNN' is
the OS version where the ELF type was added to the source tree.

This change allows cross-builds of old sources on newer FreeBSD
systems to work correctly.

Problem reported by:	ru
2006-12-18 05:40:01 +00:00
Joseph Koshy
c2f3db731e Use the correct value of __FreeBSD_version. 2006-12-18 05:36:23 +00:00
Joseph Koshy
9d4618fd66 Fix a typo. 2006-12-16 10:45:43 +00:00
Craig Rodrigues
066f54d831 Consistently use a socklen_t type where required, and eliminate
GCC warning "dereferencing type-punned pointer will
break strict-aliasing rules".

Reviewed by:	rrs
2006-12-16 06:03:43 +00:00
Hajimu UMEMOTO
2cd19db26a Merge BIND9 9.3.3 into main chunk.
Obtained from:	ISC
MFC after:	1 week
2006-12-15 20:59:55 +00:00
Hajimu UMEMOTO
994f330564 This commit was generated by cvs2svn to compensate for changes in r165254,
which included commits to RCS files with non-trunk default branches.
2006-12-15 20:49:44 +00:00
Hajimu UMEMOTO
3f25740ec6 Vendor import of BIND 9.3.3 2006-12-15 20:49:44 +00:00
Pawel Jakub Dawidek
b613495e3c chflags(2) returns EPERM when user tries to set or remove the SF_SNAPSHOT flag. 2006-12-15 19:23:27 +00:00
Randall Stewart
d6dda9b282 This adds the "system calls"
sctp_getaddrlen()
 sctp_connectx()
 sctp_bindx()
 sctp_opt_info()
 sctp_getpaddrs()
 sctp_freepaddrs()
 sctp_getladdrs()
 sctp_freeladdrs()
 sctp_sendmsg()
 sctp_getassocid()
 sctp_send()
 sctp_sendx()
 sctp_sendmsgx()
 sctp_recvmsg()
 sctp_peeloff()

Manual pages will be forthcoming (and the commit to porters-handbook)
2006-12-15 12:01:50 +00:00
David Xu
d99f6dac14 - Remove variable _thr_scope_system, all threads are system scope.
- Rename _thr_smp_cpus to boolean variable _thr_is_smp.
- Define CPU_SPINWAIT macro for each arch, only X86 supports it.
2006-12-15 11:52:01 +00:00
Warner Losh
a7e88f95bd band-aide until _SC_PHYS_PAGES actually is defined 2006-12-14 22:14:14 +00:00
Pawel Jakub Dawidek
93a8a97ce9 Add support for _SC_PHYS_PAGES, which is not standard, but can be found in
Solaris and Linux.
2006-12-14 14:32:59 +00:00
Pawel Jakub Dawidek
e5d6d64110 Document _SC_PAGESIZE. There are still 85 undocumented variables.
Obtained from:	NetBSD
2006-12-14 14:27:15 +00:00
David Xu
8a8178c010 Create inline function _thr_umutex_trylock2 to only try one atomic
operation, if it is failed, we call syscall directly, this saves
one atomic operation per lock contention.
2006-12-14 13:22:02 +00:00
Pawel Jakub Dawidek
0b0bc2bb7c - truncate(2) returns EFBIG if the length argument was greater than the
maximum file size.
- truncate(2) returns EINVAL if the length argument was less than 0.
2006-12-13 22:51:23 +00:00
Pawel Jakub Dawidek
10873dafaf Append-only flag also denies chown(2). 2006-12-13 22:17:58 +00:00
Joseph Koshy
e107d208f3 Name the functions documented by this manual page correctly. 2006-12-13 15:14:46 +00:00
Pawel Jakub Dawidek
a4319b6585 Much more correct EFTYPE description. 2006-12-13 13:46:01 +00:00
Pawel Jakub Dawidek
9b76b9d9b7 Better wording. 2006-12-13 13:26:32 +00:00
Pawel Jakub Dawidek
3bb2bdaef6 Append-only flag also denies chmod(2). Is this correct behaviour? 2006-12-13 13:22:57 +00:00
Pawel Jakub Dawidek
0b149517f3 Be more precise with EPERM description. When chown(2) is a no-op, it will
return 0.
2006-12-13 11:46:38 +00:00
Pawel Jakub Dawidek
e4c1f0293f Write permission if of course only needed for the parent directory of
the object beeing created.

Pointed out by:	bde
2006-12-13 11:26:03 +00:00
Pawel Jakub Dawidek
e67ec1d4a1 mkfifo(2) returns EACCES when write permission is denied for a component of
the path prefix.
2006-12-13 09:58:49 +00:00
Pawel Jakub Dawidek
1619e03af7 Be more specific when ELOOP can be returned. 2006-12-12 20:06:52 +00:00
Pawel Jakub Dawidek
a2b7d92ad6 symlink(2) return EACCES if a component of the name2 path prefix denies
write permission.
2006-12-12 20:05:04 +00:00
Pawel Jakub Dawidek
554bc5f287 Correct ENOENT description. 2006-12-12 19:57:17 +00:00
Pawel Jakub Dawidek
b8f5525f70 The 'name1' argument to symlink(2) is only limited to 1023 characters,
its components are not checked.
2006-12-12 19:48:15 +00:00
Pawel Jakub Dawidek
1212ac8123 mkdir(2) creates directory, not file. 2006-12-12 15:00:08 +00:00
Julian Elischer
558c08c358 Remove reference to confusing behaviour just removed from
the kse_exit() syscall. Describe the correct behaviour.
2006-12-12 08:13:02 +00:00
David Xu
9e8a8aa551 Correctly check failed syscall. 2006-12-12 05:26:39 +00:00
David Xu
347126a2e2 Move checking for c_has_waiters into low level _thr_ucond_signal and
_thr_ucond_broadcast, clear condition variable pointer in cancellation
info after returing from _thr_ucond_wait, since kernel has already
dropped the internal lock, so we don't need to unlock it in cancellation
handler again.
2006-12-12 03:08:49 +00:00
Joseph Koshy
61e1aeb6ee Document the ELF types supported by libelf.
Document the relationship between section types (SHT_*) and the
types known to the libelf.
2006-12-11 09:03:27 +00:00
Pawel Jakub Dawidek
ba4b9e0121 When directory is given as an argument for unlink(2), EPERM is returned
not matter if this is regular directory or a mount point.
2006-12-10 13:04:36 +00:00
Doug Barton
b02f06c3da Changes to generated files related to the 9.3.3 import. 2006-12-10 07:11:04 +00:00
Pawel Jakub Dawidek
e799094d84 If the named file has its immutable or append-only flag set, utimes(2)
returns EPERM.
2006-12-09 23:13:05 +00:00
Pawel Jakub Dawidek
b10ec4d0dc If the parent directory of the named file has its immutable flag set,
mkfifo(2) returns EPERM.
2006-12-09 23:06:01 +00:00
Pawel Jakub Dawidek
2f51879266 If the parent directory of the destination file has its immutable flag set,
symlink(2) returns EPERM.
2006-12-09 23:01:38 +00:00
Pawel Jakub Dawidek
46db118b7e - If the source file has its immutable or append-only flag set, link(2)
returns EPERM.
- If the parent directory of the destination file has its immutable flag set,
  link(2) returns EPERM.
2006-12-09 22:56:40 +00:00
Pawel Jakub Dawidek
9becb00c0a If the named file has its immutable or append-only flag set, truncate(2)
and ftruncate(2) return EPERM.

Note, that if the append-only flag is set even increasing size of the file
is not permitted.
2006-12-09 22:49:28 +00:00
Pawel Jakub Dawidek
442cc490fd If the named file has its immutable flag set, chown(2) returns EPERM. 2006-12-09 22:41:26 +00:00
Pawel Jakub Dawidek
54ec563e0d If the named file has its immutable flag set, chmod(2) returns EPERM. 2006-12-09 22:41:01 +00:00
Pawel Jakub Dawidek
4e3f043c22 Add reference to chflags(2). 2006-12-09 22:39:28 +00:00
Pawel Jakub Dawidek
93dbfff0f9 If the parent directory of the named file has its immutable flag set,
mkdir(2) returns EPERM.
2006-12-09 22:35:55 +00:00
Pawel Jakub Dawidek
3e6f3ff080 - If the directory to be removed has its immutable, undeletable or append-only
flag set, rmdir(2) returns EPERM.
- If the parent directory of the directory to be removed has its immutable or
  append-only flag set, rmdir(2) returns EPERM.
2006-12-09 19:44:38 +00:00
Pawel Jakub Dawidek
b7715d3d86 - If the parent directory of the file pointed at by the from argument has its
immutable or append-only flag set, rename(2) returns EPERM.
- If the parent directory of the file pointed at by the to argument has its
  immutable flag set, rename(2) returns EPERM.
2006-12-09 19:42:58 +00:00
Pawel Jakub Dawidek
483a0e04d8 Correct last commit. The parent directory of the file to be removed can
have undeletable flag set.
2006-12-09 19:40:24 +00:00
Pawel Jakub Dawidek
d1eb7b96e7 When immutable, undeletable or append-only flag is set, rename(2)
return EPERM.
2006-12-09 19:19:46 +00:00
Pawel Jakub Dawidek
858e6c9cbd When undeletable flag is set, unlink(2) return EPERM. 2006-12-09 19:18:39 +00:00
Joseph Koshy
37ec86bb1b Make the generated message from `elf_errmsg(-1)' a little more readable. 2006-12-09 16:27:15 +00:00
Tim Kientzle
0a4794d3a4 Minor refactoring; move the FreeBSD-specific config info into
config_freebsd.h.  archive_platform.h decides which config file
to bring in and uses some of those selectors to define wrapper
macros and other compatibility glue.
2006-12-08 06:13:49 +00:00
Julian Elischer
2d2f0b92c7 remove already commented out code 2006-12-06 06:44:20 +00:00
David Xu
b774466b61 test cancel_pending to save a thr_wake call in some specical cases. 2006-12-06 00:15:35 +00:00
David Xu
a8a343d2e6 _thr_ucond_wait drops lock, we should pick it up again. 2006-12-05 23:46:11 +00:00
David Xu
3b8a017442 the c_has_waiters is lazily updated, temporarily disable the false
alarm code.
2006-12-05 07:23:58 +00:00
David Xu
4d617f2d10 Use ucond to implement barrier. 2006-12-05 06:54:25 +00:00
David Xu
670b44d65a Add _thr_ucond_init(). 2006-12-05 06:53:44 +00:00
David Xu
3ce4e91d4e Tweak _thr_cancel_leave_defer a bit to fix a possible race. 2006-12-05 05:01:57 +00:00
Ruslan Ermilov
a82e937c0b Grammar.
OK'ed by:	sam
2006-12-04 20:34:25 +00:00
Sam Leffler
78e3a7fdd5 document recent change to return ECONNRESET for tcp sockets
MFC after:	1 month
2006-12-04 18:39:11 +00:00
Hajimu UMEMOTO
909e7467d8 Use _kevent() instead of kevent().
Requested by:	nork
2006-12-04 17:08:43 +00:00
David Xu
3c61d00ab6 Fix typo, I was using a wrong header file, and the typo is not detected
by compiler.
2006-12-04 14:27:42 +00:00
David Xu
2bd2c90703 Use kernel provided userspace condition variable to implement pthread
condition variable.
2006-12-04 14:20:41 +00:00
Tim Kientzle
5af1711729 Argh. Restore a stat() call that was erroneously removed.
Thanks to: WATANABE, Kazuo
Pointy hat: me, from the handy dispenser I keep nearby.
2006-12-04 08:01:53 +00:00
Diomidis Spinellis
aeecffebe5 Minor clarification. 2006-12-03 19:26:17 +00:00
Maxim Konovalov
88ce725781 o As POSIX requires confstr(3) returns zero on errors, not -1.
PR:		misc/106234
Submitted by:	Guy Harris
MFC after:	1 week
2006-12-03 08:22:36 +00:00
David Xu
6f54e82927 If a thread was detached, return EINVAL instead, the error code
is also returned by pthread_detach() if a thread was already
detached, the error code was already documented:

>    [EINVAL]	The implementation has detected that the value speci-
>		fied by thread does not refer to a joinable thread.
2006-11-28 11:05:31 +00:00
Tim Kientzle
a6fac34b43 Improve support for large ISOs:
* Correct a signed/unsigned problem that broke handling of files >2G.
   * Implement "skip" support for much faster "tar -t".

Thanks to: Robert Sciuk for sending me a DVD that illustrated the first problem
2006-11-27 16:30:32 +00:00
Tim Kientzle
24d698ea89 Bump the libarchive version number, correct the shell hackery to break
the full version down into major/minor values.
2006-11-26 19:09:42 +00:00