Rename smb_GetUser to smb_GetUserFromVCP and add smb_GetUserFromUID.
Use calls to smb_GetUserFromUID to reduce the number of times that
the smb_user_t object is obtained and released during the processing
of an smb call.
add logging of server addresses, status and capabilities
prevent multiple threads from pinging the same server simultaneously.
instead, threads block and then use the result of the ping that was
already taking place.
Add registry values to allow the defaults for daemon checks to be altered
at startup. Log values to afsd_init.log.
daemonCheckDownInterval
daemonCheckUpInterval
daemonCheckVolInterval
daemonCheckCBInterval
daemonCheckLockInterval
daemonCheckTokenInterval
new (2.6.16) kernerls have i_mutex instead of i_sem
====================
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.
====================
make i_sem become i_mutex
FIXES 25869
acl_CheckRights() was generating core dumps because the client's prlist
was being invalidated by h_TossStuff_r() as part of freeing the associated
host. This patch fixes the problem in probably redundant ways.
A missing hold on the host is now obtained. refCounts on the client
are now preserved as part of GetClient()/PutClient(). Read/Write locks
are now obtained on the client when accessing/manipulating the prlist.
This patch adds the client parameter to GetVolumePackage() and
PutVolumePackage() and adds the new function PutClient().
This patch removes the need for the client X had conn Y stolen by X messages.
This is replaced by "deleted client X already had conn Y stolen by X. If
we see this there is definitely a logic problem as the client should not
be deleted at this point. We a no longer allowing the race condition that
would have resulted in the original message.
In addition, this patch fixes a problem with UAEs caused by the
inappropriate translation of VICE error into UAEs when there is overlap
between VICE error values and those in sys/errno.h.
When we have found an existing host via Uuid, send the probe to the
connection associated with the old host instead of the new one. If
you send it to the new connection, we will fail to detect that the
old host is no longer responding and hence that it should be removed.
This should solve the 55 second delay problem seen from clients with
Uuids that move addresses or sit behind a NAT.
When we discover a new address for an existing host we can take the
opportunity to cleanup the hash table and the interface list if the
new address differs from an existing address only by the port number.
In that case we know the client is communicating to us from behind a
NAT and the old addr/port number combination is no longer going to
be of use to us.
Fix two bugs reported via Windows Crash Reporting:
* Freelance initialization is somehow broken allowing the number of
locally defined mountpoints to become negative. Due to the use of
!= instead of < in loops, it is possible to read/write unallocated
memory.
* GetTextualSid() was not properly handling a NULL output buffer
pointer as an indication that the desired size should be returned.
* fix LogoffPreserveTokens to work in the correct direction
* modify behavior to avoid domain controller queries when integrated
logon is disabled or the logon account is local
* cell names must be treated as case insensitive
* smb logoff messages do not mean the user is logging off the machine.
do not use as an indication that tokens should be destroyed
* use the correct lock and avoid a deadlock when handling dead VCs
* add port numbers to Host addresses so we can distinguish clients behind
NATs
* make messages consistent with regards to case and punctuation of
"Host x.x.x.x:y"
* convert hex addresses to dotted notation
* remove all references to 'dead_vcp'; cleanup smb_vc_t's as soon as
we know they are dead
* add mx holds across the cm_cell_t updates
* add cm_FindSCacheParent() and remove duplicate code elsewhere
* add mx holds across scp->flags updates
* add cm_CleanFile()
* clear CM_SCACHEFLAG_CALLBACK when discarding callbacks
* fix smb fid wrapping. wrap at 0xFFFF instead of 0 because 0xFFFF
is -1 which is INVALID_HANDLE
* add missing mx holds around vcp->flags updates
*Includes the changes from STABLE14-windows-smb_fid_t-audit-20060125
as well:
"Further testing revealed that some smb_vc_t objects could not be freed
because the associated smb_fid_t objects never reached a zero refcount.
Additional auditing uncovered cases in which there were holds not being
released and others in which they were released to many times. This
patch fixes the problems and improves auditability by modifying the
behavior of the smb_IoctlXXX() functions to not release a reference
that was obtained by the caller. Now the caller releases the reference."
Fixup token deletion logic
Surround all references to smb_fid_t flags and other references
by obtaining and releasing the 'mx' lock.