Commit Graph

10889 Commits

Author SHA1 Message Date
pjd
024a6b9fb4 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
pjd
96e0c4dbe7 mkdir(2) creates directory, not file. 2006-12-12 15:00:08 +00:00
julian
dc3e4a0741 Remove reference to confusing behaviour just removed from
the kse_exit() syscall. Describe the correct behaviour.
2006-12-12 08:13:02 +00:00
davidxu
229aca4634 Correctly check failed syscall. 2006-12-12 05:26:39 +00:00
davidxu
fcda4340a4 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
jkoshy
64e15beb8d 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
pjd
291ec8d867 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
dougb
3cafae54dc Changes to generated files related to the 9.3.3 import. 2006-12-10 07:11:04 +00:00
pjd
c3cd93f756 If the named file has its immutable or append-only flag set, utimes(2)
returns EPERM.
2006-12-09 23:13:05 +00:00
pjd
516c13f08d 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
pjd
827d52e622 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
pjd
8a2099c5a1 - 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
pjd
5785bcc5bc 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
pjd
6f1b6d133c If the named file has its immutable flag set, chown(2) returns EPERM. 2006-12-09 22:41:26 +00:00
pjd
3d3c519dec If the named file has its immutable flag set, chmod(2) returns EPERM. 2006-12-09 22:41:01 +00:00
pjd
c995b500b2 Add reference to chflags(2). 2006-12-09 22:39:28 +00:00
pjd
c7ad47675e 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
pjd
1960fa1f5d - 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
pjd
94128f1de1 - 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
pjd
991a488b1d 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
pjd
bb93464d9e When immutable, undeletable or append-only flag is set, rename(2)
return EPERM.
2006-12-09 19:19:46 +00:00
pjd
35ec935f3b When undeletable flag is set, unlink(2) return EPERM. 2006-12-09 19:18:39 +00:00
jkoshy
e60a96b820 Make the generated message from `elf_errmsg(-1)' a little more readable. 2006-12-09 16:27:15 +00:00
kientzle
c15939c62a 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
2df2fdd630 remove already commented out code 2006-12-06 06:44:20 +00:00
davidxu
33168bd24f test cancel_pending to save a thr_wake call in some specical cases. 2006-12-06 00:15:35 +00:00
davidxu
b01e86cf0a _thr_ucond_wait drops lock, we should pick it up again. 2006-12-05 23:46:11 +00:00
davidxu
3f73376426 the c_has_waiters is lazily updated, temporarily disable the false
alarm code.
2006-12-05 07:23:58 +00:00
davidxu
f26900460b Use ucond to implement barrier. 2006-12-05 06:54:25 +00:00
davidxu
f1f5293365 Add _thr_ucond_init(). 2006-12-05 06:53:44 +00:00
davidxu
19c999e75f Tweak _thr_cancel_leave_defer a bit to fix a possible race. 2006-12-05 05:01:57 +00:00
ru
f1573baff3 Grammar.
OK'ed by:	sam
2006-12-04 20:34:25 +00:00
sam
6f9b2bd1bc document recent change to return ECONNRESET for tcp sockets
MFC after:	1 month
2006-12-04 18:39:11 +00:00
ume
6c74892876 Use _kevent() instead of kevent().
Requested by:	nork
2006-12-04 17:08:43 +00:00
davidxu
5ad129a10a 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
davidxu
cbb0fd8174 Use kernel provided userspace condition variable to implement pthread
condition variable.
2006-12-04 14:20:41 +00:00
kientzle
a2cced1272 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
dds
782cf0f37f Minor clarification. 2006-12-03 19:26:17 +00:00
maxim
520a9a218b 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
davidxu
61e0842016 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
kientzle
b0a259a119 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
kientzle
5b41e3aa03 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
kientzle
0f8fa3629e Write-blocking cleanup, largely thanks to Colin Percival (cperciva@).
* If write block size is zero, don't block at all.
     This supports the unusual requirement of applications
     that need "no-delay" writes.
   * Expose _write_finish_entry() to give such applications more
     control over write boundaries.  (Normal applications do not
     need this, as entries are completed automatically.)
   * Correct the type of write callbacks; this is a minor API
     change that does not affect the ABI.
   * Correct the error handling in _write_next_header() around
     completing the previous entry.
   * Correct the documentation for block-size markers:  Remove
     docs for the long-defunct _read_set_block_size(); document
     all of the write block size manipulators.

MFC after: 14 days
2006-11-26 19:00:50 +00:00
ru
815d860c2f - When building world WITHOUT_LIBPTHREAD, link libthr to libpthread.
- Don't build ngctl(8) and cached(8) if threading libs aren't built.
- Fix various issues in a cached(8) makefile.
2006-11-26 14:36:34 +00:00
kientzle
1ddaa49caf Unbreak libarchive on arm. Two parts of libarchive relied on a
traditional shortcut of defining on-disk layouts using structures of
character arrays. Unfortunately, as recently discussed on cvs-all@,
this usage is not actually sanctioned by the standards and
specifically fails on GCC/arm (unless your data structures happen to
be "naturally aligned").

The new code defines offsets/sizes for data fields and accesses
them using explicit pointer arithmetic, instead of casting to
a structure and accessing structure fields.  In particular,
the new code is now clean with WARNS=6 on arm.

MFC after: 14 days
2006-11-26 05:39:28 +00:00
kientzle
bbcf2b70bc Connect four new files to the build.
PR: bin/86742
2006-11-24 16:35:54 +00:00
yar
3caf2aa43d Note that, thanks to the work by Alan Cox et al, some arch'es
don't need sendfile() buffers any more.

The report on the work referenced can be found at
http://usenix.org/events/usenix05/tech/general/elmeleegy.html

MFC after:	1 week
2006-11-24 11:44:19 +00:00
davidxu
add205129c Eliminate atomic operations in thread cancellation functions, it should
reduce overheads of cancellation points.
2006-11-24 09:57:38 +00:00
ru
e3fcf40047 - style: use =' instead of +=' for initial assignments.
- don't add generated sources' objects to OBJS explicitly;
  GENSRCS is part of SRCS so they were already in OBJS.
2006-11-24 06:38:11 +00:00
kientzle
8aa83b7d19 Fill in a couple of missing casts: clarify one narrowing conversion
and correct the use of unary minus with an unsigned value.  (The unary
minus here is actually being used as a bitwise operation, which is
unusual enough to deserve a clarifying cast.)
2006-11-24 05:48:04 +00:00
kientzle
45d8c426b5 A few minor clarifications and corrections. 2006-11-24 05:41:16 +00:00
kientzle
f0776f9a59 A few minor corrections to the libarchive.3 overview page. 2006-11-24 05:37:38 +00:00
kientzle
ea391351c9 Document the new _open_FILE() and _open_memory() interfaces.
PR: bin/86742
2006-11-24 05:34:23 +00:00
kientzle
7d9bedda5f New hooks for reading/writing archives to/from a FILE * or
an in-memory buffer.

PR: bin/86742
2006-11-24 02:00:48 +00:00
jhb
aacfa06ebd Document that the data field for NOTE_EXIT holds the process exit status.
Submitted by:	Jared Yanovich -phirerunner at comcast.net-
MFC after:	2 weeks
2006-11-20 22:20:04 +00:00
kientzle
1eab20d6ea Officially rename archive_{read,write}_open_file() to
archive_{read,write}_open_filename():
   * Update Makefile to build the files using the new name.
   * Update docs to document the new names, mentioning the
old ones as "deprecated synonyms."
   * The old filenames will be reconnected to the build soon;
I'll soon recyce those files for a slightly different purpose.
2006-11-20 16:48:04 +00:00
kientzle
62b3d9e35c Add archive_write_open_filename()/archive_read_open_filename() as
synonyms for archive_write_open_file()/archive_read_open_file().
The new names are much clearer.
2006-11-15 05:33:38 +00:00
kientzle
8f03f2f27b Style: Use the correct type for a sizeof() variable. 2006-11-15 05:20:14 +00:00
kientzle
8c58f2d4e8 Change the internal API for writing data to an entry; make the
internal format-specific functions return the same as the public
function, so that the public API layer doesn't have to guess the
correct return value.  This addresses an obscure problem that occurs
when someone tries to write more data than the size of the entry (as
indicated in the entry header).  In this case, the return value from
archive_write_data() was incorrect, reflecting the requested write
rather than the amount actually written.

MFC after: 15 days
2006-11-15 05:14:20 +00:00
kientzle
b3076e31d7 No change in functionality, but fill in a missing error
message when reading a truncated tar archive.
2006-11-13 16:50:18 +00:00
ru
8ee020ccf7 Fix minor formatting issues:
- make document title match filename;
- remove hard sentence breaks, whitespace at EOL, and double whitespace;
- sort SEE ALSO xrefs, adding missing section numbers;
- fix a misspelled macro name.
2006-11-13 09:46:16 +00:00
kientzle
341ae2b09b These files no longer use internal APIs, so no longer need to include
archive_private.h.
2006-11-13 00:29:57 +00:00
kientzle
925ac6f1b9 Minor cleanup of the standard read/write I/O modules:
* Use public API, don't access struct archive directly.  (People should be able to copy these into their applications as a template for custom I/O callbacks.)
 * Set "skip" only for regular files.  ("skip" allows the low-level library to catch attempts to add an archive to itself or extract over itself.)
 * Simplify the write_open functions by just calling stat() at the beginning.  Somehow, these functions had acquired some complex logic that tried to avoid the stat() call but never succeeded.

MFC after: 10 days
2006-11-13 00:26:45 +00:00
kientzle
7f111df028 Correctly handle writing very large blocks (>1M) through to a disk
file.  This doesn't happen in normal use, because the file I/O and
decompression layers only pass through smaller blocks.  It can happen
with custom read functions that block I/O in larger blocks.
2006-11-12 23:45:40 +00:00
jkoshy
1d082af7af - Replace the use of DPSRCS with something more appropriate. DPSRCS
is for when you need something in ".depend", but not compiled in.
- Style fixes: Spell ${.OBJDIR} as ".".
- Neaten a comment.

Submitted by:	ru
2006-11-12 18:43:25 +00:00
jkoshy
62913629e6 MFP4: Add an implementation of the ELF(3) and GELF(3) API set.
Bump __FreeBSD_version.

Reviewed by:	jb
2006-11-11 17:16:35 +00:00
davidxu
cc0840138e Move code calculating new inherited priority into single function. 2006-11-11 13:33:47 +00:00
des
cd277df0bb childerr needs to be volatile so gcc won't optimize it away.
PR:		bin/85830
MFC after:	1 week
2006-11-10 23:33:25 +00:00
kientzle
50bb724108 Portability and style fixes:
* Actually use the HAVE_<header>_H macros to conditionally include
    system headers.  They've been defined for a long time, but only
    used in a few places.  Now they're used pretty consistently
    throughout.
  * Fill in a lot of missing casts for conversions from void*.
    Although Standard C doesn't require this, some people have been
    trying to use C++ compilers with this code, and they do require it.

Bit-for-bit, the compiled object files are identical, except for
one assert() whose line number changed, so I'm pretty confident I
didn't break anything.  ;-)
2006-11-10 06:39:46 +00:00
trhodes
a5378c36b6 Add an entry for PT_GETLWPLIST.
Nudged by:	jhb
Reviewed by:	davidxu
2006-11-09 11:27:18 +00:00
cognet
93ee84a578 Cleanup: we always have to use __error() now, and we shouldn't provide a
errno symbol, so completely remove the !_REENTRANT case.

Spotted out by:	ru
2006-11-09 01:28:16 +00:00
ru
adde7c231a Remove a forgotten file. 2006-11-08 21:29:20 +00:00
simon
bee45f8f12 Fix infinite loop in corrupt archives handling in libarchive(3).
Reported by:	rink
Submitted by:	kientzle
Security:	FreeBSD-SA-06:24.libarchive
2006-11-08 14:03:50 +00:00
cognet
367bc6b8e0 Instead of re-implementing hton[ls] and friends for each arch, add a new MI
file, net/ntoh.c, which just implement them using the inline functions from
<sys/endian.h>.

Suggested by:	bde
2006-11-06 22:07:47 +00:00
cognet
55a9fb22cc Provide definitions suitable for arm big-endian. 2006-11-06 20:49:23 +00:00
rwatson
ef1d02698e Remove sys/uio.h include -- this is no longer required by the extattr
system call API.

MFC after:	3 weeks
2006-11-06 15:12:43 +00:00
kientzle
109c8f1daf Eliminate documentation references to a non-existent function. 2006-11-06 00:28:46 +00:00
kientzle
dce2089396 Computing SHLIB_MAJOR is not a good idea. It's really a FreeBSD
system value that has no real relation to the libarchive version.
(Except, of course, that any ABI breakage will force both to be
incremented.)
2006-11-06 00:24:57 +00:00
kientzle
ba33e1d526 Remove an unused declaration. 2006-11-06 00:16:40 +00:00
trhodes
444451185b Fix a typo: "the give login class" to "the given login class."
PR:		75577
Submitted by:	Nobuyuki Koganemaru
2006-11-05 19:00:08 +00:00
lawrance
20a2ef67d2 Document return values for res_query and res_search.
h_errno is not an extern int, just a macro providing an integer lvalue.

PR:		doc/50573
Submitted by:	Ronald F.Guilmette <rfg@monkeys.com>
Reviewed by:	trhodes
MFC after:	3 days
2006-11-04 09:42:22 +00:00
danger
b5fdd84df7 - clock_gettime is in time.h instead of sys/time.h
Approved by: trhodes (mentor), keramida (mentor)
PR: docs/104707
MFC-after: 3 days
2006-11-04 09:35:36 +00:00
kmacy
73954d8d22 - change ABI for user trap handler for sun4v (eventually will sync sparc64 no
hardware set up to test at the moment)

Approved by: scottl (standing in for mentor rwatson)
2006-11-03 23:43:18 +00:00
ru
6332347a51 Replace the SEE ALSO xrefs with a more reasonable set stolen from POSIX. 2006-11-02 14:10:56 +00:00
mjacob
19b599de4a 2nd and final commit that moves us to CAM_NEW_TRAN_CODE
as the default.

Reviewed by multitudes.
2006-11-02 00:54:38 +00:00
pjd
1f52d4e246 Document MNT_GJOURNAL option. 2006-11-01 23:40:44 +00:00
pjd
51fb042070 Implement cgwrite1(3) function which stored a given cylinder group on disk.
Sponsored by:	home.pl
2006-10-31 21:21:48 +00:00
bde
fd31361d3d Backed out rev.1.10 (a special case for amd64). The amd64 mcount code
never needed any frame pointers for itself.
2006-10-28 13:34:35 +00:00
ru
e80cd771cb Add missing markup bits.
Submitted by:	Emil Mikulic
2006-10-28 13:05:10 +00:00
maxim
5c30a548b8 o Fix function name.
Obtained from:	DragonFlyBSD
MFC after:	1 week
2006-10-28 10:53:39 +00:00
jb
f82c799735 Make KSE a kernel option, turned on by default in all GENERIC
kernel configs except sun4v (which doesn't process signals properly
with KSE).

Reviewed by:	davidxu@
2006-10-26 21:42:22 +00:00
ume
89159bd1c6 Merge res_send.c of BIND9 9.3.3rc2 into main chunk. It includes
following fix:

	Retransmission timeouts should be based on which attempt
	it is to the nameserver and not the nameserver itself.

Obtained from:	ISC
MFC after:	3 days
2006-10-24 14:41:43 +00:00
ume
abf24ba802 Import of BIND 9.3.3rc2 2006-10-24 14:25:49 +00:00
kib
e6083a98d8 Revert the rev. 1.4, it causes breakage on most arches except i386.
Remove the const qualifier from ap argument for __v2printf, that induced
that breakage, and seems to be the real reason for bad code. ap is modified
inside the __v2printf body by va_arg macro.

Pointy hat to:	kib
Approved by:	pjd (mentor)
2006-10-23 07:25:25 +00:00
simon
16797e6408 Minor markup fix: A comma should be seperated by space from macro
argument.  This resulted in "pwritev,()" instead of the intended
"pwritev()," in the output.

MFC after:	3 days
2006-10-21 20:36:50 +00:00
ru
85a0824042 Avoid a potential hard sentence break. 2006-10-21 18:03:53 +00:00
maxim
993b54a4b0 o Fix typo.
Obtained from:	DragonFlyBSD
MFC after:	1 week
2006-10-21 15:12:36 +00:00
kib
3c7ee268c4 Workaround for (what seems to be) compiler error for gcc 3.4.6. On
i386 with default optimization level (-O2), va_list pointer ap in the
__v2printf function is advanced before the use. That cause argument
shift and garbage instead last argument in printf-family when xprintf is
activated.

The nsswitch is easy victim of the bug.

Reviewed by:	kan
Approved by:	kan (mentor)
MFC after:	1 week
2006-10-21 11:49:07 +00:00
davidxu
df52e86556 remove libc_r remanent. 2006-10-20 14:15:42 +00:00
glebius
221ee422f9 Include sys/socket.h to know about sa_family_t. 2006-10-17 16:56:29 +00:00
ache
9a7ddac59a file == NULL:
Issue __sflush() before possible setting O_APPEND mode or ftruncate(),
write to wrong place may occurse oserwise.
Use simplified _sseek() to the start, if no O_APPEND is set, instead
of _fseeko() (_sseek() to the end, if O_APPEND, occurse later, as for
file != NULL).
Don't check seek error return, as original fopen() and freopen() never
does.

file != NULL:
Add missing _sseek() to the end.
2006-10-16 14:31:56 +00:00
ache
98e47524e9 Honor errno obtained from __sflags
Move errno restoring after FUNLOCKFILE in one case
2006-10-16 09:57:15 +00:00
ache
5b6b5391fa Back out ftruncate error handling. There can some file tipes
f.e. sockets when ftruncate normally fail.
2006-10-16 09:39:15 +00:00
ache
ce03393cc5 Do real seek
Catch ftruncate errors

PR:             104295
Submitted by:   ru (seek)
2006-10-15 16:24:31 +00:00
bde
d36e6277cb Moved __BEGIN_DECLS up a little so that it covers __test_sse() and C++
isn't broken,

PR:		104425
2006-10-14 20:35:56 +00:00
davidxu
e8a2970aaf Don't inherit THR_FLAGS_NEED_SUSPEND for child process, child process
only has one thread, setting the flag can cause the thread to be
suspended and no another thread will resume it.
2006-10-14 13:40:08 +00:00
tegge
aa695ee90e Backout unblocking of signal if no threads can currently handle it.
The check for pending signal after direct invocation of signal handler
is sufficient.
2006-10-14 01:11:44 +00:00
davidxu
653013bedc o Make _thr_umutex_init a function.
o Eliminate unused parameter for some functions.
o Convert type of first parameter to void * for _thr_umtx_wait
  and _thr_umtx_wake.
2006-10-13 22:31:00 +00:00
ru
113e32ee73 Forgot to bump the document date. 2006-10-13 20:34:44 +00:00
ru
b942ce05ed Some word smithing adopted from the PR.
PR:		docs/54451
Originally by:	Andreas Fuchs
Adopted by:	jhb
MFC after:	3 days
2006-10-13 20:28:58 +00:00
tegge
d21c14576e Delay unblocking signal and restoring process signal mask until the
thread signal mask has been updated to avoid stack overflow during signal
bursts.

Don't block signal forever if no threads can currently handle signal.

Check for pending signal after direct invocation of signal handler.
2006-10-13 20:12:07 +00:00
tegge
8f000653f2 Delay setting wakeup time until after poll array has been allocated.
Blocking on the malloc spinlock would cause the select timeout to be lost.
2006-10-13 20:04:13 +00:00
tegge
6ddeb6ab39 Sync thread jump table with libc and other thread libraries. 2006-10-13 20:01:40 +00:00
ru
89970b0707 Add missing comma. 2006-10-13 16:11:12 +00:00
davidxu
4fdad8dba6 Use type pthread_state for thread state. 2006-10-13 12:45:21 +00:00
ru
1db31f4d88 Use normal parentheses.
PR:		docs/84549
Submitted by:	Gary W. Swearingen
MFC after:	3 days
2006-10-12 20:50:26 +00:00
ru
d510dd202f Don't say "rightmost" when referring to the least significant bit.
PR:		docs/94803
MFC after:	3 days
2006-10-12 15:08:41 +00:00
ru
f2378ce746 The pam_unix module also provides password management.
PR:		docs/93491
Submitted by:	Lior Kadosh
MFC after:	3 days
2006-10-12 15:00:17 +00:00
ru
6cd9b8b511 More accurately document the implementation details of internal storage.
PR:		docs/82508
2006-10-12 14:31:17 +00:00
ru
edfb232c7d Link select(2) to FD_CLR(3), FD_ISSET(3), FD_SET(3), and FD_ZERO(3).
PR:		docs/57974
MFC after:	3 days
2006-10-12 13:46:33 +00:00
ru
f31ae74951 Document S_IRWXU and permission bits for group/other.
PR:		docs/57153
MFC after:	3 days
2006-10-12 13:35:07 +00:00
ru
dc9cd76103 Document what "msgsz" argument really denotes. [1]
Don't say that "msgsz" can be less than 0, it cannot
as it's unsigned (POSIX has the same bug).

PR:		docs/101145 [1]
MFC after:	3 days
2006-10-12 11:42:41 +00:00
trhodes
784213457b Note that the value from getenv() should not be modified by applications.
PR:		60544
Reviewed by:	ru
2006-10-12 08:39:24 +00:00
kmacy
ad9b4ceef9 fix bus error in newsyslog by making sure that fields in struct fpemu
that are accessed as 8 byte quantities are 8 byte aligned
2006-10-12 04:38:41 +00:00
maxim
6a25457482 o Follow the trend and try to explain what the slow device is.
Not ideal but better than nothing.

Obtained from:	OpenBSD, NetBSD
2006-10-11 13:33:02 +00:00
maxim
f4bd36942d o From kern_prot.c::p_cansignal():
UNIX signalling semantics require that processes in the same
session always be able to deliver SIGCONT to one another,
overriding the remaining protections.

Fix SIGCONT special case description similar to rev. 1.22 kill.2.

PR:		docs/58710
Submitted by:	Ryan Younce
MFC after:	2 weeks
2006-10-10 11:37:41 +00:00
ru
c23de2fec8 Fix markup in previous revision. 2006-10-10 08:15:08 +00:00
trhodes
f19a940255 Add information on how to escape a literal colon in a value or name.
PR:	101262
2006-10-09 22:35:02 +00:00
kmacy
ea415a0be8 unbreak build for sparc64 etc.
TARGET won't be defined on non subarches

Approved by: rwatson (mentor)
Reviewed by: jmg
2006-10-09 05:12:54 +00:00
kmacy
a37c943bc5 buildworld fixes for sun4v
not sure why pmap.c is included as it is unchanged

Approved by: rwatson (mentor)
Reviewed by: jmg
2006-10-09 04:58:45 +00:00
piso
5696dc1060 Fix a regression: let natd load libalias modules before /usr is mounted
renaming /lib/libalias_*.so.4 to /lib/libalias_*.so.

Approved by: glebius
Reviewed by: glebius, ru
2006-10-08 14:02:00 +00:00
kmacy
3785d22822 Fix TLS on sparc64 for statically and dynamically linked binaries
Approved by: rwatson (mentor)
Reviewed by: jmg and marcel
2006-10-08 02:50:34 +00:00
trhodes
1f27dd98e0 getenv.3: Put "is" on a line with other words
getobjformat.3: "takes precedence over" is not an envrionment variable.

PR:		75545
Submitted by:	n-kogane@syd.odn.ne.jp
MFC after:	3 days
2006-10-07 21:27:21 +00:00
trhodes
a906aad1ec Reword previous delta a little bit.
Submitted by:	ru
2006-10-07 10:49:20 +00:00
trhodes
57665efa96 Fix ambiguity in description. Note that the aio_return() system call should
only be called once after failure or completion of an AIO request.  Bump doc
date while I'm here.

Noticed by:	Samy Al Bahra
2006-10-07 05:34:51 +00:00
trhodes
d96e9c3643 Add missing word "returns."
Noticed by:	Samy Al Bahra
2006-10-07 05:13:32 +00:00
davidxu
d31c0f57db Remove libc_r support. 2006-10-05 06:26:31 +00:00
kientzle
91ef326cd2 Performance: If the dir mode requested is "reasonable", then just
restore it directly and skip chmod() during the post-extract fixup.
In particular, bsdtar -xm now completely skips the post-extract fixup
for directories, which produces a noticable speedup in that case.
2006-10-04 02:08:04 +00:00
ache
152e82b738 Automatically re-stir every 400000 calls
Obtained from:  OpenBSD
2006-10-04 01:17:23 +00:00
ru
b6d284e093 Fix build. 2006-09-30 20:33:42 +00:00
ru
6e2dfd0e20 Removed libc_r build support. 2006-09-30 11:32:46 +00:00
ru
81bed6b884 Revise markup in recently added manpages. 2006-09-30 10:34:13 +00:00
ru
1da895d121 Fix markup, language, function prototype, and example code. 2006-09-30 10:24:00 +00:00
ru
930749d9ee Markup nit. 2006-09-29 22:57:22 +00:00
ru
0ff3b55dca - Removed a copyright from makefile.
- Added ${.CURDIR} to .include "...".
- Whitespace fixes.

OK'ed by:	piso
2006-09-27 12:30:27 +00:00
ru
5af6b1e9b0 Put back NO_WERROR= to fix sparc64 build. 2006-09-27 10:30:17 +00:00
piso
5582e56d9d Summer of Code 2005: improve libalias - part 1 of 2
With the first part of my previous Summer of Code work, we get:

-made libalias modular:

 -support for 'particular' protocols (like ftp/irc/etcetc) is no more
  hardcoded inside libalias, but it's available through external
  modules loadable at runtime

 -modules are available both in kernel (/boot/kernel/alias_*.ko) and
  user land (/lib/libalias_*)

 -protocols/applications modularized are: cuseeme, ftp, irc, nbt, pptp,
  skinny and smedia

-added logging support for kernel side

-cleanup

After a buildworld, do a 'mergemaster -i' to install the file libalias.conf
in /etc or manually copy it.

During startup (and after every HUP signal) user land applications running
the new libalias will try to read a file in /etc called libalias.conf:
that file contains the list of modules to load.

User land applications affected by this commit are ppp and natd:
if libalias.conf is present in /etc you won't notice any difference.

The only kernel land bit affected by this commit is ng_nat:
if you are using ng_nat, and it doesn't correctly handle
ftp/irc/etcetc sessions anymore, remember to kldload
the correspondent module (i.e. kldload alias_ftp).

General information and details about the inner working are available
in the libalias man page under the section 'MODULAR ARCHITECTURE
(AND ipfw(4) SUPPORT)'.

NOTA BENE: this commit affects _ONLY_ libalias, ipfw in-kernel nat
support will be part of the next libalias-related commit.

Approved by: glebius
Reviewed by: glebius, ru
2006-09-26 23:26:53 +00:00
vd
2fdf351700 Fix typo
PR:		docs/103666
Submitted by:	vd
Approved by:	maxim
2006-09-26 09:47:46 +00:00
rwatson
9532b696ac Hook up additional OpenBSM man page aliases following OpenBSM 1.0 alpha 12
import.  Most of these should have existed previously, but didn't.

MFC after:	3 days
Obtained from:	TrustedBSD Project
2006-09-25 11:53:58 +00:00
ache
b8fd741213 Keep compatible parts in sync with OpenBSD v1.21, add some comments.
No functional changes.
2006-09-23 14:48:31 +00:00
ache
b4df5c3aa1 Remove code #ifndef'ed in prev. commit to stay in sync with OpenBSD
v1.21 which just do that.
2006-09-22 18:59:03 +00:00
ache
eb7bc007cc Be more GNU compatible:
don't be greedy on the GNU "::" extension when arg separated by whitespace
and POSIX_CORRECTLY is set. From POSIX point of view this is unclear
situation, so minimal assumption looks right.
2006-09-22 17:01:38 +00:00
kan
5f08ee5bca Do not declare __evOptMonoTime static in one place and extern
in another. GCC4 does not like that.
2006-09-22 01:52:26 +00:00
kan
ac7b520bb5 Use correct type in va_arg argument. 2006-09-21 14:40:20 +00:00
davidxu
8f17739963 remove thr_getscheduler, thr_setscheduler, thr_setschedparam,
add rtprio_thread.
2006-09-21 04:22:46 +00:00
davidxu
d2c57b7fad use rtprio_thread system call to get or set thread priority. 2006-09-21 04:21:30 +00:00
kan
4c44b31e5d Silence GCC4 warning.
strlen, strcmp live in <string.h> not <string.h>.
2006-09-21 01:30:04 +00:00
wkoszek
0f11fa239b Don't forget to set internal error message in kvm_nlist().
Approved by:	cognet (mentor)
2006-09-20 12:09:21 +00:00
rwatson
3aa148db24 Hook up au_open.3 man page (and its symlinks), apparently missed during
initial OpenBSM merge.

Obtained from:	TrustedBSD Project
MFC after:	3 days
2006-09-19 08:30:34 +00:00
maxim
93ed40a8c9 o Don't fseek() on closed file.
Submitted by:	pgollucci@p6m7g8.com, Mark Costlow
MFC after:	3 weeks
2006-09-18 09:34:48 +00:00
ru
f4eec08060 Markup fixes. 2006-09-17 21:27:35 +00:00
ru
b4db035948 Remove more traces of Alpha. 2006-09-17 20:53:30 +00:00
des
22cf0fa876 Reject user with names that are longer than OPIE is willing to deal with;
otherwise OPIE will happily truncate it.

Spotted by:	ghelmer
MFC after:	2 weeks
2006-09-15 13:42:38 +00:00
joel
4d276cbac6 Remove reference to T/TCP.
Reviewed by:	andre
2006-09-13 19:48:00 +00:00
joel
e751eb9832 Bump .Dd.
Noticed by:	danger
2006-09-13 18:34:32 +00:00
joel
e532d7ce17 Remove references to the pam(8) manual page. It does not exist.
Requested by:	novel
Discussed with:	brueffer, simon
2006-09-13 17:46:20 +00:00
brian
c4fc7dad18 Fix a typo 2006-09-10 20:41:33 +00:00
mbr
283bae6f03 Sync with NetBSD rev. 1.16 + 1.17
Coverity CID 2292: Plug memory leak.
Coverity CID 2291: Move function call before allocating storage to prevent
memory leak on error.

MFC after:    1 month
2006-09-09 22:33:21 +00:00
mbr
958b62e8da Sync with NetBSD rev. 1.29
Coverity CID 2293: Fix memory leak.

MFC after:	1 month
2006-09-09 22:32:07 +00:00
mbr
5fb3f2afad Sync with NetBSD rev. 1.6 + 1.7
Coverity CID 779 + 780: Avoid NULL pointer dereference.

MFC after:    1 month
2006-09-09 22:29:16 +00:00
mbr
f5fc251a25 Sync with NetBSD rev. 1.20 + 1.21
Coverity CID 2284: Fix multiple memory leaks.
Coverity CID 710: Remove unreachable code.

MFC after:    1 month
2006-09-09 22:26:47 +00:00
mbr
a71d32ed3c Sync with NetBSD rev. 1.10
Coverity CID 2276: Don't leak memory on error.

MFC after:    1 month
2006-09-09 22:22:39 +00:00
mbr
cbf797decd Sync with NetBSD rev. 1.15
Coverity CID 2275: Avoid memory leak on error.

MFC after:    1 month
2006-09-09 22:21:15 +00:00
mbr
a197a4c83b Sync part of NetBSD rev. 1.14
Fix unpaired sigblock which possibly leaves the process with all
signals blocked.

MFC after:	2 weeks
2006-09-09 22:18:57 +00:00
mbr
bc9ee76c28 Sync with NetBSD rev. 1.16 + 1.17
Coverity CID 3651: Don't leak ifaddrs on getaddrinfo failure.
Coverity CID 2283: Don't leak sys_auth on error.

MFC after:    1 month
2006-09-09 22:14:42 +00:00
jasone
ce0ab81797 Change the way base allocation is done for internal malloc data
structures, in order to avoid the possibility of attempted recursive
lock acquisition for chunks_mtx.

Reported by:	Slawa Olhovchenkov <slw@zxy.spb.ru>
2006-09-08 17:52:15 +00:00
davidxu
e83ab88356 Use return value of _thr_umutex_lock instead of using zero. 2006-09-08 09:29:14 +00:00
thomas
e5de30ab6d Minor comment fix. 2006-09-08 08:14:32 +00:00
davidxu
21e4536026 Replace internal usage of struct umtx with umutex which can supports
real-time if we want, no functionality is changed.
2006-09-06 04:04:10 +00:00
ru
cb0ad18d63 alloca() cannot check if the allocation is valid; mention the consequences.
Obtained from:	OpenBSD
2006-09-05 16:30:11 +00:00
ru
32ef646170 GC dead code. If we want to stay polite to the foreign compilers,
we can find another way to issue an #error, but using a preprocessed
assembler for that purpose and clobbering libc.a with an empty .o
just for the sake of #error reporting is way too much of a burden.
2006-09-05 16:21:26 +00:00
davidxu
567ba06917 Same as pthread_setschedparam, use sizeof(struct sched_param) instead. 2006-09-05 14:39:06 +00:00
davidxu
5b28602728 Pass correct parameter size. 2006-09-05 14:37:22 +00:00
kientzle
b70eb6239f Some minor corrections:
* Expose functions for setting the "skip file" dev/ino information
  * Expose functions for setting/querying the block size on reads
  * Correctly propagate errors out of archive_read_close/archive_write_close
  * Update manpage with information about new functions
2006-09-05 05:59:46 +00:00
thomas
2bf8d53a14 (pw_copy): Handle the case of a malformed line in master.passwd
(copy it silently, do not dereference NULL pointer).

PR:             bin/102848
Reviewed by:    security-officer (cperciva)
MFC after:      1 week
2006-09-04 15:09:21 +00:00
marcel
587bff4653 Whitespace fix. 2006-09-02 01:07:21 +00:00
marcel
9dfca48522 Stylize:
o  avoid using a global register variable.
o  redefine struct ia64_tp as a union. We don't have to get to the
   fields themselves. We just need it to be of the right size with
   the right alignment.
2006-09-01 21:25:22 +00:00
marcel
d21513035e Stylize: avoid using a global register variable. 2006-09-01 21:01:11 +00:00
marcel
d9435a56c2 Enable TLS on PowerPC. 2006-09-01 19:14:14 +00:00
marcel
657a4c30ac The ucontext is 16-byte aligned, which means that struct tcb is
16-byte aligned. Consequently, struct tcb is a multiple of 16
bytes in size. We need to make sure there's no padding after
struct ppc32_tp. We do this by explicitly adding the necessary
padding in front of it.
2006-09-01 19:13:36 +00:00
marcel
a081b45ede Stylize. Introduce ppc_{get|set}_tp() and ppc_{get|set}_tcb() to
abstract the magic that happens when deriving one or the other.
2006-09-01 17:52:13 +00:00
marcel
64cbc41da3 Fix style(9) in code copied from rtld. 2006-09-01 17:35:48 +00:00
marcel
2d71eb396a Rename TLS_TP_OFFSET back to TP_OFFSET. The former clashes with rtld. 2006-09-01 06:36:00 +00:00
marcel
aa70489a8b Enable TLS on ia64. 2006-09-01 06:18:43 +00:00
marcel
74d4bf1cd1 Implement TLS. 2006-09-01 06:17:16 +00:00
marcel
1125db3243 Stylize. 2006-09-01 06:15:00 +00:00
marcel
a2087dd751 Fix the variant I allocation for KSE: Allow a larger TCB and assume
that the documented TCB is at the tail of the extended TCB. In other
words, the base of the TCB has a negative offset from the TLS.
2006-09-01 06:13:16 +00:00
rwatson
7313caf832 Remove curdir reference in libbsm build; this is not required as the
include path will already point to the populated include tree.  This
is left over from boot-strapping the build and install of libbsm
during the initial import and merge.

Obtained from:	TrustedBSD Project
Pointed out by:	ru
2006-09-01 05:21:45 +00:00
marcel
6a1762d589 Stylize. 2006-08-31 23:31:18 +00:00
marcel
5ffd88a18e TLS fixes:
o  The TLS pointer (r2) points 0x7000 after the *end* of the TCB.
o  _rtld_allocate_tls() gets a pointer to the current TCB, not the
   current TLS pointer.
o  _rtld_free_tls() gets the size of the TCB structure.
2006-08-31 19:16:47 +00:00