Date: Fri, 18 Dec 2020 12:24:33 +0000 (UTC) From: Eugene Grosbein <eugen@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r368759 - stable/11/sbin/hastd Message-ID: <202012181224.0BICOX4j004947@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: eugen Date: Fri Dec 18 12:24:33 2020 New Revision: 368759 URL: https://svnweb.freebsd.org/changeset/base/368759 Log: MFC r368148: fix hastd(8) hastd(8) assumes it has no extra file descriptors opened and aborts otherwise, so call closefrom() early. PR: 227461 Modified: stable/11/sbin/hastd/hastd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sbin/hastd/hastd.c ============================================================================== --- stable/11/sbin/hastd/hastd.c Fri Dec 18 12:20:29 2020 (r368758) +++ stable/11/sbin/hastd/hastd.c Fri Dec 18 12:24:33 2020 (r368759) @@ -1222,6 +1222,7 @@ main(int argc, char *argv[]) pjdlog_init(PJDLOG_MODE_STD); pjdlog_debug_set(debuglevel); + closefrom(MAX(MAX(STDIN_FILENO, STDOUT_FILENO), STDERR_FILENO) + 1); g_gate_load(); /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202012181224.0BICOX4j004947>