Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Oct 2023 13:12:49 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 274454] usr.sbin/syslogd: closing a configured terminal in parse_action(), line 3057
Message-ID:  <bug-274454-227-MUPMdl87it@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-274454-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-274454-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D274454

--- Comment #9 from commit-hook@FreeBSD.org ---
A commit in branch main references this bug:

URL:
https://cgit.FreeBSD.org/src/commit/?id=3Dd556719e15d643ba9619bbbeab550eed8=
7614525

commit d556719e15d643ba9619bbbeab550eed87614525
Author:     Jake Freeland <jfree@FreeBSD.org>
AuthorDate: 2023-10-15 20:34:06 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2023-10-16 13:11:58 +0000

    syslogd: Keep console and tty descriptors open

    Console and tty descriptors are initially opened in parse_action() to
    determine whether they are valid using isatty(). That descriptor is then
    closed because it is never accessed by syslogd again; ttymsg() will reo=
pen
    the tty/console under a new descriptor when needed.

    If the user attempts to log to a tty that is inactive outside of
    syslogd, then syslogd must keep that descriptor open so the tty remains
    accessible. For example, logging to `/dev/ttyvb` requires the initial
    `/dev/ttyvb` descriptor to stay open so the user can view its buffer at
    any time via CTRL+ALT+F12.

    As a result, console and tty descriptors must remain open until a
    potential configuration reload or a system shutdown. The given
    descriptor will be closed in close_filed() in such circumstances.

    PR:             274454
    Fixes:          c3175a6e1c5a ("syslogd: Do not open console descriptor")
    Reported by:    Trond Endrest=C3=B8l <Trond.Endrestol@ximalas.info>
    Reviewed by:    markj
    Differential Revision:  https://reviews.freebsd.org/D42215

 usr.sbin/syslogd/syslogd.c | 3 ---
 1 file changed, 3 deletions(-)

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-274454-227-MUPMdl87it>