openbsd
9 years agoIntroduce msgtypenames to print bgp msg types (which will be used by bgpctl)
claudio [Sat, 24 Oct 2015 08:06:45 +0000 (08:06 +0000)]
Introduce msgtypenames to print bgp msg types (which will be used by bgpctl)

9 years agoIn all other cases of rde_filter_match() we ensure that asp is valid so
claudio [Sat, 24 Oct 2015 08:02:24 +0000 (08:02 +0000)]
In all other cases of rde_filter_match() we ensure that asp is valid so
do it here as well.

9 years agoseg_type is only set but never used. So remove it. Someone reported this
claudio [Sat, 24 Oct 2015 08:00:42 +0000 (08:00 +0000)]
seg_type is only set but never used. So remove it. Someone reported this
long time ago.

9 years agosync
deraadt [Sat, 24 Oct 2015 07:05:50 +0000 (07:05 +0000)]
sync

9 years agoCast isxdigit()'s argument to unsigned char.
mmcc [Sat, 24 Oct 2015 06:07:43 +0000 (06:07 +0000)]
Cast isxdigit()'s argument to unsigned char.

ok guenther@

9 years agoMake use of hardware RX checksum validation.
visa [Sat, 24 Oct 2015 05:35:42 +0000 (05:35 +0000)]
Make use of hardware RX checksum validation.

ok naddy@

9 years agoCast ctype function arguments to unsigned char.
mmcc [Sat, 24 Oct 2015 05:26:00 +0000 (05:26 +0000)]
Cast ctype function arguments to unsigned char.

ok guenther@

9 years agolookup tap devices in tapkqfilter, not tun devices.
dlg [Sat, 24 Oct 2015 04:12:24 +0000 (04:12 +0000)]
lookup tap devices in tapkqfilter, not tun devices.

libevent likes this more.

9 years agoPasting mouse escape sequences is unlikely, so skip them when working
nicm [Fri, 23 Oct 2015 23:46:36 +0000 (23:46 +0000)]
Pasting mouse escape sequences is unlikely, so skip them when working
out whether the user is pasting.

9 years agoypcipher isn't supported any more - it was already removed from login.conf(5)
sthen [Fri, 23 Oct 2015 22:55:49 +0000 (22:55 +0000)]
ypcipher isn't supported any more - it was already removed from login.conf(5)
and pwd_gensalt.c - so remove it from the default /etc/login.conf files as well.
ok millert@

9 years agoTest syslogd with empty or non existing server certificates and
bluhm [Fri, 23 Oct 2015 22:50:09 +0000 (22:50 +0000)]
Test syslogd with empty or non existing server certificates and
keys.

9 years agoFix a couple of issues in Russian calendar entries:
zhuk [Fri, 23 Oct 2015 19:56:10 +0000 (19:56 +0000)]
Fix a couple of issues in Russian calendar entries:

  * Fix #ifndef safeguards (rename/add where missing);
  * Use consistent spelling for year when it's mentioned in day desc;
  * Tweak some wrong casing cases;
  * Remove calendar.msk since Moscow doesn't have summer time anymore,
    and that was the only thing this file was about;
  * A few other corrections.

Some corrections from Mikhail on tech@, thanks!
Small fix & okay from mikeb@.

9 years agoCast isdigit() argument to unsigned char.
mmcc [Fri, 23 Oct 2015 18:50:54 +0000 (18:50 +0000)]
Cast isdigit() argument to unsigned char.

9 years agoVerify that opened message catalog is valid, i.e. avoid integer overflows
tobias [Fri, 23 Oct 2015 18:49:07 +0000 (18:49 +0000)]
Verify that opened message catalog is valid, i.e. avoid integer overflows
and out of boundary accesses.

with input by miod, ok stsp

9 years agoCast ctype functions' arguments to unsigned char.
mmcc [Fri, 23 Oct 2015 18:47:21 +0000 (18:47 +0000)]
Cast ctype functions' arguments to unsigned char.

9 years agoCast isspace() argument to unsigned char.
mmcc [Fri, 23 Oct 2015 18:44:15 +0000 (18:44 +0000)]
Cast isspace() argument to unsigned char.

