openbsd
9 years agowhen we run into real errors, the progress meter is distracting, so have
espie [Mon, 22 Dec 2014 14:24:56 +0000 (14:24 +0000)]
when we run into real errors, the progress meter is distracting, so have
a method ->disable that does something nice to the display, and stops
the progress meter right before we display our first real error.

9 years agoTeach ld(1) not to add a PT_INTERP entry for -static -pie.
kettenis [Mon, 22 Dec 2014 14:17:22 +0000 (14:17 +0000)]
Teach ld(1) not to add a PT_INTERP entry for -static -pie.

ok kurt@

9 years agoTeach ld(1) not to add a PT_INTERP entry for -static -pie.
kettenis [Mon, 22 Dec 2014 14:09:58 +0000 (14:09 +0000)]
Teach ld(1) not to add a PT_INTERP entry for -static -pie.

ok kurt@

9 years agoSelf-relocation code for sparc64.
kettenis [Mon, 22 Dec 2014 13:53:01 +0000 (13:53 +0000)]
Self-relocation code for sparc64.

9 years agoWhen skipping a relocation because the referenced symbol is undefined, make
kettenis [Mon, 22 Dec 2014 13:32:51 +0000 (13:32 +0000)]
When skipping a relocation because the referenced symbol is undefined, make
sure we move on to the next relocation entry.

While there, also skip relocations for REL architectures.

9 years agoNow does not need to be initialized event.value.
shadchin [Mon, 22 Dec 2014 11:21:49 +0000 (11:21 +0000)]
Now does not need to be initialized event.value.
This not used anymore.

ok deraadt@

9 years agoOperations on the global prefix or address lists should be done under
mpi [Mon, 22 Dec 2014 11:17:20 +0000 (11:17 +0000)]
Operations on the global prefix or address lists should be done under
splsoftnet().

9 years agoMake sure rtrequest1(9) is called under splsoftnet().
mpi [Mon, 22 Dec 2014 11:05:53 +0000 (11:05 +0000)]
Make sure rtrequest1(9) is called under splsoftnet().

9 years agoadd fingerprinthash to the options list;
jmc [Mon, 22 Dec 2014 09:26:31 +0000 (09:26 +0000)]
add fingerprinthash to the options list;

9 years agotweak previous;
jmc [Mon, 22 Dec 2014 09:24:59 +0000 (09:24 +0000)]
tweak previous;

9 years agoOut out you evil network daemon.
florian [Mon, 22 Dec 2014 09:13:35 +0000 (09:13 +0000)]
Out out you evil network daemon.
OK deraadt@ some time ago

9 years agomention ssh -Q feature to list supported { MAC, cipher, KEX, key }
djm [Mon, 22 Dec 2014 09:05:17 +0000 (09:05 +0000)]
mention ssh -Q feature to list supported { MAC, cipher, KEX, key }
algorithms in more places and include the query string used to
list the relevant information; bz#2288

9 years agotweak previous;
jmc [Mon, 22 Dec 2014 08:24:17 +0000 (08:24 +0000)]
tweak previous;

9 years agoregression test for multiple required pubkey authentication;
djm [Mon, 22 Dec 2014 08:06:03 +0000 (08:06 +0000)]
regression test for multiple required pubkey authentication;
ok markus@

9 years agocorrect description of what will happen when a AuthorizedKeysCommand is
djm [Mon, 22 Dec 2014 08:04:23 +0000 (08:04 +0000)]
correct description of what will happen when a AuthorizedKeysCommand is
specified but AuthorizedKeysCommandUser is not (sshd will refuse to start)

9 years agomake internal handling of filename arguments of "none" more consistent
djm [Mon, 22 Dec 2014 07:55:51 +0000 (07:55 +0000)]
make internal handling of filename arguments of "none" more consistent
with ssh. "none" arguments are now replaced with NULL when the
configuration is finalised.

Simplifies checking later on (just need to test not-NULL rather than
that + strcmp) and cleans up some inconsistencies. ok markus@

