correct precedence of && and || in conditional to determine when
tkt_DecodeTicket5() should be called.
optimize order of ticket property evaluation to delay call to get_key()
which will require that a lock be obtained until after we know that
all of the other checks will succeed.
(cherry picked from commit a2530f03bacc9d9115782b49bda40fc01294a70d)
remove a race condition between h_TossStuff_r and SRXAFS_FlushCPS by
changing h_ID2Client to return the client with a refcount and then
release the refCount with PutClient.
when the CPS list is non-NULL and the viceid is ANONYMOUSID be sure
to set the prlist_val to NULL if the prlist_len is being set to 0
since all of the tests are performed on prlist_val
(cherry picked from commit 4808977d7d0e49e5d260a26113fd97cb48d5f844)
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)