mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-22 21:41:04 +01:00
Open syslog when logging sysconf(3) failure.
Reported by: Mikolaj Golub <to.my.trociny@gmail.com> MFC after: 1 week
This commit is contained in:
parent
38521fb9b4
commit
18d6e1a5f6
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=218373
@ -168,7 +168,11 @@ descriptors_assert(const struct hast_resource *res, int pjdlogmode)
|
||||
|
||||
maxfd = sysconf(_SC_OPEN_MAX);
|
||||
if (maxfd < 0) {
|
||||
pjdlog_init(pjdlogmode);
|
||||
pjdlog_prefix_set("[%s] (%s) ", res->hr_name,
|
||||
role2str(res->hr_role));
|
||||
pjdlog_errno(LOG_WARNING, "sysconf(_SC_OPEN_MAX) failed");
|
||||
pjdlog_fini();
|
||||
maxfd = 16384;
|
||||
}
|
||||
for (fd = 0; fd <= maxfd; fd++) {
|
||||
|
Loading…
Reference in New Issue
Block a user