openbsd
10 years agospacing glitches
deraadt [Sun, 20 Jul 2014 18:10:15 +0000 (18:10 +0000)]
spacing glitches

10 years agoSupport hibernating to softraid crypto volumes.
mlarkin [Sun, 20 Jul 2014 18:05:21 +0000 (18:05 +0000)]
Support hibernating to softraid crypto volumes.

much help and ok from deraadt@

10 years agoFix tcpdump(8) display of logical link control data in IEEE802 frames.
stsp [Sun, 20 Jul 2014 17:52:34 +0000 (17:52 +0000)]
Fix tcpdump(8) display of logical link control data in IEEE802 frames.
The frame subtype field is in the first byte of frame control but tcpdump(8)
was looking at the second byte to determine if this is a data frame.
Patch by Nathanael Rensen, thanks!

10 years agoinitial win32 ARC4_LOCK/UNLOCK implementation.
bcook [Sun, 20 Jul 2014 16:59:31 +0000 (16:59 +0000)]
initial win32 ARC4_LOCK/UNLOCK implementation.

It may make sense to later replace this with a Critical Section later.
ok guenther@

10 years agoSkip reading bits from a region marked as "Preserve" if all bits will be
kettenis [Sun, 20 Jul 2014 12:20:38 +0000 (12:20 +0000)]
Skip reading bits from a region marked as "Preserve" if all bits will be
modified.  Some Sony and Asus laptops don't like this; the read seems to
trigger an unwanted SMI that makes the machine hang.  Diagnosed by mpi@

ok mpi@

10 years agoEliminate silly call() routine that fakes up internal calls as if
guenther [Sun, 20 Jul 2014 12:08:55 +0000 (12:08 +0000)]
Eliminate silly call() routine that fakes up internal calls as if
the user typed in undocumented arguments by splitting two functions
and doing normal (shock!) C calls.

Move extern declarations to externs.h
Eliminate another function cast

10 years agoAlways allocate bwi(4) ring descriptors below the 1GB boundary to give 30bit
stsp [Sun, 20 Jul 2014 11:59:12 +0000 (11:59 +0000)]
Always allocate bwi(4) ring descriptors below the 1GB boundary to give 30bit
devices a chance to work. Use bounce buffers for mbufs on 30bit devices.

This fixes "intr fatal TX/RX" errors that render the internal wifi on many
macppc machines unusable. However, packet loss problems remain. In my testing
the device works fine sometimes, but experiences packet loss rates of up
to 80% at other times. Still, this is a step forward.

Helpful hints from claudio@ and dlg@
Tested on macppc by mpi@ and myself
"go ahead" kettenis@, ok mpi@

10 years agoIn bwi(4), don't declare an interrupt as unhandled in case the PHY TX error
stsp [Sun, 20 Jul 2014 11:57:49 +0000 (11:57 +0000)]
In bwi(4), don't declare an interrupt as unhandled in case the PHY TX error
bit is set. This interrupt condition is handled by resetting the device.
ok mpi@ as part of a larger diff

10 years agoMake bwi_dma_mbuf_create() use the correct loop counter in error case.
stsp [Sun, 20 Jul 2014 11:57:05 +0000 (11:57 +0000)]
Make bwi_dma_mbuf_create() use the correct loop counter in error case.
Bug inherited from DragonFly BSD.
ok mpi@ as part of a larger diff.

10 years agoLoad bwi(4) firmware once, not every time the interface is brought up.
stsp [Sun, 20 Jul 2014 11:56:15 +0000 (11:56 +0000)]
Load bwi(4) firmware once, not every time the interface is brought up.
Fixes a panic if the interrupt handler decides to reset the device.
Firmware cannot be loaded in interrupt context.
ok mpi@ as part of a larger diff

10 years agoFix array overflow in command line handling
guenther [Sun, 20 Jul 2014 11:20:52 +0000 (11:20 +0000)]
Fix array overflow in command line handling

10 years agoMark a slurry of functions as static
guenther [Sun, 20 Jul 2014 10:55:26 +0000 (10:55 +0000)]
Mark a slurry of functions as static
Eliminate two more trivial wrappers