9 years agoremember which public keys have been used for authentication and
djm [Mon, 22 Dec 2014 07:51:30 +0000 (07:51 +0000)]
remember which public keys have been used for authentication and
refuse to accept previously-used keys.

This allows AuthenticationMethods=publickey,publickey to require
that users authenticate using two _different_ pubkeys.

ok markus@

9 years agofix passing of wildcard forward bind addresses when connection
djm [Mon, 22 Dec 2014 07:24:11 +0000 (07:24 +0000)]
fix passing of wildcard forward bind addresses when connection
multiplexing is in use; patch from Sami Hartikainen via bz#2324;
ok dtucker@

9 years agomake this slightly easier to diff against portable
djm [Mon, 22 Dec 2014 06:14:29 +0000 (06:14 +0000)]
make this slightly easier to diff against portable

9 years agoadd TIMEOUT_INITIALIZER for initting timeout declaractions.
dlg [Mon, 22 Dec 2014 04:43:38 +0000 (04:43 +0000)]
add TIMEOUT_INITIALIZER for initting timeout declaractions.

similar to TASK_INITIALIZER and all the queue _INITIALIZER things.

ok deraadt@

9 years agoIntroduce new csu0 variant for -static -pie binaries to use called
kurt [Mon, 22 Dec 2014 03:51:08 +0000 (03:51 +0000)]
Introduce new csu0 variant for -static -pie binaries to use called
rcsu0.o where the initial 'r' is for relocatable. rcsu0.o performs
self-relocation on static pie binaries by calling a slightly modified
copy of ld.so's _dl_boot_bind() in boot.h.

The first arch implementatation is also included for amd64 where
__start calls _dl_boot_bind() and then calls ___start(). Includes
parts from kettenis@ to help get R_X86_64_64 relocations working
and proper handling for undefined weak symbols.

This is the first part of several to get static pie self-relocating
binaries working. binutils, gcc and kernel changes are forthcoming
to complete the solution, then per-arch implementations are needed
for MD_RCRT0_START in csu.

okay kettenis@ pascal@ deraadt@

9 years agoconvert to using siphash
tedu [Mon, 22 Dec 2014 03:38:01 +0000 (03:38 +0000)]
convert to using siphash

9 years agofix docs for NOBROADCASTKILL
tedu [Mon, 22 Dec 2014 03:33:18 +0000 (03:33 +0000)]
fix docs for NOBROADCASTKILL

9 years agobcopy -> memcpy, as in amd64
deraadt [Mon, 22 Dec 2014 03:14:59 +0000 (03:14 +0000)]
bcopy -> memcpy, as in amd64

9 years agobcopy -> memcpy; ok tedu
deraadt [Mon, 22 Dec 2014 03:13:45 +0000 (03:13 +0000)]
bcopy -> memcpy; ok tedu

9 years agoremove some unused fields from pool. ok dlg
tedu [Mon, 22 Dec 2014 02:59:53 +0000 (02:59 +0000)]
remove some unused fields from pool. ok dlg

9 years agoamd64 now also uses the ssyms mechanism.
deraadt [Mon, 22 Dec 2014 02:55:48 +0000 (02:55 +0000)]
amd64 now also uses the ssyms mechanism.
ok guenther

9 years agounifdef INET
tedu [Mon, 22 Dec 2014 02:28:51 +0000 (02:28 +0000)]
unifdef INET

9 years agounifdef INET
tedu [Mon, 22 Dec 2014 02:26:53 +0000 (02:26 +0000)]
unifdef INET

9 years agoadjust for new SHA256 key fingerprints and slightly-different MD5 hex
djm [Mon, 22 Dec 2014 02:15:52 +0000 (02:15 +0000)]
adjust for new SHA256 key fingerprints and slightly-different MD5 hex
fingerprint format

9 years agopoll changes to netcat (usr.bin/netcat.c r1.125) broke this test;
djm [Mon, 22 Dec 2014 01:14:49 +0000 (01:14 +0000)]
poll changes to netcat (usr.bin/netcat.c r1.125) broke this test;
fix it by ensuring more stdio fds are sent to devnull

