Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 01 Nov 2003 17:12:06 -0800
From:      andi payn <andi_payn@speedymail.org>
To:        Terry Lambert <tlambert2@mindspring.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: O_NOACCESS?
Message-ID:  <1067735516.825.492.camel@verdammt.falcotronic.net>
In-Reply-To: <3FA42945.A5EA17C1@mindspring.com>
References:  <1067528798.36829.2128.camel@verdammt.falcotronic.net> <20031031162757.GA56981@walton.maths.tcd.ie> <1067628015.825.64.camel@verdammt.falcotronic.net> <20031031.130229.132929054.imp@bsdimp.com> <3FA42945.A5EA17C1@mindspring.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1067735516.825.492.camel>