Windows: Fix AFSSetBasicInfo attribute processing
authorJeffrey Altman <jaltman@your-file-system.com>
Tue, 15 Apr 2014 16:19:21 +0000 (12:19 -0400)
committerJeffrey Altman <jaltman@your-file-system.com>
Wed, 16 Apr 2014 13:06:00 +0000 (06:06 -0700)
commit70299e6c3def0b84520232c02b9071c9cbf8a851
treea66fa3ad915967073620ca9f3dee2c0861896cd8
parenta4bcc4b1dccf6ab2745be83288c380f5454a2db9
Windows: Fix AFSSetBasicInfo attribute processing

The prior behavior of AFSSetBasicInfo() was to let the caller
set whatever it wanted as the new file attributes regardless of
the attributes that are supported by AFS.  In doing so, reparse
point and directory attributes could be cleared, and other values
could be set even though they would be lost as soon as the
DirectoryCB object was garbage collected.

New behavior:

1. return STATUS_INVALID_PARAMETER if reparse point attribute
   would be altered

2. return STATUS_INVALID_PARAMETER if directory attribute would
   be altered.

3. successfully modify readonly attribute

4. ignore all other attribute values

Change-Id: Ic678960101ef99cdad0c0e84b21c9d65c6831ca8
Reviewed-on: http://gerrit.openafs.org/11073
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
src/WINNT/afsrdr/kernel/lib/AFSFileInfo.cpp
src/WINNT/afsrdr/kernel/lib/Include/AFSCommon.h