From: SMTP%"davidg@balder.com" 11-OCT-1997 10:56:46.29 To: "'Colin Ward'" , "'ahaslam@ihug.co.nz'" , "'ntfsd@atria.com'" CC: Subj: RE: Deducing non read-only Open/Close IRP's Return-Path: owner-ntfsd@atria.com Received: by arisia.gce.com (UCX V4.1-12C, OpenVMS V7.1 VAX); Sat, 11 Oct 1997 10:38:27 -0400 Received: from gw.atria.com (gw.atria.com [192.88.237.2]) by bort.mv.net (8.8.5/mem-951016) with SMTP id RAA24460 for ; Thu, 9 Oct 1997 17:50:56 -0400 (EDT) Received: by gw.atria.com id Thu, 9 Oct 1997 13:18:35 -0400 Received: from ns.compumedia.com by gw.atria.com id Thu, 9 Oct 1997 13:18:26 -0400 Received: by ns.compumedia.com with SMTP (Microsoft Exchange Server Internet Mail Connector Version 4.0.993.5) id <01BCD49C.31A07FC0@ns.compumedia.com>; Thu, 9 Oct 1997 10:14:57 -0700 Message-ID: From: "David Goebel (Balder Technology Group, Inc.)" To: "'Colin Ward'" , "'ahaslam@ihug.co.nz'" , "'ntfsd@atria.com'" Subject: RE: Deducing non read-only Open/Close IRP's Date: Thu, 9 Oct 1997 10:14:55 -0700 X-Mailer: Microsoft Exchange Server Internet Mail Connector Version 4.0.993.5 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: owner-ntfsd@atria.com Precedence: bulk Indeed, look at fastfat\create.c in your IFS kits. In every path you execute an Io{Check|Update|Set}ShareAccess call which takes a DesiredAccess and FileObject and is responsible for updating the BOOLEANs in the FileObject. The BOOLEANs are set as follows: ReadAccess is TRUE if DesiredAccess has the FILE_EXECUTE or FILE_READ_DATA bit set, WriteAccess is TRUE if DesiredAccess has the FILE_WRITE_DATA or FILE_APPEND_DATA bit set, and DeleteAccess is TRUE if DesiredAccess has the DELETE bit set. So on entry you can check the SecurityContext as Colin pointed out below, or on successful exit you can check the FileObject BOOLEANs. David >-----Original Message----- >From: Colin Ward [SMTP:colin@leprechaun.com.au] >Sent: Wednesday, October 08, 1997 10:56 PM >To: ahaslam@ihug.co.nz; ntfsd@atria.com >Subject: Re: Deducing non read-only Open/Close IRP's > >Drew Haslam wrote: >> >> Hi everybody, >> >> I am in the middle of coding up a Mirroring filter driver which sits above >> the File System drivers and intercepts calls to specific File System Driver >> devices. >> >> Mirroring will be achieved by filtering out only the IRPs and FastIO calls >> which result in a change to the primary member of the Mirror set and >> passing them on to the secondary Mirror member. >> >> The READ and WRITE characteristics of most of the FastIO calls and IRP >> types are self explanatory but I need to work out whether IRP_MJ_CLOSE and >> IRP_MJ_OPEN are associated with a file that is about to be/has been >> modified. > > I posted a message similar to this this morning, and have since >figured it out. In the current IO_STACK_LOCATION is the FILE_OBJECT >which contains BOOLEAN fields such as ReadAccess, WriteAccess, >SharedRead and SharedWrite but these seem to be always FALSE. Maybe >they get filled in by the lower level FSD after it has been called? >Anyway, to find the mode the file is being opend in you look in the >IO_STACK_LOCATION->Parameters.Create.SecurityContext->DesiredAccess >field and and it with FILE_READ_ACCESS and FILE_WRITE_ACCESS. > >/----------------------------------------------------------------------\ >[Hitman/Code HQ - 6502/68000/604e coder - Long live the Amiga! ] >[VZ-200/Vic-20/c64*6/c128/Amiga CD32/500/2000/1200*2/4000 - 6581 Rulez!] >[A4000/CV64-3D/060-50/604e-200/66 Meg. Does not own a PC! ] >[After three days without coding, life becomes meaningless. ] >\----------------------------------------------------------------------/ > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - >[ To unsubscribe, send email to ntfsd-request@atria.com with body >UNSUBSCRIBE (the subject is ignored). ] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [ To unsubscribe, send email to ntfsd-request@atria.com with body UNSUBSCRIBE (the subject is ignored). ]