9 years agoremove some more ifdef maziness
tedu [Fri, 23 Oct 2015 18:42:55 +0000 (18:42 +0000)]
remove some more ifdef maziness

9 years agoFix renaming in the root directory by correctly setting directory
krw [Fri, 23 Oct 2015 18:04:37 +0000 (18:04 +0000)]
Fix renaming in the root directory by correctly setting directory
offset.

From Serguey Parkhomovsky via bugs@, in response to problem report
from matthieu@. Same fix is in NetBSD for one.

ok tedu@

9 years agoRemove three strange and unused preproc defines. Submitted by Ilya
mmcc [Fri, 23 Oct 2015 17:22:43 +0000 (17:22 +0000)]
Remove three strange and unused preproc defines. Submitted by Ilya
Kaliman.

ok nicm@

9 years agoFix printf() types so kernel compiles with or w/o MSDOSFS_DEBUG.
krw [Fri, 23 Oct 2015 17:21:34 +0000 (17:21 +0000)]
Fix printf() types so kernel compiles with or w/o MSDOSFS_DEBUG.
e.g. print pointers with %p instead of %08x. No changes outside of
MSDOSFS_DEBUG.

9 years agoFrom jmc@ "the exclusive open propery" does not make sense. Try with 'an'.
claudio [Fri, 23 Oct 2015 16:45:51 +0000 (16:45 +0000)]
From jmc@ "the exclusive open propery" does not make sense. Try with 'an'.

9 years agoForgot to install the new tap.4 man page.
claudio [Fri, 23 Oct 2015 16:44:25 +0000 (16:44 +0000)]
Forgot to install the new tap.4 man page.

9 years agoRather than re-opening the driftfile to write, keep it open; rewinding
deraadt [Fri, 23 Oct 2015 16:39:13 +0000 (16:39 +0000)]
Rather than re-opening the driftfile to write, keep it open; rewinding
and coping with error conditions... that lets us avoid a pledge "wpath".

Putting it all together, this lets the master ntpd pledge "stdio rpath
inet settime proc id".  It works like this: "rpath" to load the
certificates, "proc" to create constraint processes, "id" to chroot
and lock the constraint processes into a jail, then "inet" to open a
https session.  "settime" is used by the master to manage the system
time when the ntp-speaking engine instructs the master.

with help from naddy

9 years agoRemove some unnecessary checks before free().
nicm [Fri, 23 Oct 2015 16:30:15 +0000 (16:30 +0000)]
Remove some unnecessary checks before free().

9 years agoIf $TMUX is set, and we are unsure about the session, use it.
nicm [Fri, 23 Oct 2015 16:29:07 +0000 (16:29 +0000)]
If $TMUX is set, and we are unsure about the session, use it.

9 years agoIf writing to a tty blocks, syslogd forked and tried to write again
bluhm [Fri, 23 Oct 2015 16:28:52 +0000 (16:28 +0000)]
If writing to a tty blocks, syslogd forked and tried to write again
in a background process.  A potential fork(2) at every message is
bad, so replace this with an event.  As a bonus the syslogd child
process does not need to pledge "proc" anymore.  Also limit the
number of delayed write events.
OK deraadt@

9 years agotmux can call pledge() in main with large set and then reduce it
nicm [Fri, 23 Oct 2015 16:07:29 +0000 (16:07 +0000)]
tmux can call pledge() in main with large set and then reduce it
slightly in the server to "stdio rpath wpath cpath fattr unix recvfd
proc exec tty ps".

9 years agoFormat for scroll position, from Jorge Morante.
nicm [Fri, 23 Oct 2015 16:02:21 +0000 (16:02 +0000)]
Format for scroll position, from Jorge Morante.

9 years agoAllow SIOCGIFINFO_IN6
deraadt [Fri, 23 Oct 2015 15:53:49 +0000 (15:53 +0000)]
Allow SIOCGIFINFO_IN6

9 years agoUse tty_term_flag not _has for XT, and make -2 force direct use of
nicm [Fri, 23 Oct 2015 15:52:54 +0000 (15:52 +0000)]
Use tty_term_flag not _has for XT, and make -2 force direct use of
256-colour escape sequences (so setaf/setab can be bypassed if needed).

