undo damage caused by an inadvertent pullup of code that caused all
servers to be marked down once every two hours. They would remain
down for one CheckDownServersInterval after the first contact to the
cell.
FIXES 26967
A crucial line was missing from DELTA viced-fix-check-rights-race-20060213
(cherry picked from commit 79cfa471a719b9b270f5d1fa1bbd25c1be8e1fd7)
Deal with the fact that Windows returns WSAECONNRESET after an ICMP
port not reachable packet was returned in response to a packet previously
sent.
(cherry picked from commit e1f4dd1c26a1fedb637ed754644f8c141fa4c0db)
avoid a potential refcount decrement "leak" (well, the opposite, really) when a mkdir fails
(cherry picked from commit 33d58440d1fa3938ff627e888537c367d06b1bf9)
Add locks around writes to the audit log. This ensures two writes
do not interleave.
(cherry picked from commit 6f82595a16750a3811526da9b4376a178e90bb49)
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.
(cherry picked from commit 6c7a2901b00ae2f7df0bdff23b19fdd3b7f35156)
don't remove an entry from the queue and add it to the head if it already
is the head.
(cherry picked from commit bfdc909b5477e493656b3e9fb744fdf5cd16e179)
when adding a new server, mark it down to start.
this will allow the Ping to use the short timeout when checking the real
status.
(cherry picked from commit 8a6bfc54e5ff81bea0b78b45986f5115b2978adc)
several race conditions were introduced over the last couple of weeks.
let's fix them.
(cherry picked from commit d9d798f78617026349e3c087c714e474e9eb2b7f)
protect against the case in which the vcp->fidsp list is empty
which de-queuing smb_fid_t objects
(cherry picked from commit 81cfded7dbdf25d774375719ce02ebbfe698d77c)
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.
(cherry picked from commit 0c77d5332da76d223b007f8e85e8d81148b17737)
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.
(cherry picked from commit e4c21e9c6fe4a030cf271b614d8e3d78130e4fc9)
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.
(cherry picked from commit 77de32ed745d912e35990c5602b4a69a1b654973)
* AFS_Logoff_Event must destroy tokens even if integrated logon is not
being used unless LogoffPreserveTokens is non-zero
(cherry picked from commit 18e7ef272ab4efbd599c5d10174f0afd87c57c2e)
* 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
(cherry picked from commit f213588374ab92e27bb524cd747152270f9290ca)
* 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
(cherry picked from commit 22b02189ecc70a94410fb1648da987d0964ddcaf)
* 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
(cherry picked from commit 04c3d3cc3900914725c479b993a6313b0ef29e3f)