summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-01-21Assume NFS_CHECK and RO_CHECK are defined.Philip Guenther
We only need the dev_t and not the entire struct stat in mntinfo. Delete some superfluous casts.
2015-01-21Reduce opt_t from long to int.Philip Guenther
Debug message consistency: format opts with %#x and modes with %#04o
2015-01-21Fix deferred host DNS lookups.Brent Cook
If the network is unreachable when ntpd starts and host_dns fails, be sure that we still close the HOST_DNS imsg. Thanks to Paul de Weerd <weerd at weirdnet dot nl> for reporting this. ok beck@
2015-01-21Remove unsafe micro-optimization of *bit test*Philip Guenther
2015-01-21Delete option COMPAT_43: support for pre-sa_len binaries has been obsoletePhilip Guenther
for a couple decades. Keep the OSIOCGIFCONF ioctl to support COMPAT_LINUX but move the rest of the Linux-specific ioctl() handling into linux_socket.c This lets struct osockaddr finally move from sys/socket.h to protocols/talkd.h ok krw@ deraadt@ mpi@
2015-01-21pass empty request lines through to tbl(7); sometimes, they end a layoutIngo Schwarze
2015-01-21blank lines in tables do not need special handling; simplifies codeIngo Schwarze
and reduces groff/mandoc differences in base by about 1%
2015-01-21Fix DTLS memory leak (CVE-2015-0206).Doug Hogan
There were four bugs fixed by this patch: * dtls1_buffer_record() now frees rdata->rbuf.buf on error. Since s->s3->rbuf was memset, rdata->rbuf is the only pointer left which points to the old rbuf. On error, rdata is freed so there will not be any way of freeing this memory unless we do it here. * Changed the return code of dtls1_buffer_record() to differentiate between queue full (0) and error (-1). See below as this differs from upstream. * Handle errors if calls to dtls1_buffer_record() fail with -1. Previously, it did not check the return value. * Changed the way receipts are recorded. Previously, it was recorded when processed successfully (whether buffered or not) in dtls1_process_record(). Now, it records when it is handled in dtls1_get_record(): either when it is entered into the queue to buffer for the next epoch or when it is processed directly. Processing buffered records does not add a receipt because it needed one in order to get into the queue. The above bugs combined contributed to an eventual DoS through memory exhaustion. The memory leak came from dtls1_buffer_record()'s error handling. The error handling can be triggered by a duplicate record or malloc failure. It was possible to add duplicate records because they were not being dropped. The faulty receipts logic did not detect replays when dealing with records for the next epoch. Additionally, dtls1_buffer_record()'s return value was not checked so an attacker could send repeated replay records for the next epoch. Reported to OpenSSL by Chris Mueller. Patch based on OpenSSL commit 103b171d8fc282ef435f8de9afbf7782e312961f and BoringSSL commit 44e2709cd65fbd2172b9516c79e56f1875f60300. Our patch matches BoringSSL's commit. OpenSSL returns 0 when the queue is full or when malloc() or pitem_new() fails. They return -1 on error including !ssl3_setup_buffers() which is another failure to allocate memory. BoringSSL and LibreSSL changed the return code for dtls1_buffer_record() to be 1 on success, 0 when the queue is full and -1 on error. input + ok bcook@, jsing@
2015-01-20Reduce use of <sys/param.h> and transition to <limits.h> throughout.Theo de Raadt
ok djm markus
2015-01-20use SUBDIR to recuse into unit tests; makes "make obj" actuallyDamien Miller
work
2015-01-20tweak previous; ok schwarzeJason McIntyre
2015-01-20Document how to send syslog messages over TCP or TLS.Alexander Bluhm
OK jmc@
2015-01-20increase TMP_MAX to the equivalent of INT_MAX. it's actually more,Ted Unangst
but safer not to wraparound by accident. ok deraadt millert miod
2015-01-20tweak previous;Jason McIntyre
2015-01-20Split the -Werror message level into -Werror (broken manual, probablyIngo Schwarze
using mandoc is better than using groff) and -Wunsupp (manual using unsupported low-level roff(7) feature, probably using groff is better than using mandoc). Once this feature is complete, it is intended to help porting, making the decision whether to USE_GROFF easier. As a first step, distinguish four classes of roff(7) requests: 1. Supported (currently 24 requests) 2. Currently ignored because unimportant (120) -> no message 3. Ignored for good because insecure (14) -> -Werror 4. Currently unsupported (68) -> these trigger the new -Wunsupp messages
2015-01-20i wrote thisTed Unangst
2015-01-20kex_setup errors are fatal()Markus Friedl
2015-01-20If _dl_progname exceeds half the syslog buffer, truncate it with "...",Theo de Raadt
so that the remaining information is more visible ok kettenis miod
2015-01-20Move ps_strings "after" the random stackgap. This makes its location aMark Kettenis
per-process value, and therefpore turns the VM_PSSTRINGS sysctl into a per-process one as well. This gets rid of a pointer to the bottom of the stack at a fixed location. Also clears the road for unmapping the stackgap. ok deraadt@
2015-01-20one more "center"; tedu forgot to use -i, i think...Jason McIntyre
2015-01-20tweak previous;Jason McIntyre
2015-01-20Do not use /usr/ports/infrastructure/man/ by default because thisIngo Schwarze
directory is not contained in OpenBSD base, and because even people having the directory often don't understand that they need to run makewhatis(8) - and instead complain about the resulting warnings. This commit reverts revisions 1.17 and 1.21. Requested by deraadt@ millert@ kettenis@ who argue that people using /usr/ports/infrastructure/bin/ already need to set PATH, so editing man.conf (or, though more fragile, setting MANPATH) should not be a big deal for them.
2015-01-20change spelling of centre to center. consistent with other man pages,Ted Unangst
the name of the macro being described, and look(1). ok jmc
2015-01-20HOST_NAME_MAX + 1 is big enough for gethostname(3); this array hasFlorian Obser
been one char too big when it was defined in terms of MAXHOSTNAMELEN. While here, NI_MAXHOST is big enough for getnameinfo(3). OK benno@
2015-01-20Merge two copies of the (almost) identical bus space code into one file.Martin Pieuchot
This brings bus_space_mmap(9) to socppc and change its bus_space_map(9) implementation to use kernel_map instead of phys_map like macppc and everybody else.
2015-01-20Adjust <sys/param.h> comments regarding use of use of MSIZE, orTheo de Raadt
delete <sys/param.h> if now possible ok guenther
2015-01-20Adjust <sys/param.h> comments regarding use of use of MAXFRAG, orTheo de Raadt
delete <sys/param.h> if now possible ok guenther
2015-01-20Make the man(1) and apropos(1) options -s and -S much less expensive:Ingo Schwarze
Do not append an SQL clause looking into the large "keys" table. Instead, filter the result of the SQL query in buildnames() where equivalent data from the much smaller "mlinks" table is already available for free. This is relevant because man(1) uses the equivalent of "-S ${MACHINE}" by default since main.c rev. 1.122, to make sure that manuals for the current architecture are shown. With many ports installed, this patch can speed up man(1) by a factor of more than a hundred. Slowness reported by Theo Buehler <theo at math dot ethz dot ch>, thanks!
2015-01-20FSHIFT does not need to go to userland, so convert it to _FSHIFT.Theo de Raadt
FSCALE still needs to be exported .. unless someone fixes a few ports that need it. ok guenther, tested by sthen
2015-01-20Nothing in this file requires <sys/queue.h>. While here remove old andMartin Pieuchot
unused typedef & external definitions.
2015-01-20Years ago, MSIZE had to be known in <sys/param.h> probably to allocateTheo de Raadt
memory for the mbuf layer up front. These days it only matters for sizing of macros in <sys/mbuf.h>, so move it there. MCLSHIFT, MCLBYTES, and MCLOFSET can move also (a decade ago, architectures had different mbuf sizes. you don't want to know more) ok guenther, ports fallout checked for by sthen
2015-01-20Do not assume a read buffer coming from libevent is aligned. Copy theTheo de Raadt
int to an aligned variable before operating on it. ok claudio
2015-01-20MAXFRAG was always placed incorrectly in <sys/param.h> It is primarilyTheo de Raadt
used in disklabel type tools, newfs, fsck, when related to ufs or ufs-derived filesystems, but also in a struct. Those things always include <ufs/ffs/fs.h>. Move it there ok guenther, tested in ports by sthen
2015-01-20CMASK was only a CSRGism. It was only used in the kernel and ftpd, onceTheo de Raadt
each, never in portable software. Mop it up. ok guenther, tested in ports tree by sthen
2015-01-20use <limits.h> comprehensively. For now try to push <> includes toTheo de Raadt
each .c file, and out of the .h files. To avoid overinclude. ok gilles, in principle. If this has been done right, -portable should become easier to maintain.
2015-01-20Prevent tables referenced by rules in anchors from getting disabled.Mike Belopuhov
Analysis and patch by Richard Kojedzinszky, thanks! ok henning
2015-01-20Rewrite to void using union sockaddr_unionTheo de Raadt
ok mikeb
2015-01-20Merge two copies of the same dma code into one file and sync the headers.Martin Pieuchot
ok kettenis@
2015-01-20Various cleanups. Explicitly include <sys/atomic.h>, Use pmap_remove_pg()Martin Pieuchot
for the kernel pmap and kill pmap_kremove_pg(). Finally guard the hash lock code under "MULTIPROCESSOR" to explicit which part of the code received some MP love. ok kettenis@
2015-01-20Add support for the "-r fromaddr" flag now that we don't supportTodd C. Miller
sendmail flags on the command line. Also allow "from" to be set in mailrc. Use sendmail's "-t" flag when executing sendmail instead of specifying the list of recipients in argv. The "-f" flag will be used to set the from address if specified.
2015-01-20Allocate a bit more memory to reduce the change of having toTodd C. Miller
realloc() which is expensive for large blacklists.
2015-01-20increase limits for staff (user created at install time is in staff)Theo de Raadt
2015-01-20Revert some $OpenBSD$ additions about which there are doubts.Kenneth R Westerback
Suggested by deraadt@
2015-01-20Revert some $OpenBSD$ additions about which there are doubts.Kenneth R Westerback
Suggested by deraadt@
2015-01-20Revert some $OpenBSD$ additions about which there are doubts.Kenneth R Westerback
Suggested by deraadt@
2015-01-20Make ix(4) work on strict alignment architectures. The Intel networkingMark Kettenis
hardware is fairly retarded. While it allows receive buffers with an ETHER_ALIGN offset, it only allows the size of the buffers to be specified in multiples of 1K. This means that if we want to use standard mbuf clusters we will waste 1024 - ETHER_ALIGN bytes per cluster, which is a lot for the 2K clusters we use now. Compromise a bit by using 4K clusters on strict alignment architectures and tell the hardware to use 3K of those, reducing the spillage a bit. While this isn't optimal, at least on sparc64 where we have 8K pages, the pool page allocation overhead should be the same as on amd64/i386 where we have 4K pages and continue to use 2K mbuf clusters. ok mikeb@, dlg@
2015-01-20We do not support AIO, so comment it out in the kqueue(2) manpage for now.Reyk Floeter
OK jmc@ guenther@
2015-01-20typo in comment ;) ok nicmStuart Henderson
2015-01-20Check for out-of-range indices when searching the default dac and adc.Alexandre Ratchov
Fix from Alexey Suslikov <alexey.suslikov at gmail.com>. Thanks! tested by many, ok armani
2015-01-20Split out from rdist/defs.h the client-only and server-only bits intoPhilip Guenther
rdist/client.h and rdistd/server.h Only put #includes in .h files that are necessary for the .h to be used; all other #includes go in the .c files Move all extern variable declarations to the .h files, renaming local variables to avoid shadowing Replace me_type member of mntent_t with an "is NFS?" flag bit