Re: io_callback function
"Todd C. Miller" <[email protected]>
| Newsgroups | gmane.comp.tools.sudo.devel |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 08 Jul 2015 05:04:22 -0400, Radovan Sroka wrote: > I'm testing your code and I encounter a problem. "What" parameter can be "SUD > O_EV_READ" or "SUDO_EV_WRITE" which are represented as second or third bit of > integer. If "what" parameter will be "SUDO_EV_READ" and "SUDO_EV_WRITE" at > the same time than in IF(what, SUDO_EV_READ) fd will close and in IF(what, SU > DO_EV_WRITE) is called "write" function with invalid file descriptor. I think it is best to check for SUDO_EV_WRITE first and clear SUDO_EV_READ if write() fails due to EPIPE, ENXIO, EIO or EBADF. See http://www.sudo.ws/repos/sudo/rev/167548fd8af2 - todd ____________________________________________________________ sudo-workers mailing list <[email protected]> For list information, options, or to unsubscribe, visit: http://www.sudo.ws/mailman/listinfo/sudo-workers