9 years agodocument -h flag and add a .Xr
jung [Fri, 23 Oct 2015 15:48:16 +0000 (15:48 +0000)]
document -h flag and add a .Xr

ok sunil millert

9 years agondp -n -d <addr> does dns lookups, even with -n. it should not.
benno [Fri, 23 Oct 2015 15:47:54 +0000 (15:47 +0000)]
ndp -n -d <addr> does dns lookups, even with -n. it should not.
found through pledge. ok deraadt@

9 years agonetstart bits for tap(4)
claudio [Fri, 23 Oct 2015 15:22:49 +0000 (15:22 +0000)]
netstart bits for tap(4)

9 years agoSync (MAKEDEV addition of tap)
claudio [Fri, 23 Oct 2015 15:18:01 +0000 (15:18 +0000)]
Sync (MAKEDEV addition of tap)

9 years agoAdjust tun(4) and tap(4) after the split.
claudio [Fri, 23 Oct 2015 15:17:24 +0000 (15:17 +0000)]
Adjust tun(4) and tap(4) after the split.
Note: "pseudo-device tun" is used by both devices this is not a typo
OK dlg@ mpi@

9 years agoSync (after tap addition)
claudio [Fri, 23 Oct 2015 15:14:46 +0000 (15:14 +0000)]
Sync (after tap addition)

9 years agoMAKEDEV bits for tap(4)
claudio [Fri, 23 Oct 2015 15:14:11 +0000 (15:14 +0000)]
MAKEDEV bits for tap(4)
OK dlg@ mpi@

9 years agoAllocate a new major for tap(4) also note that pseudo-device tun is for tap
claudio [Fri, 23 Oct 2015 15:10:52 +0000 (15:10 +0000)]
Allocate a new major for tap(4) also note that pseudo-device tun is for tap
as well. OK dlg@ mpi@

9 years agoSplit up tun(4) into tun(4) & tap(4). Killing the link0 magic to switch
claudio [Fri, 23 Oct 2015 15:08:24 +0000 (15:08 +0000)]
Split up tun(4) into tun(4) & tap(4). Killing the link0 magic to switch
between modes. The two drivers still share most of the code but the mode
switcher is gone.
OK dlg@ mpi@

9 years agoroute has 3 code paths: monitor (listening on route socket); show
deraadt [Fri, 23 Oct 2015 15:03:25 +0000 (15:03 +0000)]
route has 3 code paths: monitor (listening on route socket); show
(sysctl and then print), change (getsocket, then read/write on that).
Refactor lightly and insert pledge "stdio rpath dns" in each case.
ok claudio benno phessler

9 years agoAllowing upstream servers of ntp being in multiple routing tables is
phessler [Fri, 23 Oct 2015 14:52:20 +0000 (14:52 +0000)]
Allowing upstream servers of ntp being in multiple routing tables is
non-sensical.  The dns lookups happened in the process routing table
(usually '0'), which is very likely to have different results from the
other routing domains.  If you do depend on having this behaviour,
you'll need to use pf to cross the rtable boundary.

"listen on * rtable X" is still supported.

Users of "server * rtable X" will need to switch to launching ntpd with
"route -T X exec /usr/sbin/ntpd"

OK deraadt@

9 years agortfree(9) and rtalloc(9) no longer need to be called under KERNEL_LOCK.
mpi [Fri, 23 Oct 2015 14:49:36 +0000 (14:49 +0000)]
rtfree(9) and rtalloc(9) no longer need to be called under KERNEL_LOCK.

