Handle one more case of a fifofs filetmp: set filetmp.f_cred to

ap->a_cred, and pass in ap->a_td->td_ucred as the active_cred to
soo_poll().

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
This commit is contained in:
Robert Watson 2002-08-20 02:17:59 +00:00
parent 353450fbbe
commit b4edfededd

View File

@ -493,9 +493,10 @@ fifo_poll(ap)
events = ap->a_events & (POLLOUT | POLLWRNORM | POLLWRBAND);
if (events) {
filetmp.f_data = (caddr_t)ap->a_vp->v_fifoinfo->fi_writesock;
filetmp.f_cred = ap->a_cred;
if (filetmp.f_data)
revents |= soo_poll(&filetmp, events, ap->a_cred,
ap->a_td);
revents |= soo_poll(&filetmp, events,
ap->a_td->td_ucred, ap->a_td);
}
return (revents);
}