On Sat, 2003-11-01 at 13:44, Terry Lambert wrote: > "M. Warner Losh" wrote: > > Rewind units on tape drives? If there's no access check done, and I > > open the rewind unit as joe-smoe? The close code is what does the > > rewind, and you don't have enough knowledge to know if the tape was > > opened r/w there. > > Which brings up the idea of passing fp->fd_flags to VOP_CLOSE()...
Looking at the calls to VOP_CLOSE, there's either a flags variable, or the fmode variable I mentioned before, being passed as the second parameter. I haven't checked where this comes from in all cases, but when vn_closefile gets called, the value of this parameter is fp->f_flag. Similarly, when an open cannot be completed, the value is fmode. In other words, it looks like the flags are already there. _______________________________________________ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"