9 years agoapply bold and italic to all non-ASCII Unicode codepoints,
schwarze [Fri, 23 Oct 2015 14:49:13 +0000 (14:49 +0000)]
apply bold and italic to all non-ASCII Unicode codepoints,
fixing input like \fB\('e; issue reported by bentley@

9 years agoUpdate route entries reference counters atomically.
mpi [Fri, 23 Oct 2015 14:48:22 +0000 (14:48 +0000)]
Update route entries reference counters atomically.

This allows us to only grab the KERNEL_LOCK when the last reference
of an entry has been dropped.

For symmetry also grab the KERNEL_LOCK inside rtalloc(9).

ok dlg@, bluhm@

9 years agodon't need MMAP to compile now
tedu [Fri, 23 Oct 2015 14:17:24 +0000 (14:17 +0000)]
don't need MMAP to compile now

9 years agocorrect spelling of statistic in function name, from Pablo Hernandez
tedu [Fri, 23 Oct 2015 14:16:02 +0000 (14:16 +0000)]
correct spelling of statistic in function name, from Pablo Hernandez

9 years agoCheck that syslogd delays a blocking write to tty and that that all
bluhm [Fri, 23 Oct 2015 14:06:55 +0000 (14:06 +0000)]
Check that syslogd delays a blocking write to tty and that that all
messages still appear on the tty.

9 years agoIt was possible to create a gateway route pointing to another gateway
bluhm [Fri, 23 Oct 2015 13:41:41 +0000 (13:41 +0000)]
It was possible to create a gateway route pointing to another gateway
route by changing the gateway.  Despite the error message when doing
so, the route did actually change.  The gateway is modified by
rt_setgate(), the error is created by rt_getifa().  Do these
operations the other way around.
OK mpi@

9 years ago``rt_ifp'' cannot be NULL.
mpi [Fri, 23 Oct 2015 13:26:07 +0000 (13:26 +0000)]
``rt_ifp'' cannot be NULL.

ok claudio@

9 years agogetnameinfo() no longer needs pledge "route". this drops to
deraadt [Fri, 23 Oct 2015 13:21:10 +0000 (13:21 +0000)]
getnameinfo() no longer needs pledge "route".  this drops to
pledge "stdio rpath".

9 years agoSwitch if_nameindex(3) to use the new NET_RT_IFNAMES sysctl to get the
claudio [Fri, 23 Oct 2015 13:09:19 +0000 (13:09 +0000)]
Switch if_nameindex(3) to use the new NET_RT_IFNAMES sysctl to get the
list of interface names. At the same time switch if_nametoindex(3) and
if_indextoname(3) to use if_nameindex(3) instead of getifaddrs(3).
if_nameindex(3) exposes much less then getifaddrs(3) and is allowed by
pledge(2).
With and OK deraadt@

9 years agoAdd ifnameindex to te libc regress tests
claudio [Fri, 23 Oct 2015 12:59:12 +0000 (12:59 +0000)]
Add ifnameindex to te libc regress tests

9 years agodelete ) that jumped in
deraadt [Fri, 23 Oct 2015 12:36:23 +0000 (12:36 +0000)]
delete ) that jumped in

9 years agolet the icmp check use getsockopt IP_IPDEFTTL to get the default ttl
benno [Fri, 23 Oct 2015 12:22:02 +0000 (12:22 +0000)]
let the icmp check use getsockopt IP_IPDEFTTL to get the default ttl
instead of using sysctl. makes it possible to pledge hce.

9 years agoA bit of whitespace cleanup, to make further diffs smaller.
zhuk [Fri, 23 Oct 2015 11:43:16 +0000 (11:43 +0000)]
A bit of whitespace cleanup, to make further diffs smaller.

9 years agoFix BODUN handling after switch to UTF-8.
zhuk [Fri, 23 Oct 2015 11:01:30 +0000 (11:01 +0000)]
Fix BODUN handling after switch to UTF-8.

Still wondering if this functionality should be removed, but I'll leave
the decision to those who drink alcohol.

Input from & okay tedu@.

9 years agoNuke a bunch of leading/embedded/trailing whitespace so the code can be
krw [Fri, 23 Oct 2015 10:45:31 +0000 (10:45 +0000)]
Nuke a bunch of leading/embedded/trailing whitespace so the code can be
read without generating spurious headaches.

9 years agoforgot to commit makefile change for utf-8 calendars
tedu [Fri, 23 Oct 2015 10:33:52 +0000 (10:33 +0000)]
forgot to commit makefile change for utf-8 calendars