10 years agouse NULL instead of 0 when dealing with pointers
jsg [Sun, 20 Jul 2014 10:32:23 +0000 (10:32 +0000)]
use NULL instead of 0 when dealing with pointers
ok guenther@

10 years agoKill lint comments; mark ExitString() as __dead
guenther [Sun, 20 Jul 2014 10:18:10 +0000 (10:18 +0000)]
Kill lint comments; mark ExitString() as __dead

10 years agoSwitch from memmove() to memcpy() where appropriate; simplify address
guenther [Sun, 20 Jul 2014 09:59:42 +0000 (09:59 +0000)]
Switch from memmove() to memcpy() where appropriate; simplify address
parsing logic; eliminate an inefficient use of MIN() macro

10 years agoVSUSP and SIGTSTP are required by POSIX
guenther [Sun, 20 Jul 2014 09:31:25 +0000 (09:31 +0000)]
VSUSP and SIGTSTP are required by POSIX

10 years agoDelete an insane chunk of code for handling broken poll() emulation.
guenther [Sun, 20 Jul 2014 09:20:48 +0000 (09:20 +0000)]
Delete an insane chunk of code for handling broken poll() emulation.
Pass poll() INFTIM instead of -1

10 years agoAdd prototypes to some function callbacks and fix the type errors that
guenther [Sun, 20 Jul 2014 08:56:47 +0000 (08:56 +0000)]
Add prototypes to some function callbacks and fix the type errors that
this reveals.
Make NetTrace static to utilities.c

10 years agoStop using the (now) internal rc.subr functions _rc_do() and _rc_wait().
rpe [Sun, 20 Jul 2014 08:37:07 +0000 (08:37 +0000)]
Stop using the (now) internal rc.subr functions _rc_do() and _rc_wait().
- no need to start spamd in background mode
- return from rc_start() in case spamd failed to start
- execute spamd-setup without explicitly waiting for spamd

prodded by, discussed with and OK ajacoutot@

10 years agoFix auto-upgradable files detection.
ajacoutot [Sun, 20 Jul 2014 08:19:59 +0000 (08:19 +0000)]
Fix auto-upgradable files detection.

from Nathanael Rensen, thanks!

10 years agoMore encryption tentacles: intr_happened and intr_waiting vanish
guenther [Sun, 20 Jul 2014 08:12:45 +0000 (08:12 +0000)]
More encryption tentacles: intr_happened and intr_waiting vanish
Push more includes into .c files
Make ring.c only need ring.h

10 years agoEliminate trivial wrappers TerminalWrite() and TerminalRead()
guenther [Sun, 20 Jul 2014 07:35:04 +0000 (07:35 +0000)]
Eliminate trivial wrappers TerminalWrite() and TerminalRead()
Replace TerminalFlushOutput() with tcflush().
Replace TerminalAutoFlush() with check of tty's NOFLSH flag as
documented in the manpage.
Push <netdb.h> into .c files

10 years agoDon't depend on <sys/param.h> for MAXPATHLEN
guenther [Sun, 20 Jul 2014 07:34:43 +0000 (07:34 +0000)]
Don't depend on <sys/param.h> for MAXPATHLEN

10 years agoCorrectly cast to unsigned char for ctype functions/macros
guenther [Sun, 20 Jul 2014 06:39:41 +0000 (06:39 +0000)]
Correctly cast to unsigned char for ctype functions/macros
Push <ctype.h> and <unistd.h> into the .c files

10 years agoring_init() can't fail
guenther [Sun, 20 Jul 2014 06:24:19 +0000 (06:24 +0000)]
ring_init() can't fail
KNF ring.h

10 years ago-8 is the default
guenther [Sun, 20 Jul 2014 05:35:14 +0000 (05:35 +0000)]
-8 is the default

10 years agoDon't need -I${.CURDIR}
guenther [Sun, 20 Jul 2014 05:29:39 +0000 (05:29 +0000)]
Don't need -I${.CURDIR}

10 years agoSimplify #includes, start pushing them into the .c files, eliminate
guenther [Sun, 20 Jul 2014 05:22:02 +0000 (05:22 +0000)]
Simplify #includes, start pushing them into the .c files, eliminate
extern declarations from .c files that duplicate those in .h files,
start marking functions with __dead

