vt: Allow VT_SETMODE with frsig=0
Linux does not check that any of the signals in vt_mode VT_SETMODE ioctl (relsig, acqsig, frsig) are valid, but FreeBSD required that all three are valid. frsig is unusued in both Linux and FreeBSD, and software typically leaves it unset. To improve portability, allow frsig to be set to zero. PR: 289812 Reported by: Dušan Gvozdenović Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D52835
This commit is contained in:
@@ -3046,9 +3046,9 @@ vtterm_ioctl(struct terminal *tm, u_long cmd, caddr_t data,
|
||||
DPRINTF(5, "reset WAIT_ACQ, ");
|
||||
return (0);
|
||||
} else if (mode->mode == VT_PROCESS) {
|
||||
if (!ISSIGVALID(mode->relsig) ||
|
||||
!ISSIGVALID(mode->acqsig) ||
|
||||
!ISSIGVALID(mode->frsig)) {
|
||||
if (!(ISSIGVALID(mode->relsig) &&
|
||||
ISSIGVALID(mode->acqsig) &&
|
||||
(mode->frsig == 0 || ISSIGVALID(mode->frsig)))) {
|
||||
DPRINTF(5, "error EINVAL\n");
|
||||
return (EINVAL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user