The algorithms that were used to produce a Netbios name were broken.
The name that was produced when the hostname was too long was in fact
longer than the maximum permitted netbios name.
Also, the "NetbiosName" value was not used as a suffix when the loopback
adapter was not installed. The hardcoded string "AFS" was used instead.
Cell names are published as share names. As a result they are searched
for as part of the Dfs Referral evaluation. If share "foo" can not be
reached, the CIFS client will fallback to searching for "fo" as well.
Since the freelance client automatically adds a symlink for prefixes
of the cell name, this results in both "foo" and "fo" being added to
the freelance root.afs volume. This patch prevents that negative side
effect.
There are circumstances where a volume object is being accessed and the
volume is marked indicating that the volume location information is out
of date but where it is also pointless and perhaps dangerous to block
waiting for the rpc to complete. One example is when processing the
cmdebug requests. If we know that we are not going to use the volume
object to contact a server, then we can now set the CM_GETVOL_FLAG_NO_RESET
flag.
when moving up in the directory tree we search the recorded fid list to
find a matching fid that we have already crossed. we must also reset
the fid count based upon what we discover.
add option to addsite to allow adding a site where there is already a release-
equivalent volume resident, where thus we don't want to mark unreleased
(possible by dumping an existing RO and restoring with -readonly at the
new site)
add ability to vos clone to a readonly or backup with the correct ID and name
add ability when restoring a RW to a new site to leave the volume at the old
site intact
all changes are internal to vos and can be used with any OpenAFS from 2006
or later (supporting changes in namei to not create volumes with bad parent
id went in in December 2005)
(1) the specified path for "fs examine, whereis, whichcell, flush" and so
always has the follow symlinks and mount points semantics. This makes
it impossible to determine what the FID of a symlink or mount point is.
(2) "fs examine" out is not the result of a single pioctl operation but is
actually the combined output of half a dozen operations. Path evaluation
is an expensive operation. It would be faster if the caller could
evaluate the FID first and then perform all of the rest of the operations
by specifying the FID instead of the path.
(3) fs output reports all objects as files. By adding a GetFileType
pioctl more informative output can be provided that indicates what
type of object the path evaluates to.
(4) the Windows fs command includes a number of commands that do nothing
but exist only because the Unix cache manager supports them.
This delta adds a new extendible data structure cm_ioctl_query_opts_t which
can be optionally specified with pioctls that do not already require
input data. The first two fields of this structure are 'literal' and
'fid'. The literal field is used to indicate whether the last component
of the path should be evaluated following symlinks and mount points.
The fid field permits a fid to be specified.
A new GetFileType pioctl has been added. The type of objects are now
output.
A new "-literal" option is available for "fs examine, flush, whereis, and
whichcell.
Nname() is used to concatenate two strings and is frequently used with
the first string being the name of the executable perhaps with a full
path. The static buffer specified is too small for a full path and
there was no protection against writing beyond the end of it.
This option will retrieve the volume location database information
for all cells known to the cache manager and output the data in the
format required by the CellServDB file.
This functionality is supported by the UNIX cache managers and
Windows cache managers 1.5.31 and later.
Add support for RXAFS_GetCellServDB. Implemented by generalizing
RXAFS_GetCellByNum and special casing the index values to do the
right thing.
Conditionalize grabbing the callp->lock in the callback functions.
The race conditions in rx have long since been fixed and the potential
for deadlocks are too great.
Add a new flag CM_FLAG_NOPROBE for use in calls to cm_GetCell. When
set the newly discovered servers will not be immediately probed. Useful
when setting tokens, setting server preferences, or responding to cmdebug
callbacks.
1. prevent stopping the smb_Listeners due to an ip addr change when the
LANA is determined either by registry assignment or loopback detection
2. add synchronization logic to prevent smb_Listener restarts prior to
smb_Listener thread stoppage
3. no longer permit panics from smb_Listener threads
4. move the probe logic from cm_IPAddrDaemon thread to the cm_Daemon
thread in order to avoid the loss of ip addr change events. If an
adapter stops and restarts fast enough there might not be anything
for us to do.
Add a registry value "PioctlFollowMountPoint" to permit the use of the
old pioctl path evaluation behavior that always followed mountpoints
and symlinks.
One of the challenges to deploying NIM has been the configuration of
AFS token acquisition. This patch adds a new registry key hierarchy
HKLM\SOFTWARE\OpenAFS\Client\Realms
which is used to configure the AFS Provider for a new identity based
upon the realm of the identity. The Realms key contains subkeys for
each realm for which configuration data is being provided
HKLM\SOFTWARE\OpenAFS\Client\Realms\"RealmName"
"RealmName" contains one optional value, "AFSEnabled", and subkeys for
each Cell that is to be added to the configuration. "AFSEnabled" defaults
to 0x01.
In "CellName", there are two optional values, "Realm" and "MethodName".
If the values are not specified, the automatic realm and method determination
algorithms are used.
These values can be added to an MSI transform or deployed via Group Policy.
Do not pass strings generated from incoming network data to ??printf
as the format string. Instead use a format string of "%s". This protects
against %? expansions being inserted in the string.
After a network change, test to see if the desired LAN adapter to bind
the Netbios Name to has changed. If so, stop the Netbios Network and
restart with the new LAN adapter.
This can happen on Vista after a suspend if the service wakes up before
the Loopback adapter re-initializes.
If the realm name of the requested ticket is the empty string, decode
the actual service ticket to determine the actual realm. Obtaining the
actual realm prevents unnecessary pts registration failures.
make the aklog lam plugin work correctly in e.g. the CDE screenlocker, which is
part of the long-running and not-run-by-user dtsession; this means we do wackiness to
1) not pag ourselves in that case
2) setuid to the user to set uid tokens if we got a username and are root
3) do not use pr_mumble get the the AFS ID to put in the tokens, as multiple
initializations of Rx in the process space of dtsession crashes it
Do not trust the registry to determine whether or not krb4 support
is available. In a roaming profile the user data can say 'yes' even
if the plug-in or the kerberos library does not exist.
avoid a race condition between cm_SyncOpCheckContinue and cm_SyncOpDone
that can leave a request on an scp stuck in the waiting state even though
there are no other requests to wake it up.
cm_BkgPrefetch() contained two errors. First, the loop at the top of the
function that ensures that a cm_buf_t is allocated for each of the offset
positions failed to actually obtain the buffer for the specified offset.
Instead, it repeatedly obtained the buffer for the starting base address.
Second, cm_GetBuffer() would reserve all of the buffers associated with
the cm_scache_t even in the case where we already have a callback and the
existing buffer has the proper data version number. In that situation
reserving the buffers simply wastes valuable time.
1. avoid re-reading CellServDB each time a cell alias is specified
2. avoid reconstructing the vlserver list for the cell each time an
alias is specified
3. permit aliases to be used when AFSDB records were used previously
with the full cell name
Reduce the default number of background daemon threads used for prefetch and
store operations to one. Given the current implementation when more than
one thread is allocated they step on each other's toe while fighting over
locks.
A better model might be to divide up threads based upon cells or volumes
as a means of preventing contention.