10 years agocorrect unconfig: target; Jean-Philippe Ouellet
deraadt [Sun, 20 Jul 2014 05:06:42 +0000 (05:06 +0000)]
correct unconfig: target; Jean-Philippe Ouellet

10 years agotweak -W options
guenther [Sun, 20 Jul 2014 04:57:31 +0000 (04:57 +0000)]
tweak -W options

10 years agono longer play with /dev/log
deraadt [Sun, 20 Jul 2014 04:29:07 +0000 (04:29 +0000)]
no longer play with /dev/log

10 years agoFrom ISO/IEC 9899:1999 and 9899:201x,
guenther [Sun, 20 Jul 2014 04:22:34 +0000 (04:22 +0000)]
From ISO/IEC 9899:1999 and 9899:201x,
6.11.5 - Storage-class specifiers:
    The placement of a storage-class specifier other than at the
    beginning of the declaration specifiers in a declaration is
    an obsolescent feature.

Diff from Jean-Philippe Ouellet (jean-philippe (at) ouellet.biz)

10 years agoOoops, verbose_encrypt option is gone too.
guenther [Sun, 20 Jul 2014 04:08:13 +0000 (04:08 +0000)]
Ooops, verbose_encrypt option is gone too.
Also stop assuming that csh is the only shell with job control

10 years agoThe manpage claims the -a option uses getlogin(2), so do so. Also,
guenther [Sun, 20 Jul 2014 04:07:16 +0000 (04:07 +0000)]
The manpage claims the -a option uses getlogin(2), so do so.  Also,
ignore its value if it returns a user that doesn't exit

10 years agoThe only authentication info now is the login name
guenther [Sun, 20 Jul 2014 04:00:47 +0000 (04:00 +0000)]
The only authentication info now is the login name

10 years agoDemonstrate how new linux getrandom() will be called, at least until
deraadt [Sun, 20 Jul 2014 03:24:10 +0000 (03:24 +0000)]
Demonstrate how new linux getrandom() will be called, at least until
it shows up in libraries.  Even the system call is probably not finalized.
Bit dissapointed it has turned out to be a descriptor-less read() with
EINVAL and EINTR error conditions, but we can work with it.

10 years agoremove a variable called wantencryption.
deraadt [Sun, 20 Jul 2014 03:00:31 +0000 (03:00 +0000)]
remove a variable called wantencryption.
hahahahahahahahahha.  OK, I'm done.

10 years agoThis pulls in <ddb/db_output.h>, so don't redeclare ddb functions
guenther [Sun, 20 Jul 2014 02:48:59 +0000 (02:48 +0000)]
This pulls in <ddb/db_output.h>, so don't redeclare ddb functions

10 years agoOddly, chmod chgrp chown were at the wrong path on these media.
deraadt [Sun, 20 Jul 2014 02:40:23 +0000 (02:40 +0000)]
Oddly, chmod chgrp chown were at the wrong path on these media.
from Jean-Philippe Ouellet

10 years agoplace sysctl in sorted order; Jean-Philippe Ouellet
deraadt [Sun, 20 Jul 2014 02:37:35 +0000 (02:37 +0000)]
place sysctl in sorted order; Jean-Philippe Ouellet

10 years agoarch was in wrong bin dir; Jean-Philippe Ouellet
deraadt [Sun, 20 Jul 2014 02:36:08 +0000 (02:36 +0000)]
arch was in wrong bin dir; Jean-Philippe Ouellet

10 years agoMark the format string argument to BIO_*printf as not being allowed to be NULL
guenther [Sun, 20 Jul 2014 02:24:21 +0000 (02:24 +0000)]
Mark the format string argument to BIO_*printf as not being allowed to be NULL

ok bcook@

10 years agoMake sure the correct errno is reported by warn* or err* and not
guenther [Sun, 20 Jul 2014 02:03:21 +0000 (02:03 +0000)]
Make sure the correct errno is reported by warn* or err* and not
the errno of an intervening cleanup operation like close/unlink/etc.
Also, the format string for warn* and err* shouldn't end with a newline.

Diff from Doug Hogan (doug (at) acyclic.org)

10 years agoFix ordering breakage, moving the fclose() test last again.
guenther [Sun, 20 Jul 2014 01:58:37 +0000 (01:58 +0000)]
Fix ordering breakage, moving the fclose() test last again.
Also correct some format strings.

