null character outside of the byte region [sbuf, sbuf + len).
1) If the length of the buffer is 0, do not write a null character
at all. Previously, sockaddr_snprintf() may have been able to
overwrite sbuf[-1] if len was 0.
2) If the length of the buffer, len, is greater than 0, then write
the null at sbuf[len - 1]. Previously, sockaddr_snprintf()
wrote the null at buf[len - 1], where `buf' was a "cursor" that
did not necessarily equal `sbuf', the start of the buffer. Now,
sockaddr_snprintf() always writes the null at sbuf[len - 1].
Enabled via per_user_tmp in /etc/rc.conf (default off).
See security(8) and rc.conf(5) for more details.
Lots of input from thorpej@ & christos@, thanks!
bin/ls sources to libutil:
o Bump libutil minor version number
o Fix uses to include <util.h> to pick up the function definitions
o Fix most uses of flags_to_string() to release the now-malloc()ed result
- Add default cases and return EINVAL
- Don't check for NULL arguments and return EFAULT. Let it core-dump instead.
(or add DIAGASSERT)
- Coverity CID 799: Don't dereference m and n if they are known to be NULL.
Bail out sooner with EINVAL.
values for the various character classes to allow any number, just in
case. Also note about that in the man-page.
This makes it easier to use the "nclasses" option.
Note that alternatively we could just memset() to 0xff when doing the
load, but that might lead to more unexpected behavior.
Improve the pw_policy(3) API by splitting it to two functions, one to load
the policy from /etc/passwd.conf and another to test passwords against the
policy.
Some bug fixes, more consistent code, and man-page updates.
Minor for libutil bumped.