9 years agoif we're able to use large page allocators, try and place at least
dlg [Mon, 22 Dec 2014 00:33:40 +0000 (00:33 +0000)]
if we're able to use large page allocators, try and place at least
8 items on a page. this reduces the number of allocator operations
we have to do per item on large items.

ok tedu@

9 years agotweak previous;
jmc [Sun, 21 Dec 2014 23:35:14 +0000 (23:35 +0000)]
tweak previous;

9 years agodocument FingerprintHash here too
djm [Sun, 21 Dec 2014 23:12:42 +0000 (23:12 +0000)]
document FingerprintHash here too

9 years agoAdd FingerprintHash option to control algorithm used for key
djm [Sun, 21 Dec 2014 22:27:55 +0000 (22:27 +0000)]
Add FingerprintHash option to control algorithm used for key
fingerprints. Default changes from MD5 to SHA256 and format
from hex to base64.

Feedback and ok naddy@ markus@

9 years agoWSCONS_EVENT_WSMOUSED_SLEEP and WSCONS_EVENT_WSMOUSED_CLOSE not used anymore.
shadchin [Sun, 21 Dec 2014 18:25:07 +0000 (18:25 +0000)]
WSCONS_EVENT_WSMOUSED_SLEEP and WSCONS_EVENT_WSMOUSED_CLOSE not used anymore.

ok mpi@

9 years agoCleanup - remove event WSCONS_EVENT_WSMOUSED_SLEEP, WSCONS_EVENT_WSMOUSED_CLOSE.
shadchin [Sun, 21 Dec 2014 18:23:37 +0000 (18:23 +0000)]
Cleanup - remove event WSCONS_EVENT_WSMOUSED_SLEEP, WSCONS_EVENT_WSMOUSED_CLOSE.
Do not need it now.

ok mpi@

9 years agoWSMOUSE_INPUT_WSMOUSED_CLOSE not used anymore.
shadchin [Sun, 21 Dec 2014 18:16:07 +0000 (18:16 +0000)]
WSMOUSE_INPUT_WSMOUSED_CLOSE not used anymore.

ok mpi@

9 years agoPrevent writing to the kernel area via the direct map. We do this by padding
mlarkin [Sun, 21 Dec 2014 16:27:07 +0000 (16:27 +0000)]
Prevent writing to the kernel area via the direct map. We do this by padding
the end of the kernel area to 2MB, so that the direct map pages can then
have the W permission removed (X permission was already removed in a previous
diff). This creates a VA hole at the end of bss, so adjust for that since
that's where symbols get loaded by the bootloader (for now, map that region
RO until the boot loader can be updated to place the symbols at "end" instead
of "end of bss").

with help from and ok deraadt@

9 years agoUse -m for macro set selection in mandoc(1) mode only, not in man(1)
schwarze [Sun, 21 Dec 2014 14:49:00 +0000 (14:49 +0000)]
Use -m for macro set selection in mandoc(1) mode only, not in man(1)
and apropos(1) mode.  While here, put a space character between
options and option arguments in error messages.
Both reported by Alessandro DE LAURENZIS <just22 dot adl at gmail dot com>.

9 years agoAlways clear a port reset feature after setting it, or at least try to.
mpi [Sun, 21 Dec 2014 12:04:01 +0000 (12:04 +0000)]
Always clear a port reset feature after setting it, or at least try to.
Otherwise we might leave a port in an unwanted state.

Found while investigating timeout issues on xhci(4).

9 years agoVarious transfer improvements/fixes.
mpi [Sun, 21 Dec 2014 11:46:53 +0000 (11:46 +0000)]
Various transfer improvements/fixes.

Chain TRBs when submitting bulk or interrupt transfers with a length
bigger than the Maxium Packet Size of the endpoint.

Append a supplementary TRB if a zero length packet is required.

While here, set the flags of each TRB at once.  Even if this driver
implementation fills the first TRB of a chain last, be safe and make
sure the hardware wont miss any flag.

