From:	Henry Lee (Exchange)
Sent:	Monday, November 08, 1999 6:00 PM
To:	Alex Armanasu (Exchange)
Cc:	Mike Hillberg (Exchange)
Subject:	Office usage of EFS
I haven't gotten any meeting notes from anyone, so I've included my own.

Attendees: Sekar Chandersekaran
                 Praerit Garg
                 Robert Gu
                 Teresa Fung
                 Mike Hillberg
                 Brian Andrew

Problem:  When you edit an encrypted file in Office, and the parent directory is not marked as encrypted, the newly saved file will not be encrypted.  This is because typically Office will do a safe-save (create temp, rename, rename, delete).

The first proposed solution involved the use of the hTemplate parameter in CreateFile, where the hTemplate refers to the original encrypted file, and CreateFile is being used to create the new version of the document.  This was deemed not scalable and robust by Brian Andrew due to NTFS volume locking concerns.

RobertGu is proposing a new API to move EFS metadata from one file to another.  This API has not been fully designed yet, but it could take two handles or two filenames as parameters.  Robert had some concerns about the parameters being handles since EFS may do a separate open on the destination.

The original plan was for StgCreateStorageEx to accept either a source handle or filename, and then pass this parameter to the new API to transfer the EFS metadata.  The work to do this is trivial, probably a day or two of work to expose the new parameter can pass it down to the new API.  It is possible to not change the StgCreateStorage API by first creating a zero-length file with the correct EFS metadata (note: this works in normal mode but not in simple mode).  Then StgCreateDocfile can be used to fill in the contents.  Phil seems to prefer this approach.

There was general agreement that the new API should not be limited to encryption.  It could be expanded to transfer other types of metadata, such as ACLs, compression, etc.  Note that ReplaceFile does this, but also copies the contents as well.  There was also discussion of what should happen when encryption is about to be lost.  Current behavior is silence.  There was agreement that the "Save" operation should preserve encryption, but "Save As" is debatable.

Next, the discussion broadened to include different ways of losing encryption besides saving to the file system.  These include: saving to a different format with mutiple files (like HTML with thicket), saving with WebDAV,  saving into an embedding, saving into an email message, saving into Platinum store.

The only action item that came out was that Mike will spec out the new API, and it will be reviewed at the next meeting.  Also Mike now works for PradyM on XMF, and he's not sure that he should be owning this work.

Last week, I investigated docfile bugs #422632 (red-black tree problem) and #420996 (incorrect data during low-memory when copying a 4G stream -- the out-of-memory condition is causing by memory-mapped a 2G scratch file).   I've declared both as postponed, and eventually, I'll go back and investigate them further as needed.

Thanks,
Henry