From Doug Hogan (doug (at) acyclic.org)

10 years agoUpdate regress to match change in stpcpy() linker message
guenther [Sun, 20 Jul 2014 01:47:17 +0000 (01:47 +0000)]
Update regress to match change in stpcpy() linker message

Noted by Doug Hogan (doug (at) acyclic.org)

10 years agoMake sure the correct errno is reported by warn* or err* and not
guenther [Sun, 20 Jul 2014 01:38:40 +0000 (01:38 +0000)]
Make sure the correct errno is reported by warn* or err* and not
the errno of an intervening cleanup operation like close/unlink/etc.

Diff from Doug Hogan (doug (at) acyclic.org)

10 years agoDelete unused variables found by -Wall
guenther [Sun, 20 Jul 2014 01:29:03 +0000 (01:29 +0000)]
Delete unused variables found by -Wall

10 years agoAdd missing include. Tickled by Doug Hogan (doug (at) acyclic.org)
guenther [Sun, 20 Jul 2014 01:26:17 +0000 (01:26 +0000)]
Add missing include.  Tickled by Doug Hogan (doug (at) acyclic.org)

10 years agoMark fatal() as printf-like.
guenther [Sun, 20 Jul 2014 00:46:26 +0000 (00:46 +0000)]
Mark fatal() as printf-like.
Don't put a format string that's only used once in a variable.

10 years agoFlense the telnet code base of unwanted ifdefs: authentication/encryption
guenther [Sat, 19 Jul 2014 23:50:38 +0000 (23:50 +0000)]
Flense the telnet code base of unwanted ifdefs: authentication/encryption
tn3270, sgtty, pre-POSIX and other ancient system support, etc.  Brings up
to date the manpage with what we support.

ok matthieu@ beck@ jmc@ millert@ deraadt@ okan@

10 years agoPrint a warning message if the files with the random seed are not
bluhm [Sat, 19 Jul 2014 21:27:16 +0000 (21:27 +0000)]
Print a warning message if the files with the random seed are not
writeable during shutdown.  This prevents ugly error messages when
the machine is rebooted from singe-user without mounting the file
systems read-write.
suggested by deraadt@

10 years agoExplicitely check the value of REGRESS_SKIP_SLOW rather than its emptyness,
miod [Sat, 19 Jul 2014 18:15:53 +0000 (18:15 +0000)]
Explicitely check the value of REGRESS_SKIP_SLOW rather than its emptyness,
for it defaults to a non-empty value; Doug Hogan

10 years agoMake sure struct sockaddr_in gets completely initialized by setting it to zero
miod [Sat, 19 Jul 2014 18:11:12 +0000 (18:11 +0000)]
Make sure struct sockaddr_in gets completely initialized by setting it to zero
before setting the few fields we are interested in; Doug Hogan

10 years agoBring back pci_dopm, but disable it before powerdown.
pirofti [Sat, 19 Jul 2014 18:01:23 +0000 (18:01 +0000)]
Bring back pci_dopm, but disable it before powerdown.

This fixes both the Lemote reboot issue and the USB issue on the
Gdium's that miod@ spotted.

Suggested by kettenis@, thanks!

Okay miod@

10 years agoremove disabled main hook; we use phdr now; ok bcook
deraadt [Sat, 19 Jul 2014 16:12:00 +0000 (16:12 +0000)]
remove disabled main hook; we use phdr now; ok bcook

10 years agoarc4random re-seeds with getentropy() now; ok deraadt@ jmc@
naddy [Sat, 19 Jul 2014 16:11:16 +0000 (16:11 +0000)]
arc4random re-seeds with getentropy() now; ok deraadt@ jmc@

10 years agotab love
deraadt [Sat, 19 Jul 2014 16:10:50 +0000 (16:10 +0000)]
tab love

10 years agoMove _ARC4_ATFORK handlers from thread_private.h in portable.
bcook [Sat, 19 Jul 2014 15:29:25 +0000 (15:29 +0000)]
Move _ARC4_ATFORK handlers from thread_private.h in portable.