Note that with this change, DMA sync operations might not cover the
whole chain, just like for control transfers, if the ring is starting
over.

Previous version of this diff tested by Peter N. M. Hansteen, thanks!

9 years agoUse a bitmask when dumping TRB flags. No change in !XHCI_DEBUG.
mpi [Sun, 21 Dec 2014 11:20:24 +0000 (11:20 +0000)]
Use a bitmask when dumping TRB flags.  No change in !XHCI_DEBUG.

9 years agofix test-redef2:
espie [Sun, 21 Dec 2014 09:33:12 +0000 (09:33 +0000)]
fix test-redef2:
- introduce explicit STORAGE classes for the shadow stack entries
- delay freeing definitions if they're in-use, keep them in a simple array.

okay millert@

9 years ago<sys/endian.h> needs <sys/cdefs.h>
guenther [Sun, 21 Dec 2014 04:49:00 +0000 (04:49 +0000)]
<sys/endian.h> needs <sys/cdefs.h>

found previously by someone whose email I've lost; rediscovered by miod@
ok millert@ deraadt@

9 years agoStop pulling in <arpa/inet.h> or <arpa/nameser.h> when unnecessary.
guenther [Sun, 21 Dec 2014 00:54:49 +0000 (00:54 +0000)]
Stop pulling in <arpa/inet.h> or <arpa/nameser.h> when unnecessary.
*Do* pull it in when in_{port,addr}_h is needed and <netinet/in.h> isn't.

ok reyk@

9 years agoShow the sign for NaN as per POSIX; from Elliott Hughes.
daniel [Sun, 21 Dec 2014 00:23:30 +0000 (00:23 +0000)]
Show the sign for NaN as per POSIX; from Elliott Hughes.

ok martynas@, millert@, doug@

9 years agoFix build with -Werror -std=c99 -pedantic.
daniel [Sun, 21 Dec 2014 00:17:24 +0000 (00:17 +0000)]
Fix build with -Werror -std=c99 -pedantic.

ok schwarze@

9 years agoReplacing <machine/endian.h> with <sys/endian.h> does not imply removing
miod [Sat, 20 Dec 2014 18:15:29 +0000 (18:15 +0000)]
Replacing <machine/endian.h> with <sys/endian.h> does not imply removing
<sys/types.h>. kthxbye

9 years agoReplace switch workq with taskq.
krw [Sat, 20 Dec 2014 16:34:27 +0000 (16:34 +0000)]
Replace switch workq with taskq.

Diff from blambert@, double ok@ kettenis.

9 years agoZap a sneaky trailing blank that was hiding in plain view.
krw [Sat, 20 Dec 2014 15:54:48 +0000 (15:54 +0000)]
Zap a sneaky trailing blank that was hiding in plain view.

9 years agoZap local variable that shadows another local variable. Fixes a panic caused
kettenis [Sat, 20 Dec 2014 13:45:15 +0000 (13:45 +0000)]
Zap local variable that shadows another local variable.  Fixes a panic caused
by passing random stack garbage as the size to free(9).

From David Imhoff

9 years agoZap a bunch of leading/trailing whitespace.
krw [Sat, 20 Dec 2014 13:37:32 +0000 (13:37 +0000)]
Zap a bunch of leading/trailing whitespace.

9 years agoCleanup vmt(4) by changing an ugly if statement for received commands
reyk [Sat, 20 Dec 2014 11:27:18 +0000 (11:27 +0000)]
Cleanup vmt(4) by changing an ugly if statement for received commands
into a table of callbacks.  Additionally, turn printfs into DPRINTFs
to make the driver less chatty by default.

OK deraadt@

9 years agoopenbsd rcisd
tedu [Sat, 20 Dec 2014 06:04:39 +0000 (06:04 +0000)]
openbsd rcisd

9 years ago$OpenBSD for our rev here
guenther [Sat, 20 Dec 2014 05:43:26 +0000 (05:43 +0000)]
$OpenBSD for our rev here

