summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorEugene Grosbein <eugen@FreeBSD.org>2020-11-29 13:45:53 +0000
committerEugene Grosbein <eugen@FreeBSD.org>2020-11-29 13:45:53 +0000
commit1c86e811967ca0f5736561c50999e470c0623bba (patch)
treecc3e1cc3cdb66b4ef07719557f1756c479e0fb84 /sbin
parentb712e3e343c1437d28c90e9da28e7339426ba8e2 (diff)
downloadsrc-test2-1c86e811967ca0f5736561c50999e470c0623bba.tar.gz
src-test2-1c86e811967ca0f5736561c50999e470c0623bba.zip
hastd(8) assumes it has no extra file descriptors opened
and aborts otherwise, so call closefrom() early. PR: 227461 MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=368148
Diffstat (limited to 'sbin')
-rw-r--r--sbin/hastd/hastd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sbin/hastd/hastd.c b/sbin/hastd/hastd.c
index 160dfef437e9..be58411b7ec7 100644
--- a/sbin/hastd/hastd.c
+++ b/sbin/hastd/hastd.c
@@ -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();
/*