]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
inetd: fix unix sockaddr's length assignment
authorKyle Evans <kevans@FreeBSD.org>
Fri, 12 Feb 2021 19:19:43 +0000 (13:19 -0600)
committerKyle Evans <kevans@FreeBSD.org>
Tue, 16 Feb 2021 02:25:06 +0000 (20:25 -0600)
commit5ab679d9619afe8242200bdb4f0391b6fd405e25
treec12aef313eb320829e54e27ee4d91c683b4958cb
parentf39a12f04308b9be57890c9c434ce0f93ccdb058
inetd: fix unix sockaddr's length assignment

unsz was always exactly '1' here due to an unfortunate mispositioning
of closing parenthesis. While it's generally irrelevant because bind(2)
is passed the (accurate) sep->se_ctrladdr_size instead, it's not very
helpful for anything locally that wants to use it rather than assuming
that sep->se_ctrladdr_size perfectly fits the end of sun_path.

Just drop unsz entirely and use the result of SUN_LEN() for it.

(cherry picked from commit 1253835121cb38fd93478849e32a4a4c13436fb2)
usr.sbin/inetd/inetd.c