9 years agoFix two issues causing a class of assertion failures found by jsg@ with afl.
schwarze [Sat, 20 Dec 2014 02:26:42 +0000 (02:26 +0000)]
Fix two issues causing a class of assertion failures found by jsg@ with afl.
1) rew_sub(): Make sure REWIND_MORE is acted upon even when followed by
REWIND_NONE.  This prevents .It from ending up inside other children of .Bl.
2) blk_exp_close(): Only allow extension of .Bl when it has at least
one .It.  Otherwise, a broken child block could be moved in front of
the .Bl, effectively resulting in a .Bl that ended before it began.

9 years agoresolve some code duplication; no functional change
schwarze [Sat, 20 Dec 2014 00:19:54 +0000 (00:19 +0000)]
resolve some code duplication; no functional change

9 years agoUse <sys/endian.h> instead of <machine/endian.h>
guenther [Fri, 19 Dec 2014 22:44:58 +0000 (22:44 +0000)]
Use <sys/endian.h> instead of <machine/endian.h>

ok dlg@ mpi@ bcook@ millert@ miod@

9 years agosync with libc, using brnz,pt instead, should be better
deraadt [Fri, 19 Dec 2014 22:30:47 +0000 (22:30 +0000)]
sync with libc, using brnz,pt instead, should be better
ok kettenis

9 years agoUse a simpler expression to check the ether type in scapy. This
bluhm [Fri, 19 Dec 2014 21:41:20 +0000 (21:41 +0000)]
Use a simpler expression to check the ether type in scapy.  This
makes the fragment tests work on FreeBSD.  From Ilya Bakulin.

9 years agono need to kvm the palloc. the pgsize is more correctly accessed via pool.
tedu [Fri, 19 Dec 2014 20:18:15 +0000 (20:18 +0000)]
no need to kvm the palloc. the pgsize is more correctly accessed via pool.

9 years agoUse reallocarray() where suitable
deraadt [Fri, 19 Dec 2014 19:28:55 +0000 (19:28 +0000)]
Use reallocarray() where suitable
ok millert doug

9 years agoDo not report an EDQUOT "Disk quota exceeded" error from the routing
bluhm [Fri, 19 Dec 2014 18:57:17 +0000 (18:57 +0000)]
Do not report an EDQUOT "Disk quota exceeded" error from the routing
code.  Instead generate an ENOBUFS "No buffer space available" error
at the malloc(9) failure in rt_setgate(9) and propagate it.
OK mpi@

9 years agomultiline string literals aren't really a thing. just smush a few strings
tedu [Fri, 19 Dec 2014 17:44:29 +0000 (17:44 +0000)]
multiline string literals aren't really a thing. just smush a few strings
together.

9 years agoremove ipw. it wasn't included in generic, but nobody complained,
tedu [Fri, 19 Dec 2014 17:25:14 +0000 (17:25 +0000)]
remove ipw. it wasn't included in generic, but nobody complained,
indicating probably nobody has one of these in amd64 capable hardware.
spotted by krw. ok kettenis krw

9 years agomake the code look more like libc by changing Transform to take the state
tedu [Fri, 19 Dec 2014 17:16:57 +0000 (17:16 +0000)]
make the code look more like libc by changing Transform to take the state
ok millert

9 years agobcopy to memcpy. ok deraadt millert
tedu [Fri, 19 Dec 2014 17:15:16 +0000 (17:15 +0000)]
bcopy to memcpy. ok deraadt millert

9 years agounifdef INET in net code as a precursor to removing the pretend option.
tedu [Fri, 19 Dec 2014 17:14:39 +0000 (17:14 +0000)]
unifdef INET in net code as a precursor to removing the pretend option.
long live the one true internet.
ok henning mikeb

9 years agoEnforcing an arbitrary, implementation dependent, undocumented limit
schwarze [Fri, 19 Dec 2014 17:10:42 +0000 (17:10 +0000)]
Enforcing an arbitrary, implementation dependent, undocumented limit
by calling assert() when valid user input exceeds it is a bad idea.
Allocate the terminal font stack dynamically instead of crashing
above 10 entries.  Issue found by jsg@ with afl.

