Add additional validation and error handling code after each call to
getSlot(). If an invalid slot is returned, return NONODE. If the
invalid slot is returned when extracting a data node, invalidate the
tree.
Modify compareKeys() to always perform a case-insensitive comparison
and only perform a case sensistive comparison if the case-insensitive
one matches. This ensures the ordering is consistently reported.
Add lock assertions to ensure that all calls are being performed with
the correct locks being held. There have been some crash reports that
provide stack data that does not appear to be possible unless there is
a race. However, there are no obvious locations where the race is
taking place and the test suite indicates that all of the correct locks
are being held. We shall see what happens in the field.
For consistency replace all calls to findKey in which the range is
(1,numentries) with calls to getSlot().
Optimize the depth search loop by testing the slot value in the for
statement instead of forcing the loop to be broken later.
Microsoft provided a dump showing cm_data.aclLRUEndp == NULL in
GetFreeACLEnt(). Couldn't find any reason why that would be true.
However, there is extraneous code that manipulates the value of
aclLRUEndp when it should be left to osi_QRemoveHT() to update
the pointer values.
Also add an additional explicit test for aclLRUEndp == NULL in
GetFreeACLEnt().
At somepoint windows installer broke the use of the 'file' RegistrySearch
type. Instead of returning the full file name path we are only getting
the directory. Switch to using the 'raw' type since we know we aren't
prefixing the file name with a hash.
The cmd.exe "del" command operates by opening a file and then setting
the file disposition to delete on close followed by closing the file.
When the filename is a symlink, the smb_fid_t scp refers to the final
destination object and not the symlink. In smb_CloseFid() the correct
object would be removed from the directory by name, but the wrong cm_scache_t
would be marked deleted. This would result in subsequent references to
the target file being considered invalid.
Fix it by looking up the cm_scache_t of the symlink prior to performing
the deletion.
Add registry value "OfflineReadOnlyIsValid" option. When set to non-zero
value, an offline or down read only volume will be treated as if it has
a valid callback even if it doesn't.
cm_ParseIoctlPath() moves the ioctlp->inDatap past the ioctl path
to the next data value if there is one. Make sure we move the pointer
before we alter the contents of the buffer. Otherwise, the caller
uses the wrong string for its next data blob.
Add SOFTWARE\OpenAFS\Client AcceptDottedPrincipalNames registry
value to control whether the use of Kerberos v5 principal names
with dots in the first component are permitted.
Change "fs uuid" to "fs uuid -generate" where "-generate" is a
required parameter.
This command requires root access to execute it.
Unlike the Windows variant, the UNIX version does not yet support displaying
the current UUID to the user. When this functionality is added, "-generate"
should become an optional parameter.
fix issue where gcc 4.2 compiled kernel modules were breaking on linux
====================
This delta was composed from multiple commits as part of the CVS->Git migration.
The checkin message with each commit was inconsistent.
The following are the additional commit messages.
====================
pioctl commands were failing with CM_ERROR_NOSUCHCELL because the
Freelance cell object was not being added to the Cell Name and ID
hash tables.
ParseIoctlPath was not consistently returning the FID of the specified
symlink or mount point object. The was still one more case in which
CM_FLAG_FOLLOW was being specified left over from
windows-parse-ioctl-path-20070629. Changed the use of CM_FLAG_FOLLOW
into a 'follow' variable to ease testing and permit easy migration to
adding a 'follow' parameter to the function.
RXAFS_GetVolumeStatus is always going to fail for Freelance volumes.
Fake the response data.
UpdateVolume() was performing the wrong test for Freelance volumes.
Freelance volumes should not be marked offline even though they have
no servers.
This patch removes use of the non-Public ILL structures by OpenAFS to
gather network interface information in order to make RX packet size
and server locality decisions.
Attempts to rename by case only would fail when there are more than
one ambiguous matches. The list of data nodes would be corrupted
and future tree manipulations could result in a crash.
Some cells have a large number of servers listed in the vldb that
no longer exist and/or do not have PTR records in DNS. The algorithm
used to obtain the "server names" from IP addresses involves opening
a cell handle, creating an iterator of all servers, and then iterating
over them until a match is found for the IP address. This is done for
every server reference. Each time the iterator was constructed the
vldb would be queried and gethostbyaddr() would be called on every listed
ip address.
This patch stores a copy of the server list in the cell handle along with
an expiration time generated from a 10 minute TTL. This significant
reduces but does not eliminate the number of times that the caller is
blocked on reverse dns lookups.
Many of the OpenAFS binaries that are installed on end user machines
did not have version information. This is problematic as it is impossible
to determine which version of a binary the crash report was filed against
when a report is received by Microsoft Windows Error Reporting service.
Discovered another case where VNOVNODE errors were not being handled.
If there are dirty buffers and a VNOVNODE error is received while
writing the buffer, the buffer would be left in the dirty buffers queue.
This caused a couple problems:
(1) any attempt to flush the file, volume, or cache would fail because
there were unflushed dirty buffers that could not be flushed.
(2) shutdown of the service would hang because the buffers could not
be flushed.
In addition, while a VNOVNODE error would result in the cm_scache_t
being marked CM_SCACHEFLAG_DELETED, this state was not being checked
at the SMB layer. As a result, if a smb_fid_t was allocated and it
referenced the deleted cm_scache_t, the SMB operations would continue
to be processed and report success even if the actual file or directory
no longer existed.
We now clear the dirty state on buffers which cannot be written due to
VNOVNODE errors. We also check the cm_scache_t for deletion prior to
use whenever a smb_fid_t is looked up. If the cm_scache_t is deleted,
the smb_fid_t is closed and the error CM_ERROR_NOSUCHFILE is returned
for files or CM_ERROR_NOSUCHPATH for directories.
Mark afs_config.exe via a manifest with
requestedExecutionLevel = HighestAvailable
This will ensure that when Vista UAC is active, that a member of the
Administrators group must run the AFS Control Panel with Administrators
privileges.