9 years agoIntroduce a new sysctl NET_RT_IFNAMES that returns only ifnames to ifindex
claudio [Fri, 23 Oct 2015 10:22:29 +0000 (10:22 +0000)]
Introduce a new sysctl NET_RT_IFNAMES that returns only ifnames to ifindex
mappings. This will be used by if_nameindex(3), if_nametoindex(3) and
if_indextoname(3) soon to fix the issues in pledge because of inet6 link
local addressing.
OK mpi@ benno@ deraadt@
The libc version will follow soon so better start updating your kernels

9 years agoMake use of pledge(2).
renato [Fri, 23 Oct 2015 10:11:20 +0000 (10:11 +0000)]
Make use of pledge(2).

ok deraadt@

9 years agoAdd pledge(2) to the child processes.
renato [Fri, 23 Oct 2015 10:10:17 +0000 (10:10 +0000)]
Add pledge(2) to the child processes.

This is almost identical to the eigrpd(8) pledge diff, with the exception
that the parent process can not be pledged bacause of a SIOCSETMPWCFG
ioctl used to configure pseudowires.

Looks good to deraadt@.

9 years agoZap pv allocation abstraction layer.
kettenis [Fri, 23 Oct 2015 09:36:09 +0000 (09:36 +0000)]
Zap pv allocation abstraction layer.

ok mlarkin@

9 years agoi assume this file needs a LANG like all the rest
tedu [Fri, 23 Oct 2015 09:35:52 +0000 (09:35 +0000)]
i assume this file needs a LANG like all the rest

9 years agotranslate calendar files to utf-8
tedu [Fri, 23 Oct 2015 09:32:14 +0000 (09:32 +0000)]
translate calendar files to utf-8

9 years agopush LDSTATIC line down so it's not overridden by makefile.inc. ok reyk
tedu [Fri, 23 Oct 2015 09:13:00 +0000 (09:13 +0000)]
push LDSTATIC line down so it's not overridden by makefile.inc. ok reyk

