Ian Lepore 1eafc07856 Set the SBUF_INCLUDENUL flag in sbuf_new_for_sysctl() so that sysctl
strings returned to userland include the nulterm byte.

Some uses of sbuf_new_for_sysctl() write binary data rather than strings;
clear the SBUF_INCLUDENUL flag after calling sbuf_new_for_sysctl() in
those cases.  (Note that the sbuf code still automatically adds a nulterm
byte in sbuf_finish(), but since it's not included in the length it won't
get copied to userland along with the binary data.)

Remove explicit adding of a nulterm byte in a couple places now that it
gets done automatically by the sbuf drain code.

PR:		195668
2015-03-14 17:08:28 +00:00
..
2015-03-06 20:53:56 +00:00
2015-03-13 20:08:35 +00:00
2015-03-13 20:08:35 +00:00
2015-02-24 01:00:46 +00:00
2015-03-08 19:55:46 +00:00
2015-03-10 14:55:05 +00:00
2015-02-27 15:14:25 +00:00
2015-03-13 20:08:35 +00:00
2015-02-24 06:20:50 +00:00
2015-03-13 20:08:35 +00:00
2015-03-10 16:06:07 +00:00
2015-02-28 15:21:06 +00:00