Age | Commit message (Collapse) | Author |
|
internally when and where required. Macros in <stdio.h> are updated
to automatically call the underlying functions when the process is
threaded to obtain the necessary locking. A private mutex is added
to protect __sglue, the internal list of FILE handles, and another
to protect the one-time initialization. Some routines in libc that
use getc() change to use getc_unlocked() as they're either protected
by their own lock or aren't thread-safe routines anyway.
ok kurt@, earlier version tested by sthen@ and jj@
|
|
Okay deraadt@, otto@.
|
|
ecvt, fcvt, gcvt, *printf, strtof, strtod, strtold act per ieee
1003.1. after these massive changes, remove unused files which
would not work now. reported by Maksymilian Arciemowicz; ok theo
|
|
|
|
- queue packets from pf(4) to a userspace application
- reinject packets from the application into the kernel stack.
The divert socket can be bound to a special "divert port" and will
receive every packet diverted to that port by pf(4).
The pf syntax is pretty simple, e.g.:
pass on em0 inet proto tcp from any to any port 80 divert-packet port 1
A lot of discussion have happened since my last commit that resulted
in many changes and improvements.
I would *really* like to thank everyone who took part in the discussion
especially canacar@ who spotted out which are the limitations of this approach.
OpenBSD divert(4) is meant to be compatible with software running on
top of FreeBSD's divert sockets even though they are pretty different and will
become even more with time.
discusses with many, but mainly reyk@ canacar@ deraadt@ dlg@ claudio@ beck@
tested by reyk@ and myself
ok reyk@ claudio@ beck@
manpage help and ok by jmc@
|
|
|
|
needed for gcc -ftrampoline operation as well as by some third-party
software.
Although the implementation uses the sysarch() sysctl, the wrapper is
added to libc as it was a direct system call (which it is on IRIX).
|
|
Make the description of `b' a little better.
If you have a one-byte sequence, `w', `b' is the second
character. Not the third.
Submitted by: Christoph Mallon
checked by otto
|
|
|
|
Sorry.
|
|
- queue packets from pf(4) to a userspace application
- reinject packets from the application into the kernel stack.
The divert socket can be bound to a special "divert port" and will
receive every packet diverted to that port by pf(4).
The pf syntax is pretty simple, e.g.:
pass on em0 inet proto tcp from any to any port 80 divert-packet port 8000
test, bugfix and ok by reyk@
manpage help and ok by jmc@
no objections from many others.
|
|
specified in hint or hints is NULL.
claudio@ ok
|
|
just stop updating fts_level so we don't overflow it. This allows
rm, find, etc to operate on very deep hierarchies. Consumers of
fts(3) do need to be aware that the actual level may be larger
than fts_level. During the next libc major bump we will make
fts_level an int instead of a short. OK deraadt@
|
|
|
|
|
|
already pulled; so manually substitute protos ensuring they will
always be right; ok millert@
|
|
noticed by joao <salvatti at gmail dot com> on tech@;
feedback and ok kettenis@ deraadt@ and reminded by jmc@
|
|
to 2GB of vm space.
|
|
Adapted from FreeBSD. OK deraadt@
|
|
ok tedu@ deraadt@ krw@
|
|
fixing a regression introduced in rev. 1.16 spotted by otto@;
ok millert@ otto@
|
|
|
|
|
|
wording tweaked by jmc@
|
|
trying to allocate large blocks from bss memory pool in this case.
problem reported by Maksymilian Arciemowicz. ok otto@, millert@
|
|
|
|
to u_int32_t to do integer math with (in a situation where that is legit)
ok otto millert
|
|
If code is used from exactly one place, don't jump back dozens of lines to
reach it, only to "goto" back where you came from.
Instead, simply put the code where it belongs.
Also fixes a regression that crept in in rev. 1.30: After clearing the
variable __ypmode, don't try to make decisions based on its former value.
As a bonus, garbage collect the grname variable and the _ypmode enum type.
ok millert@
|
|
|
|
along with vnode type-specific info to make it more useful for fstat(1).
OK deraadt@
|
|
OK deraadt@
|
|
Thus, garbage collect one variable, one strdup, one free, two ifs,
one else and a couple of assignments. No functional change.
ok millert@
|
|
invalid data on the list, inviting later NULL pointer access.
noticed by deraadt@, algorithm proposed by millert, implemented by me;
feedback and ok millert@
|
|
noticed by and OK deraadt@, ok millert@
|
|
|
|
|
|
|
|
|
|
occurred". Based on this, decide to either bail or use the record as is.
Prevents getgrnam(3) and friends from silently skipping YP records
on system errors, for example when out of memory.
Also, calling yp_get_default_domain once is enough.
The first two switch cases are unchanged, just reindented.
ok millert@
|
|
ok millert@
|
|
map ECONNREFUSED -> YPERR_YPBIND, ENOMEM -> YPERR_RESRC, else YPERR_YPERR
while here, malloc(3) failure should raise YPERR_RESRC, not YPERR_YPERR
ok millert@
|
|
check whether YP is active up front, not half-way through the parsing.
This fixes the bug that group names starting with a dash (yuck!)
were skipped when YP was not active, introduced in rev. 1.27.
Besides, the code becomes easier to understand.
The code inside the two switch cases is unchanged, just reindented.
"looks good" millert@
|
|
so treat it similarly to a failing call to getdomainname.
ok millert@
|
|
ok millert
|
|
ok otto@
|
|
now doing.
ok deraadt@
|
|
bounds information, ie. the zone of the disk that OpenBSD can use. Have each
pre-disklabel parser (MBR, DPME, or per-arch MD disklabel parsers) figure out
this area and pass it up to userland. Then, delete all the same disk parsing
code from disklabel(8) since the kernel passes it up. Lots and lots of - signs
in the disklabel(8) code.
Tested on as many platforms as possible, the fallout will be repaired as time
goes on. To test, use disklabel -d <drive> and validate that the bounds do not
overlap any boot blocks. This same information is used by disklabel -A...
OK for the concept from krw, miod, and drahn
|
|
|
|
Someone may have passed a read-only string to putenv() (I'm looking
at you cron!).
|
|
PF_UNSPEC queries are made. While there change the default from inet6
first then inet4 to inet4 first then inet6, this prevents the many
people with IPv4 only connectivity from constantly trying to contact
IPv6 addresses, and also unbreaks many ports who don't use getaddrinfo
right.
ok deraadt@, plenty of cheering in the room wrt the idea, not loud
enough complaining from the v6 crowd.
|