9 years agoFix tree breakage due to unused variable after last commit.
krw [Fri, 19 Dec 2014 15:46:22 +0000 (15:46 +0000)]
Fix tree breakage due to unused variable after last commit.

9 years agoChange scan and auth+assoc workq entries to taskq entries.
krw [Fri, 19 Dec 2014 15:19:47 +0000 (15:19 +0000)]
Change scan and auth+assoc workq entries to taskq entries.

Identical diff originally and independently developed by blambert@.

9 years agoshuffle function declarations a bit; stylistic changes only.
reyk [Fri, 19 Dec 2014 15:14:48 +0000 (15:14 +0000)]
shuffle function declarations a bit;  stylistic changes only.

9 years agobe like the kernel and only unroll if not small
tedu [Fri, 19 Dec 2014 15:14:04 +0000 (15:14 +0000)]
be like the kernel and only unroll if not small

9 years agoNo need to include sys/types.h when sys/param.h is already included.
reyk [Fri, 19 Dec 2014 15:07:33 +0000 (15:07 +0000)]
No need to include sys/types.h when sys/param.h is already included.
While here, sort includes a bit. No functional change.

9 years agosync
deraadt [Fri, 19 Dec 2014 14:34:23 +0000 (14:34 +0000)]
sync

9 years agoi386 unrolling blows up the media in a big way, due to -Os for
deraadt [Fri, 19 Dec 2014 14:30:44 +0000 (14:30 +0000)]
i386 unrolling blows up the media in a big way, due to -Os for
ramdisk libc builds.  there has to be a better way without #ifdef's
in gross places, but I don't see it yet.

9 years agooops, forgot rndvar.h
deraadt [Fri, 19 Dec 2014 14:23:58 +0000 (14:23 +0000)]
oops, forgot rndvar.h

9 years agoAdd rdp/rfb/vnc.
ajacoutot [Fri, 19 Dec 2014 14:23:41 +0000 (14:23 +0000)]
Add rdp/rfb/vnc.
no objection from deraadt@

9 years agoplace the afterinstall: target correctly for static-only architectures
deraadt [Fri, 19 Dec 2014 14:19:41 +0000 (14:19 +0000)]
place the afterinstall: target correctly for static-only architectures

9 years agooops, forgot rndvar.h
deraadt [Fri, 19 Dec 2014 14:15:50 +0000 (14:15 +0000)]
oops, forgot rndvar.h

9 years agodon't print vnodes if we didn't read them
tedu [Fri, 19 Dec 2014 14:12:00 +0000 (14:12 +0000)]
don't print vnodes if we didn't read them

9 years ago1. -T (totalflag) requires nlist too.
tedu [Fri, 19 Dec 2014 14:08:20 +0000 (14:08 +0000)]
1. -T (totalflag) requires nlist too.
2. If we can't read a vnode, there's no way LIST_NEXT is going to be
meaningful.
3. set numvnodes before looping in case we return early.
getting better, but still not all fixed

9 years agoUse taskq rather than workq to remove unwanted alias.
krw [Fri, 19 Dec 2014 13:53:08 +0000 (13:53 +0000)]
Use taskq rather than workq to remove unwanted alias.

ok mikeb kettenis (for earlier version)

9 years agoMove cbus.c, cbusvar.h, and pcex.c to new 'cbus' directory, to gather
aoyama [Fri, 19 Dec 2014 13:17:35 +0000 (13:17 +0000)]
Move cbus.c, cbusvar.h, and pcex.c to new 'cbus' directory, to gather
'C-bus' device drivers in it.

More devices on cbus(4) will be added, hopefully :-)

ok miod@

9 years agoSupport source-hash and random with tables and dynifs; not just pools.
reyk [Fri, 19 Dec 2014 13:04:07 +0000 (13:04 +0000)]
Support source-hash and random with tables and dynifs; not just pools.
This finally allows to use source-hash for dynamic loadbalancing, eg.
"rdr-to <hosts> source-hash", instead of just round-robin and least-states.