10 years agomove _ARC4_LOCK/UNLOCK primitives from thread_private into OS-specific modules
bcook [Sat, 19 Jul 2014 14:34:38 +0000 (14:34 +0000)]
move _ARC4_LOCK/UNLOCK primitives from thread_private into OS-specific modules

10 years agoSecurity fix:
schwarze [Sat, 19 Jul 2014 13:15:07 +0000 (13:15 +0000)]
Security fix:
Validate the manpath up front and report a Bad Request if it is not
listed in manpath.conf, such that clients can't probe which directories
exist on the server.  In case of configuration errors, consistently
report Internal Server Error without disclosing any further information.

Partially based on a patch from Sebastien Marie <semarie-openbsd at
latrappe dot fr>, but avoiding a couple of issues with that patch
and approaching the issue in a somewhat more rigorous way.

10 years agofixup typos
bcook [Sat, 19 Jul 2014 13:02:28 +0000 (13:02 +0000)]
fixup typos

10 years agoBackout pci_dopm usage as it also breaks reboot on Lemote's.
pirofti [Sat, 19 Jul 2014 12:54:09 +0000 (12:54 +0000)]
Backout pci_dopm usage as it also breaks reboot on Lemote's.

Noticed by matthieu@.

10 years agoSecurity fix:
schwarze [Sat, 19 Jul 2014 11:35:09 +0000 (11:35 +0000)]
Security fix:
Validate the name of the file to show before opening it.
Only allow relative filenames starting with "man" or "cat"
and containing neither "/.." nor "../".

While here, correct the condition discarding an initial "./".

Vulnerability found by Sebastien Marie <semarie-openbsd at latrappe dot fr>.
Many thanks for sending a patch; however, i did not use it but made the
checks even stricter.

10 years agoDocument that abort() is async signal safe now that it doesn't flush
matthew [Sat, 19 Jul 2014 08:55:22 +0000 (08:55 +0000)]
Document that abort() is async signal safe now that it doesn't flush
stdio buffers

While here replace "SUSv[67]" with "POSIX Issue [67]" and update
signal(3) to mention that pselect() and ppoll() are async signal safe
like sigaction(2) already does.

ok guenther

10 years agoactually use the cve match_location correctly.
espie [Sat, 19 Jul 2014 08:48:44 +0000 (08:48 +0000)]
actually use the cve match_location correctly.
problem noticed by aja@

10 years agomiod pointed out i forgot which way round casts go.
dlg [Sat, 19 Jul 2014 05:27:17 +0000 (05:27 +0000)]
miod pointed out i forgot which way round casts go.

10 years agoFix strtonum range to unbreak -pass fd:0
lteo [Sat, 19 Jul 2014 03:40:26 +0000 (03:40 +0000)]
Fix strtonum range to unbreak -pass fd:0

ok deraadt@

10 years agoChange _rs_allocate so it can combine the two regions (rs and rsx)
deraadt [Sat, 19 Jul 2014 00:08:41 +0000 (00:08 +0000)]
Change _rs_allocate so it can combine the two regions (rs and rsx)
into one if a system has an awesome getentropy().  In that case it
is valid to totally throw away the rsx state in the child.  If the
getentropy() is not very good and has a lazy reseed operation, this
combining is a bad idea, and the reseed should probably continue to
use the "something old, something new" mix.  _rs_allocate() can
accomodate either method, but not on the fly.
ok matthew

10 years agoThe pf forward tests were running rdr-to and nat-to simultaneously
bluhm [Fri, 18 Jul 2014 23:54:55 +0000 (23:54 +0000)]
The pf forward tests were running rdr-to and nat-to simultaneously
only.  Change address layout and add individual tests for each
feature rdr-to and nat-to and rdr-to together with nat-to.

10 years agoCleanup portable arc4random fork detection code:
matthew [Fri, 18 Jul 2014 21:40:54 +0000 (21:40 +0000)]
Cleanup portable arc4random fork detection code:

1. Use "len" parameter instead of sizeof(*rs).

2. Simplify the atfork handler to be strictly async signal safe by
simply writing to a global volatile sig_atomic_t object, and then
checking for this in _rs_forkdetect().  (Idea from discussions with
Szabolcs Nagy and Rich Felker.)

3. Use memset(rs, 0, sizeof(*rs)) to match OpenBSD's MAP_INHERIT_ZERO
fork semantics to avoid any skew in behavior across platforms.

