When a request is made to register a filter on a fifo that doesn't
apply to the fifo (i.e., not EVFILT_READ or EVFILT_WRITE), reject it as EINVAL, not by returning 1 (EPERM). MFC after: 3 days
This commit is contained in:
parent
1149df53b0
commit
491de3e2d2
@ -354,7 +354,7 @@ fifo_kqfilter(ap)
|
||||
sb = &so->so_snd;
|
||||
break;
|
||||
default:
|
||||
return (1);
|
||||
return (EINVAL);
|
||||
}
|
||||
|
||||
ap->a_kn->kn_hook = (caddr_t)so;
|
||||
@ -592,7 +592,7 @@ fifo_kqfilter_f(struct file *fp, struct knote *kn)
|
||||
sb = &so->so_snd;
|
||||
break;
|
||||
default:
|
||||
return (1);
|
||||
return (EINVAL);
|
||||
}
|
||||
|
||||
kn->kn_hook = (caddr_t)so;
|
||||
|
Loading…
x
Reference in New Issue
Block a user