LICENSE MIT
when performing offline volume checks, do so in most recently used order
if the system is entering suspend state, short circuit the background
daemon operations to avoid extra work that is going to fail when the
network is shutdown behind the back of the service.
(cherry picked from commit 46287f6790)
LICENSE MIT
On Windows there is no chown or chgrp command that can be used to
change the owner or group of an object in AFS. Therefore we
add them to the fs command.
Usage: fs chown -owner <user name or id> [-path <dir/file path>+] [-literal] [-help]
Where: -literal literal evaluation of mountpoints and symlinks
Usage: fs chgrp -group <user/group name or id> [-path <dir/file path>+] [-literal] [-help]
Where: -literal literal evaluation of mountpoints and symlinks
(cherry picked from commit ffd065a695)
LICENSE MIT
Add a debug log warning if the target volume is a DFS File Set.
If so, the client will not properly protect against information
leakage or properly deal with directory name caching, symlinks,
and other behavioral differences between AFS and DFS.
(cherry picked from commit efdf78ae08)
LICENSE MIT
permit installers to build again. this does not include all
of the changes for the new documentation. that work was not
pulled to this branch.
LICENSE MIT
libafsconf.dll has been present since OpenAFS 1.0. However,
for some unknown reason the components that it consists of
(cm_dns.obj, cm_config.obj, cm_nls.obj) have been staticly
linked into exes and dlls all over the code base. This commit
removes all of the static references and replaces them with
libafsconf.lib.
libafsconf.dll is also moved from Client\Program to Common
because it is now linked to by server and utility components.
(cherry picked from commit c8ccb88788)
LICENSE MIT
FIXES 125018
Fix issue reported by Marc Dionne. RXAFS_FetchData and RXAFS_StoreData
return access denied errors that are not reported by the subsequent
call to rx_EndCall which should be preferred.
(cherry picked from commit a50fa631ca)
LICENSE IPL10
FIXES 124130
rename mrafs commands into their equivalent osd versions; structures etc are the
same.
(cherry picked from commit 8655541d1e)
LICENSE MIT
add xdr_free() and export it from afsrpc.dll. This permits applications
to free memory allocated within the xdr routines with the same run time
library memory management routines as was used to allocate it.
This is necessary on Windows to prevent memory corruption.
VL_GetAddrsU() is an example where a xdr array is allocated in the
library and must be freed by the application.
(cherry picked from commit d7749751df)
LICENSE MIT
cm_Link() is used to create hard links. It did not apply the updated
link target status info to the target cm_scache_t object. As a result
the linkCount would be incorrect.
cm_Unlink() did not take linkCount into account. It did not reduce the
locally known linkCount, nor did it invalidate any currently known
callback. As a result the linkCount would be incorrect.
(cherry picked from commit b8a1dba293)
LICENSE MIT
Switch the PathInAfs test to use VIOCGETFID instead of VIOC_GET_CELL_NAME
so that the literal option can be used.
(cherry picked from commit fd0f1f49f2)
LICENSE MIT
FIXES 124742
Change the PathInAfs test to use VIOCGETFID instead of VIOC_GET_CELL_NAME.
VIOCGETFID permits a literal test of the specified object. This is needed
for testing the validity of a symlink to a msdfs: or non-existent path.
Otherwise, the AFS Shell Extension context menu will not be displayed.
(cherry picked from commit 6217199058)
LICENSE BSD
Specify the AFS Fid of the global root.afs volume.
Do not return errors from PopulateCurrentEntry when evaluating targets.
symlink target processing is now performed within the file system
due to the ".." symlink issue.
Fix byte range lock deallocation.
LICENSE BSD
with assistance from jaltman@secure-endpoints.com
Add GlobalFileId to the file system initialization arguments. The file
system needs to be able to identify which volume is the global root
by fid in case the volume is mounted in multiple locations.
Reimplement all of the path parsing logic in order to be able to handle
symlinks that contain a ".." entry that crosses above a volume root.
The full starting path is now recorded in the Ccb as an array of component
names. This is used as a stack pushing and popping components while
evaluating the contents of a symlink.
Permit directory enumeration to be performed asynchronously.
Correct spelling errors in comments.
Correct @sys processing.
When evaluating the target type for a symlink, do not evaluate the target
of the final component if that component is a mount point.
Initialize sysname resources.
Ensure that buffers are nul terminated before passing them to RtlRegQuery.
When processing the invalidation of a file deletion, delete the direntry
but not the fcb. No longer assume that Fcb->DirEntry is always non-NULL
except during cleanup.
LICENSE BSD
add HOLD_FID / RELEASE_FID interfaces. Used by the file system to obtain
a reference count on a cm_scache_t object to ensure that it is not recycled.
Add GlobalFileId to the file system initialization arguments. The file
system needs to be able to identify which volume is the global root
by fid in case the volume is mounted in multiple locations.
LICENSE MIT
Change cm_BPlusDirEnumerate interface to include a 'FetchStatus'
parameter. When set to 0, we do not fetch status for fids for
which we do not already have status info. This avoids unnecessary
recycling of cm_scache_t objects.
(cherry picked from commit 15d4dd0f70)
LICENSE MIT
Modify the cm_ResetACLCache interface to accept an optional cm_cell_t *.
At the moment every time a token is set or cleared all of the acl info
for all cm_scache_t objects regardless of cell is reset. This is both
a performance hit and unnecessary. If we know the cell, only reset
the acl info for cm_scache_t objects in that cell.
If cell is not specified, reset for all cells.
(cherry picked from commit d0e4044cfe)
LICENSE MIT
Modify the cm_Unlock() interface to support the ability to unlock all
locks within a range. This is required for the redirector.
(cherry picked from commit 8e01e5a4db)
LICENSE MIT
correct error in windows-freelance-20090223. use cpath not filename
since that is why we allocated cpath in the first place.
(cherry picked from commit 7ca2785f53)
LICENSE MIT
use cm_HaveCallback() to check for a call back instead of explicit
checks on cbExpires and cbServerp. cm_HaveCallback takes into account
Freelance mode and offline status.
(cherry picked from commit ef81e9395c)
LICENSE MIT
Change how BPlusDir enumerations behave with regards to bulk stat
operations. If the number of entries in the enumeration is larger
than the number of cm_scache objects, then using the previous model
of cm_BPlusDirEnumBulkStat being called for the entire enumeration
list results in the early objects being recycled and the status
info discarded before the caller of cm_BPlusDirNextEnumEntry()
receives the name.
The revised model triggers bulk stat operations from within
NextEnumEntry() as objects requiring status fetching are about
to be returned to the caller. This reduces the thrashing of the
stat cache.
We should consider adding a flag field to cm_BPlusDirEnumerate()
or cm_BPlusDirNextEnumEntry() to permit enumeration without
status fetching.
(cherry picked from commit a329712516)
LICENSE MIT
Unlike the unix cache manager, on Windows the server uuid was not
recorded as part of the cm_server object. This commit adds the uuid
and a flag to indicate if it is set or not.
A check is made in cm_UpdateVolumeLocation it confirm that the uuid
known to the CM is the same as the one being reported by the vl server.
If they differ, this is logged but no action is taken.
The contents of the cm_allServers list is now dumped in response to
"fs memdump" or a crash. This includes the uuid, addr, type, flags,
downtime, caps, etc.
The server uuid is not useful at the moment because there is nothing
that the CM can use it for. However, it might be useful for debugging
and it will be needed for extended callback support.
(cherry picked from commit 19ffc146fa)
LICENSE MIT
create a new cpp symbol CM_SCACHE_VERSION_BAD to represent data version
values in cm_scache objects that are known to be invalid.
then consistently apply this value throughout the code. Previously
some invalid values were set to 0 and others to -1 (0xFFFFFFFF:FFFFFFFF).
Also fix at least one location where CM_BUF_VERSION_BAD was not used.
(cherry picked from commit 5d14735126)
LICENSE MIT
do not permit VNOSERVICE or VOFFLINE or VSALVAGE to leak and
be returned as an error code. The resulting NTSTATUS is not valid.
(cherry picked from commit fbfaaf2689)
LICENSE MIT
Fix another set of edge cases where adding a mountpoint or symlink
to the Freelance volume would result in the wrong fid being returned
to the request that made the addition.
When the Freelance directory is updated, invalidate the cm_scache_t object.
that is associated with it.
Actually use the data version when checking callback status.
The return value from Add Mount/Symlink is not negative on failure.
Its an actual error code. Treat it that way.
(cherry picked from commit 3c1f858208)
LICENSE MIT
FIXES 124276
A readonly volume with multiple instances was being marked alldown
when one of the instances resulted in VNOVOL because the vldb and
the indicated file server were out of sync. The cache manager would
then attempt to re-obtain the volume location info from the vldb
for the entire timeout period.
This patch:
adds trace logging to cm_Analyze indicating which server references
are being deleted and which remain in response to a VNOVOL/VMOVED error.
adds trace logging to cm_UpdateVolumeStatusInt showing how the
new volume status value is determined.
corrects cm_Analyze() so that it doesn't corrupt the server reference
list during cm_FreeServerList() calls; doesn't orphan the server reference
list by setting *serverpp to NULL; and only re-obtains the volume info
list once per request.
(cherry picked from commit 8bb35234aa)
LICENSE MIT
Modify the cm_BPlusDirEnum interface:
* add the cm_scache_t * of the directory being enumerated to the
cm_direnum_t object
* remove the cm_scache_t * from the cm_BPlusDirEnumBulkStat call
now that it is part of the cm_direnum_t object
* maintain a reference to the cm_scache_t for the life of the
cm_direnum_t object. This ensures that the object cannot be
recycled while the enumeration is in use.
(cherry picked from commit e42a066da1)
LICENSE BSD
When the target of a symlink is a volume root, we must return
the control block of the volume root and not the current fcb
which is still referring to the last symlink in the chain.
Be sure to hold the TreeLock while we perform the is volume
test in order to prevent the volume control block from being
torn down.
LICENSE BSD
When evaluating the file type of a symlink target, use the fast evaluation
which does not follow mount points. We need to know that the target
is a mount point so that the reparse attribute can be set.
LICENSE MIT
Bring a bit more sanity to the Freelance code:
1. Add functions cm_FreelanceFetchMountPointString and
cm_FreelanceFetchFileType to cm_freelance.c. These functions
permit the MountPointString and FileType to be obtained within
cm_GetSCache without requiring knowledge of data structures
that should be private to cm_freelance.c
2. Enforce the rule that odd vnode values are directory objects.
The root directory is 1 and everything else must be a multiple
of two.
3. Use the unique field as an index into the localMountPoints
array.
4. Fix cm_GetCallback to process freelance data refreshes on
all objects in the freelance volume not just the root directory.
If this is not done, an access to \\afs\foo prior to \\afs\all
being evaluated will cause an unnecessary attempt to send a
fetch status request to a file server and produce an alldown
error.
====================
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.
====================
LICENSE MIT
remove unnecessary conditional
(cherry picked from commit 8c4b06a5b6)
LICENSE MIT
If the NonPersistentCache option is activated there is no "AFSCache"
file to share with the file system. Refuse to start the redirector
interface.
LICENSE MIT
If the NonPersistentCache option is activated there is no "AFSCache"
file to share with the file system. Refuse to start the redirector
interface.
Instead of testing in RDRInit the service will not attempt to
initialize if the redirector cannot be used.
LICENSE MIT
If the NonPersistentCache option is activated there is no "AFSCache"
file to share with the file system. Refuse to start the redirector
interface.