9 years agoFix uvm_object reference counting. While these reference counts aren't reaaly
kettenis [Fri, 23 Oct 2015 08:21:58 +0000 (08:21 +0000)]
Fix uvm_object reference counting.  While these reference counts aren't reaaly
used (ttm bo's have their own reference counts), we can't let the reference
count go negative as this will freak out the upper uvm layers.  Since the
uvm_object reference count is still a useful debugging tool (ddb will display
it for example), adjust it such that the uvm_object reference count represents
the number of references held by the uvm layer.

tested by matthieu@
ok jsg@

9 years agosimplify argv back compat
tedu [Fri, 23 Oct 2015 08:21:27 +0000 (08:21 +0000)]
simplify argv back compat

9 years agofurther simplify argv
tedu [Fri, 23 Oct 2015 08:18:57 +0000 (08:18 +0000)]
further simplify argv

9 years agocleanup argv handling a bit
tedu [Fri, 23 Oct 2015 08:18:30 +0000 (08:18 +0000)]
cleanup argv handling a bit

9 years agosimplify backcompat. no more support for kernel or kmem on argv
tedu [Fri, 23 Oct 2015 08:03:48 +0000 (08:03 +0000)]
simplify backcompat. no more support for kernel or kmem on argv

9 years agoundent includes, from michael reed
tedu [Fri, 23 Oct 2015 08:02:13 +0000 (08:02 +0000)]
undent includes, from michael reed

9 years agommap is the default. it's effectively the only tested codepath. so burn down
tedu [Fri, 23 Oct 2015 07:57:03 +0000 (07:57 +0000)]
mmap is the default. it's effectively the only tested codepath. so burn down
the stdio code path.
pros: everything is simpler. how can anyone read code this heavily spliced
with ifdef?
cons: you can't pipe a database into locate. who does this???
ok deraadt

9 years agoadd BUILDINFO file. currently contains a timestamp. ok deraadt
tedu [Fri, 23 Oct 2015 06:42:53 +0000 (06:42 +0000)]
add BUILDINFO file. currently contains a timestamp. ok deraadt

9 years agosync
deraadt [Fri, 23 Oct 2015 06:22:28 +0000 (06:22 +0000)]
sync

9 years agoenable viornd on RAMDISK_CD
mlarkin [Fri, 23 Oct 2015 05:35:49 +0000 (05:35 +0000)]
enable viornd on RAMDISK_CD

ok kettenis@, deraadt@

9 years agoInitial pledge of netcat - unfortunately flawed because fiddling the rtableid
beck [Fri, 23 Oct 2015 05:27:17 +0000 (05:27 +0000)]
Initial pledge of netcat - unfortunately flawed because fiddling the rtableid
in a socket option can be pretty scary and there is no better interface for this.
so if the -V option is used you get no pledge at all.. Otherwise, do what
works for the various options.  Still needs refinement for tls to drop rpath,
and a better solution for the routing table stuff

9 years agoFix waitpid() loop again: do the errno check only if waitpid() returns -1
guenther [Fri, 23 Oct 2015 04:52:21 +0000 (04:52 +0000)]
Fix waitpid() loop again: do the errno check only if waitpid() returns -1
and check WIFEXITED() only if it returns != -1.  Delete the logging of
errors other than ECHILD: EFAULT and EINVAL are impossible here.

ok deraadt@ millert@

9 years agoUse waitpid() instead of wait() to avoid returning early from another child
guenther [Fri, 23 Oct 2015 04:45:32 +0000 (04:45 +0000)]
Use waitpid() instead of wait() to avoid returning early from another child
exiting, and loop the waitpid() on EINTR

ok deraadt@ millert@

9 years agoLoop the waitpid() on EINTR, and save and restore the disposition of
guenther [Fri, 23 Oct 2015 04:44:41 +0000 (04:44 +0000)]
Loop the waitpid() on EINTR, and save and restore the disposition of
SIGINT and SIGQUIT with sigaction() instead of signal() so that all bits
are preserved.

ok deraadt@ millert@

9 years agoMerge the sigaction() and sigprocmask() overloads/wrappers from libpthread
guenther [Fri, 23 Oct 2015 04:39:24 +0000 (04:39 +0000)]
Merge the sigaction() and sigprocmask() overloads/wrappers from libpthread
into libc, and move pthread_sigmask() as well (just a trivial wrapper).
This provides consistent handling of SIGTHR between single- and multi-threaded
programs and is a step in the merge of all the libpthread overloads, providing
some ASM and Makefile bits that the other wrappers will need.

ok deraadt@ millert@

9 years agopledge "stdio rpath getpw proc exec id" at start, much like doas.
deraadt [Fri, 23 Oct 2015 03:44:59 +0000 (03:44 +0000)]
pledge "stdio rpath getpw proc exec id" at start, much like doas.
2 further pledges are possible, not as many as doas can do, because the
order of some su operations is a bit different.  also it is trying
harder to please non-root nfs mounts?

9 years agoWith new pledge "ps" and "vminfo" requests, ps/top/w become possible.
deraadt [Fri, 23 Oct 2015 03:26:24 +0000 (03:26 +0000)]
With new pledge "ps" and "vminfo" requests, ps/top/w become possible.

9 years agothere's an extra argument to soreceive now.
dlg [Fri, 23 Oct 2015 03:16:19 +0000 (03:16 +0000)]
there's an extra argument to soreceive now.

found by teary students.

9 years agopass the right sizes to free.
dlg [Fri, 23 Oct 2015 02:29:24 +0000 (02:29 +0000)]
pass the right sizes to free.

9 years agoUpdate expected group sizes to match recent code changes.
dtucker [Fri, 23 Oct 2015 02:22:01 +0000 (02:22 +0000)]
Update expected group sizes to match recent code changes.

9 years agoinline the hfsc_active TAILQ.
dlg [Fri, 23 Oct 2015 02:08:37 +0000 (02:08 +0000)]
inline the hfsc_active TAILQ.

make cl_actc in hfsc_class a TAILQ rather than a pointer to a TAILQ
that gets allocated seaprately.

9 years agoinclude err.h for err() calls added with recent pledge commits.
jsg [Fri, 23 Oct 2015 02:01:15 +0000 (02:01 +0000)]
include err.h for err() calls added with recent pledge commits.

9 years agoinline the hif_eligible TAILQ.
dlg [Fri, 23 Oct 2015 01:53:02 +0000 (01:53 +0000)]
inline the hif_eligible TAILQ.

make hif_eligible in hfsc_if a TAILQ rather than a pointer to a
TAILQ that gets allocated separately.

"look ma, i saved 4 or 8 bytes"

9 years agoRemove two comments listing functionless files. Trivial, no functional
mmcc [Fri, 23 Oct 2015 01:33:36 +0000 (01:33 +0000)]
Remove two comments listing functionless files. Trivial, no functional
change.

9 years agocounting packets in hif_packets in hfsc_if is redundant.
dlg [Fri, 23 Oct 2015 01:32:10 +0000 (01:32 +0000)]
counting packets in hif_packets in hfsc_if is redundant.

the ifqueue struct has the same information, and hif_packets is never
read separately. trim it.

9 years agotweak the vnetid so it can be optional and therefore cleared/deleted.
dlg [Fri, 23 Oct 2015 01:19:04 +0000 (01:19 +0000)]
tweak the vnetid so it can be optional and therefore cleared/deleted.

the abstract vnetid is promoted to a uin32_t, and adds a SIOCDVNETID
ioctl so it can be cleared.

this is all because i set an assignment on implementing a virtual
network interface and the students got confused when vnetid 0 didnt
show up in ifconfig output.

the vnetid in the vxlan(4) protocol is optional, but the current
code confuses 0 with no vnetid being set. this makes it clear.

ok reyk@ who also simplified my diff

9 years agoproto.h contains many function prototypes. It's apparently separate from
mmcc [Fri, 23 Oct 2015 01:14:07 +0000 (01:14 +0000)]
proto.h contains many function prototypes. It's apparently separate from
sh.h because the pdksh devs used a prototype generator (last run in
1992). Merging it into sh.h makes things clearer.

ok nicm@

9 years agoAdd 3 new pledge requests. "ps" exposes enough sysctl information for
deraadt [Fri, 23 Oct 2015 01:10:01 +0000 (01:10 +0000)]
Add 3 new pledge requests.  "ps" exposes enough sysctl information for
ps-style programs (there are quite a few in the tree, including tmux).
"vminfo" exposes a bit more system operation information, which many
observation programs want (such as top).  settime allows setting the system
time, and will be used to pledge-protect the last ntpd process.

9 years agoremove the pointer from hfsc_class structs back to hfsc_if.
dlg [Fri, 23 Oct 2015 01:02:46 +0000 (01:02 +0000)]
remove the pointer from hfsc_class structs back to hfsc_if.

you get to hfsc_class via a hfsc_if, so just pass the hfsc_if around
on the stack when we need it rather than following the pointer back.

most of this change is passing the hif on the stack.

ok mpi@ henning@

9 years agocorrect precedence; from Ilya Kaliman
deraadt [Fri, 23 Oct 2015 01:00:16 +0000 (01:00 +0000)]
correct precedence; from Ilya Kaliman

9 years agoAllow hw.ncpu sysctl (a few reasons showed up in my mailbox rapidly..)
deraadt [Fri, 23 Oct 2015 00:56:52 +0000 (00:56 +0000)]
Allow hw.ncpu sysctl (a few reasons showed up in my mailbox rapidly..)

9 years agocrank libc major
deraadt [Fri, 23 Oct 2015 00:53:13 +0000 (00:53 +0000)]
crank libc major

9 years agoRemove dnssocket() and dnsconnect(), since we decided to use a SOCK_DNS
deraadt [Fri, 23 Oct 2015 00:52:49 +0000 (00:52 +0000)]
Remove dnssocket() and dnsconnect(), since we decided to use a SOCK_DNS
flag instead.
ok guenther tedu semarie

9 years agoSwitch to using SOCK_DNS flag, rather than the dnssocket() and
deraadt [Fri, 23 Oct 2015 00:52:09 +0000 (00:52 +0000)]
Switch to using SOCK_DNS flag, rather than the dnssocket() and
dnssonnect() calls.  Be a bit careful crossing over this, need a kernel
no older than Monday.
ok guenther tedu semarie

9 years agoreplace pointer arithmetic and casts with offsetof
jsg [Fri, 23 Oct 2015 00:15:07 +0000 (00:15 +0000)]
replace pointer arithmetic and casts with offsetof
ok mpi@ bluhm@