ok deraadt

10 years agosync
deraadt [Fri, 18 Jul 2014 19:50:35 +0000 (19:50 +0000)]
sync

10 years agoOops, getentropy() is an "extension interface", not a "base interface"
matthew [Fri, 18 Jul 2014 19:24:42 +0000 (19:24 +0000)]
Oops, getentropy() is an "extension interface", not a "base interface"

Also, update the async signal safe list in signal(3) too (reminded by
deraadt)

10 years agoDocument that getentropy() is async signal safe.
matthew [Fri, 18 Jul 2014 19:19:20 +0000 (19:19 +0000)]
Document that getentropy() is async signal safe.

Pointed out by Jean-Philippe Ouellet

10 years agoDo not use the HTTP_HOST CGI variable,
schwarze [Fri, 18 Jul 2014 19:02:07 +0000 (19:02 +0000)]
Do not use the HTTP_HOST CGI variable,
just make the HTTP redirect Location: relative.
Less user input is good, it reduces the attack surface.
Besides, this removes one global variable and 4 lines of code.

Patch from Sebastien Marie <semarie-openbsd at latrappe dot fr>.

10 years agoSince syslog messages are now sent via the sendsyslog(2) system call,
deraadt [Fri, 18 Jul 2014 18:20:42 +0000 (18:20 +0000)]
Since syslog messages are now sent via the sendsyslog(2) system call,
we no longer need the spread of dev/log AF_UNIX sockets all over the
various chroot spaces.
ok beck millert aja

10 years agoAs discussed with beck, tweak the wording for getentropy slightly so
deraadt [Fri, 18 Jul 2014 18:20:17 +0000 (18:20 +0000)]
As discussed with beck, tweak the wording for getentropy slightly so
that a certain kind of people don't go bonkers over "what is entropy".
it is what it is, input to PRNG's.

10 years agougly ugly whitespace
deraadt [Fri, 18 Jul 2014 18:17:28 +0000 (18:17 +0000)]
ugly ugly whitespace

10 years agomissing newline
deraadt [Fri, 18 Jul 2014 18:01:26 +0000 (18:01 +0000)]
missing newline

10 years agofix sorted output
espie [Fri, 18 Jul 2014 16:57:41 +0000 (16:57 +0000)]
fix sorted output

10 years agoWhen the MAN_DIR/manpath.conf configuration file does not exist or is empty,
schwarze [Fri, 18 Jul 2014 14:46:20 +0000 (14:46 +0000)]
When the MAN_DIR/manpath.conf configuration file does not exist or is empty,
log the problem, hand the pg_error_internal() error page to the client,
and exit(3) in a controlled way instead of stumbling on and segfaulting
later.

Patch from Sebastien Marie <semarie-openbsd at latrappe dot fr>,
messages tweaked by me.

10 years agoFix privsep.c. Call missing imsg_free() after imsg_get(). Also add
yasuoka [Fri, 18 Jul 2014 13:16:22 +0000 (13:16 +0000)]
Fix privsep.c.  Call missing imsg_free() after imsg_get().  Also add
missing #include <net/if.h> to use IFNAMESIZ and replace some strncmp()
by startswith().

10 years agoatomic_swap_ptr is special.
dlg [Fri, 18 Jul 2014 12:44:53 +0000 (12:44 +0000)]
atomic_swap_ptr is special.

for jmatthew@

10 years agoFollow the recent addition of /usr/local/lib/pkgconfig and add
ajacoutot [Fri, 18 Jul 2014 11:35:32 +0000 (11:35 +0000)]
Follow the recent addition of /usr/local/lib/pkgconfig and add
/usr/local/share/pkgconfig

ok sthen@

10 years agoCleanups:
ajacoutot [Fri, 18 Jul 2014 10:43:29 +0000 (10:43 +0000)]
Cleanups:
- links are already ignored when creating the sums
- better CVSID match

10 years agopass atomic_{cas,swap}_uint a volatile void * instead of a volatile
dlg [Fri, 18 Jul 2014 10:40:14 +0000 (10:40 +0000)]
pass atomic_{cas,swap}_uint a volatile void * instead of a volatile
void **. the latter is really hard to cast for, and not what what
solaris does.

