The function cm_SyncOp() can cause threads to wait either because there
is a state conflict on the current use of the cm_scache_t object or
a state conflict on the cm_buf_t object. Waiting is always performed
on the cm_scache_t object. However, if the conflict was with the cm_buf_t
object there was no method for waking up the thread when the conflict is
cleared. Now all of the cm_buf_t waiting functions also take a cm_scache_t
and waiting threads are woken if necessary.
cm_scache_t and cm_buf_t objects now have waitCount and waitRequest fields.
The WAITING flag is now cleared by the waking thread who sets waitCount to
zero.
Many improvements to trace logging for these issues.
(cherry picked from commit dfd34687f29ea2c20c5c0438ab4dba11e077f889)
a couple of more locations at which cm_SyncOpDone() either was not
called or was called without holding the scache mutex.
(cherry picked from commit 528c511aabaefcafc01361c8038766ce56fe8e45)
(1) Replace all calls to getenv() with GetEnvironment(). getenv() does
not read from the real environment but instead from a copy created by
the C RTL.
(2) Add support for preserving Kerberos 5 tickets during the Integrated
Logon process. Now when Integrated Logon is used, the tickets will
be stored into the default ccache within the user session.
(3) Stress testing at MIT uncovered two code paths that could leave
threads in a permanent sleep state under heavy load. Calls to
cm_SyncOpDone were added to plug this hole.
====================
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.
====================
Install afscpcc.exe and register the KFWLogon WinLogon Event Handler
(cherry picked from commit 96472a6b3a71d5d5ef57e2481680920a7e006ffe)
Add new "logon" event handler in order to establish a smb connection
to the AFS client service with the true logon name as early as possible.
====================
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.
====================
Add new "logon" event handler in order to establish a smb connection
to the AFS client service with the true logon name as early as possible.
Add "replace_afs.cmd" file
cm_EndCallbackGrantingCall contained a race condition due to the release
of the cm_callbackLock in the middle of the for() loop. The race was
removed by optimizing out the call to cm_CallbackNotifyChange(). There
is no reason this needed to be called once per callback revoke in the
list.
(cherry picked from commit 8085bc4d476a2e77b26454929cdfa1d034c754f7)
Conditionalize the AFS->Mount Point->Remove menu item based upon whether
or not the selected item(s) contain mount points
(cherry picked from commit 9198f00b19d0ba793d62241973403d7d1e8acfab)
Add new hooks from "AfsdHook.dll" to the afsd_service.exe
AfsdInitHook - where you currently have one
AfsdRxStartedHook - after RxInit but before SmbInit
AfsdSmbStartedHook - after SmbInit
AfsdBkDaemonHook - called by the BkDaemon thread and is executed once per
cycle
AfsdStoppingHook - called just after a shutdown event has been
received but before any shutdown has been performed
AfsdStoppedHook - called just after all shutdown operations after
completed but before the service terminates
The type of the function is
BOOL ( APIENTRY * AfsdHook )(void)
in all cases. Returning FALSE will cause the service to shutdown.
(cherry picked from commit c0753e9ee7ff61ecd162cebbb30da7f0a8ca0bb6)
Support for WinLogon "logon" event handler to allow use in multi-domain
forests with a cross-realm trust between a MIT realm and a root domain
with workstations in a sub-domain.
Add support for rx_StartClientThread
Prepare for allowing maxVolumes and maxCells to be configurable via
the registry.
FIXES 17805
this time we'll work it out on windows. multitier free packet queues to increase performance
(cherry picked from commit 004be0249387802cc7abe45d50c6f8b67c4832d0)
cmdebug -addr should report the rx_mtu size if it is set and less than
the actual mtu size
(cherry picked from commit d0879e78e6a8824eb745359a00b1d3170b977eaa)
One final deadlock was discovered in cm_TryBulkStat(). Do not hold
the scp->mx while calling an RXAFS function.
(cherry picked from commit 48b2968e0a3ff5f07bd1e04f01e625b110d78482)
Replace the time translation hack based on smb_NowTZ with a purely
mathematical conversion from UTC based unixTime (time_t) to UTC
based FILETIME
(cherry picked from commit 9a3844a96b07ffa7b677460d0a9f0dbffd774e03)
Add bounds checking to the comparison of fid->vnode and cm_localMountPoints
when Freelance mode is used.
Fix typo in DJGPP section of smb.c
Use rx_connection * instead of rx_call * in previous fix to cm_dcache.c
(cherry picked from commit 0a9609d8eb599dfe11ff04d8752e15b58c3ef89d)
Ran more stress tests against 1.3.80b on a dual processor machine and
found a number of additional errors which could be fixed.
cm_callback.c: correct the refCount handling of server lists when
processing registering callbacks on the scache entry
cm_conn.c: cm_Analyze was not handling the CM_ERROR_NOSUCHVOLUME case.
In this case force a retry and Force Update the Volume info
cm_dcache.c; do not hold mx locks around calls to rx_NewCall(). That is
why we have reference counting on the rx_connection objects.
cm_ioctl.c: replace references to afsdcell.ini with CellServDB
cm_utils.c: formatting
cm_vnodeops.c: improve the logging and add a missing call to
cm_EndCallbackGrantingCall()
cm_volume.c: allows cm_volume_t objects to be reused if their
ref count is 0 and we have hit the maximum number allowed.
smb.c: improve the logging and the handling of dead_vcp references.
If all of the SMB sessions and NCBs are in use, return BUSY to the
CIFS client.
smb3.c: convert constants to preprocessor symbols
(cherry picked from commit b9bf7ee01acc7f2646fbc6e09c1ca8d41cc59d55)
the use logon cache hack only works on xp and above. do not give up
use of smb auth simply because it fails
fix the smb_vc_t refCount fix to smb_CopyPacket. Only hold a smb_vc_t
if there is one.
(cherry picked from commit 46f7713f16c8c96983872a801cf1ce9cf7b80530)
conditionalize the assertions on smb_vc_t refcounts as they are only
for debugging. We know there is a problem but don't want to deal with
it for the 1.3.80 release.
added logging info for each hold and release. perhaps that will provide
a clue in the future
====================
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.
====================
When copying a packet we must increment the vcp refcounts
(cherry picked from commit 247a58de77004ec10c2e55451d99dd04bd982df4)
Found another case in which the windows client could break connections
which should not be broken if cryptall is on. If the connection is
unauthenticated because there are no tokens, the connections will be
broken.
If a site relies on AFSDB records and the client machine is configured
to append a domain suffix to all queries it is possible for "foo" and
"foo.bar" to appear to be separate cells. fixed by appending a trailing
'.' to all AFSDB queries if there is not already one.
(cherry picked from commit 164d4ee959547e4791a497bc86377b269ec43dd2)
Update the comments to indicate how we force authentication to be
performed against the Windows logon cache instead of a domain controller
and how BackConnectionsHostNames will work in Longhorn Beta 1.
(cherry picked from commit 80d60b9cd1275c4a4ded571c5876a1e704baf53e)
Add new registry setting to force a lana to be treated as a loopback
Move hack to force use of MSV1_0 cache
(cherry picked from commit 834adacf6a65609d2d013b31ccbfba44d540abfa)
This patch applies all of the work done to add persistent cache support,
cache manager debugging, and a variety of bug fixes. A full description
will be committed within doc/txt/winnotes as part of a later commit.
(cherry picked from commit 0b90d69f8a44e6c7ba20553cfb7d5cf7072bab57)
smb3.c: another fix for pattern matching. Patterns can include '<' and '>'
instead of '*' and '?'. Treat any pattern with angle bracket as
star patterns
afslogon.c: instead of retrying the username lowercased if it is all
uppercased. retry the username lowercased if it was not already
lowercased. this captures the mixedcase username case.
afskfw.c: If Leash is configured to not import tickets from the MSLSA,
neither should we.
cm_vnodeops.c: If the second to last component of a path is a symlink and
the last component cannot be found, return NOSUCHPATH instead of
FILE_NOT_FOUND.
(cherry picked from commit 641c2b17efbffa523818a950761e612e9fc6f5f7)
afskfw.c: fix cross-realm token acquisition in ANDREW vs CS CMU case
cm_aclent.c: when ACL's timeout, remove them from the associated
cm_scache_t object's randomACL list and place them on the end
of the ACL LRU queue
correct tgtLifetime to be unsigned
smb3.c: fix case sensitive matching
(cherry picked from commit 09feb1be1711dbbe053b572915df4384f488eb0e)
* The list of ACL entries was becoming corrupted because the function
which obtained a free entry was doing so without the appropriate lock
being held.
* Changed the default @sys name list to "x86_win32 i386_w2k i386_nt40"
for 32-bit x86 systems. The default for itanium will be "ia64_win64"
and "amd64_win64" for amd 64-bit processors.
(cherry picked from commit 516614090190f34cb74ec741cf06f86384bff4d1)
The list of ACL entries was being corrupted because the function
which obtains a free ACL entry was doing so without the appropriate
lock being held.
Returning Not A Directory is not the right thing to do when we are
attempting to resolve a path if the error is found on one of the
intermediary path components. Instead return No Such Path or
No Such File as appropriate.
(cherry picked from commit ff3436446e1c8447d0f9703b088c6d65c6845aa0)
Rework the reference counting of the smb_vc_t objects to use
smb_ReleaseVC and smb_HoldVC. Add missing counts for references
from waiting locks.
Fix cm_ioctl.c to allow it to compile once again.
(cherry picked from commit eabe2b6f77da6913b4a6bd51220708c363762fe6)
New AFS Logo Icon
Fix the assignment of the dataVersion for the freelance scache entries
Fix the calling convention of the AFSD Service Main function to be
WINAPI.
(cherry picked from commit 4c861ab65683add205d062790036b27123d0fe6b)
afskfw.c - remove extra parameter to pr_Initialize
afsd_service.c - move SERVICE_STOP_PENDING to before we start to
do any work.
afsd_init.c - initialize rx and rpc after starting the cache manager
cm_callback.c - release cm_callbackLock before attempting to re-obtain
scp->mx lock in cm_EndCallbackGrantingCall()
(cherry picked from commit ca1c67688bf92903c9803976e918266753ef0aae)