Hi Florian,
just for completeness-sake, I've retested with snapshot #337* Wed Feb 16
09:33:31 MST 2022 that just hit ftp.eu.openbsd.org and would like to confirm
that your change works as expected. No NULs around anymore, /etc/myname is
clean, smtpd is happy too.
big thanks again!
JV
*
On Tue, 15 Feb 2022 20:18:45 +0100, Florian Obser wrote:
> Also fixes a whitespace issue while here.
>
> if (dho_len < 1)
> goto wrong_length;
>
> is redundant now, but I want to keep the pattern of checking the length
> right after identifying the option.
Right, makes sense.
On 2022-02-15 12:07 -07, "Todd C. Miller" wrote:
> On Tue, 15 Feb 2022 20:01:52 +0100, Florian Obser wrote:
>
> I think you need that to be:
>
> /* MUST delete trailing NUL, per RFC 2132 */
> slen = dho_len;
> while (slen > 0 && p[slen - 1] == '\0')
> slen--;
>
>
On Tue, 15 Feb 2022 20:01:52 +0100, Florian Obser wrote:
I think you need that to be:
/* MUST delete trailing NUL, per RFC 2132 */
slen = dho_len;
while (slen > 0 && p[slen - 1] == '\0')
slen--;
to avoid underflow if the string happens to consist entirely
Jan reported that the microsoft dhcp server sends the domain name option
as a C string (i.e. NUL terminated) on-wire.
This then ends up in /var/db/dhcpleased/$IF as e.g.
domain-name: example.com\^@
which the installer uses to form /etc/myname which then later on smtpd
complains about.
I'm fresh