ok kettenis@

10 years agoimplement 'rootdev' parsing similar to what's already done in the kernel,
jasper [Fri, 18 Jul 2014 07:27:47 +0000 (07:27 +0000)]
implement 'rootdev' parsing similar to what's already done in the kernel,
but this time for bootdev(). defaults to octcf0a if all else fails.

10 years agoRemove "const" from the lsearch(3) manual's synopsis too.
matthew [Fri, 18 Jul 2014 07:25:26 +0000 (07:25 +0000)]
Remove "const" from the lsearch(3) manual's synopsis too.

Reminded by Rafael Neves

10 years agoimplement EFBIG handling for heavily fragmented packets on the tx path.
dlg [Fri, 18 Jul 2014 07:11:04 +0000 (07:11 +0000)]
implement EFBIG handling for heavily fragmented packets on the tx path.

ok claudio@

10 years agozap trailing whitespace;
jmc [Fri, 18 Jul 2014 06:20:36 +0000 (06:20 +0000)]
zap trailing whitespace;

10 years agoChange lsearch()'s "base" argument to require a non-const pointer to
matthew [Fri, 18 Jul 2014 04:16:09 +0000 (04:16 +0000)]
Change lsearch()'s "base" argument to require a non-const pointer to
align with POSIX and other systems.

Pointed out by Elliott Hughes on tech
ok deraadt

10 years agorestore umask around listener socket creation (dropped in streamlocal patch
djm [Fri, 18 Jul 2014 02:46:01 +0000 (02:46 +0000)]
restore umask around listener socket creation (dropped in streamlocal patch
merge)

10 years agoSeperate arc4random's os-dependent parts into static inline functions,
deraadt [Fri, 18 Jul 2014 02:05:55 +0000 (02:05 +0000)]
Seperate arc4random's os-dependent parts into static inline functions,
making it much easier for libressl -portable to fill in the gaps.
ok bcook beck

10 years agoavoid errx(); Jonas Termansen
deraadt [Thu, 17 Jul 2014 23:50:07 +0000 (23:50 +0000)]
avoid errx(); Jonas Termansen

10 years agoavoid sys/param.h; Jonas Termansen
deraadt [Thu, 17 Jul 2014 23:48:24 +0000 (23:48 +0000)]
avoid sys/param.h; Jonas Termansen

10 years agoit is 2014, and we still need to encourage people away from srand()
deraadt [Thu, 17 Jul 2014 23:12:28 +0000 (23:12 +0000)]
it is 2014, and we still need to encourage people away from srand()
and random().  Sigh.

10 years agofiles-to-dump can be a duid;
jmc [Thu, 17 Jul 2014 19:58:05 +0000 (19:58 +0000)]
files-to-dump can be a duid;
From: Maximilian Fillinger

10 years agoRework management of the external L2 cache on the few Indy/Indigo2 systems
miod [Thu, 17 Jul 2014 19:51:58 +0000 (19:51 +0000)]
Rework management of the external L2 cache on the few Indy/Indigo2 systems
which have it.

Instead of implementing external L2 maintainance at the cache routine level,
let bus_dmamap_sync(9) know about the possible existence of an external L2,
and invoke a dedicated routine to perform the necessary cache operations.

This way, the external L2 dmamap_sync function pointer can get invoked with
the physical address to operate on; this saves the pmap_extract() calls the
previous cache routine had to do.

10 years agomatch current permissions
deraadt [Thu, 17 Jul 2014 18:55:42 +0000 (18:55 +0000)]
match current permissions

10 years agosh netstart, instead of using .
deraadt [Thu, 17 Jul 2014 15:08:29 +0000 (15:08 +0000)]
sh netstart, instead of using .
We don't want any of the variables created inside netstart to infect the
rc script.
ok claudio sthen aja

10 years agoUnbreak after the rc_do->_rc_do and rc_wait->_rc_wait renaming.
ajacoutot [Thu, 17 Jul 2014 15:00:06 +0000 (15:00 +0000)]
Unbreak after the rc_do->_rc_do and rc_wait->_rc_wait renaming.
If someone wants to take a shot a modifying this rc script so that it does
not use internal rc.subr functions, be my guest...

spotted by jsg@