An older pre-siphash version of this diff was tested by many people.

OK tedu@ benno@

9 years agoComment is no longer true, remove it.
mcbride [Fri, 19 Dec 2014 12:31:03 +0000 (12:31 +0000)]
Comment is no longer true, remove it.

9 years agoremove hash.h. no longer needed. ok reyk
tedu [Fri, 19 Dec 2014 09:41:40 +0000 (09:41 +0000)]
remove hash.h. no longer needed. ok reyk

9 years agoRemove an unused sys/hash.h include from db_structinfo.c
reyk [Fri, 19 Dec 2014 09:02:39 +0000 (09:02 +0000)]
Remove an unused sys/hash.h include from db_structinfo.c
(this file is only compiled with "option DDB_STRUCT").

ok guenther@

9 years agolonely bcopy called me by name
deraadt [Fri, 19 Dec 2014 07:42:49 +0000 (07:42 +0000)]
lonely bcopy called me by name

9 years agoanother handful of bcopy -> memcpy because there is no overlap
deraadt [Fri, 19 Dec 2014 07:23:57 +0000 (07:23 +0000)]
another handful of bcopy -> memcpy because there is no overlap

9 years agostart retiring the nointr allocator. specify PR_WAITOK as a flag as a
tedu [Fri, 19 Dec 2014 05:59:21 +0000 (05:59 +0000)]
start retiring the nointr allocator. specify PR_WAITOK as a flag as a
marker for which pools are not interrupt safe. ok dlg

9 years agoif you really must look inside the pool to decide if you've called
tedu [Fri, 19 Dec 2014 05:48:36 +0000 (05:48 +0000)]
if you really must look inside the pool to decide if you've called
pool_init already, the pr_size field is the least worst field to peek at.

9 years agoadd messages to #error so we know what's what (and so unifdef doesn't poop)
tedu [Fri, 19 Dec 2014 05:36:28 +0000 (05:36 +0000)]
add messages to #error so we know what's what (and so unifdef doesn't poop)

9 years agoRewrite the low-level UTF-8 parser from scratch.
schwarze [Fri, 19 Dec 2014 04:57:11 +0000 (04:57 +0000)]
Rewrite the low-level UTF-8 parser from scratch.
It accepted invalid byte sequences like 0xc080-c1bf, 0xe08080-e09fbf,
0xeda080-edbfbf, and 0xf0808080-f08fbfbf, produced valid roff Unicode
escape sequences from them, and the algorithm contained strong
defenses against any attempt to fix it.

This cures an assertion failure in the terminal formatter caused
by sneaking in ASCII 0x08 (backspace) by "encoding" it as an (invalid)
multibyte UTF-8 sequence, found by jsg@ with afl.

As a bonus, the new algorithm also reduces the code in the function
by about 20%.

9 years agoMake use of m_defrag() in re_encap().
brad [Fri, 19 Dec 2014 04:53:58 +0000 (04:53 +0000)]
Make use of m_defrag() in re_encap().

9 years agorename buffer to digest, more clear. ok deraadt
tedu [Fri, 19 Dec 2014 04:00:00 +0000 (04:00 +0000)]
rename buffer to digest, more clear. ok deraadt

9 years agoCA.sh and CA.pl are gone
lteo [Fri, 19 Dec 2014 03:58:02 +0000 (03:58 +0000)]
CA.sh and CA.pl are gone

9 years agoSync message digest algorithms with the ones actually implemented in
lteo [Fri, 19 Dec 2014 03:14:19 +0000 (03:14 +0000)]
Sync message digest algorithms with the ones actually implemented in
"openssl dgst".

feedback/ok jmc@

9 years agoconvert bcopy/zero to memcpy. ok deraadt djm
tedu [Fri, 19 Dec 2014 02:50:27 +0000 (02:50 +0000)]
convert bcopy/zero to memcpy. ok deraadt djm