From: Andrew Deason Date: Sat, 23 Apr 2011 21:44:41 +0000 (-0500) Subject: viced: Print a warning when using a deleted client X-Git-Tag: upstream/1.8.0_pre1^2~3827 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=8b07814e037d19dc9868dd202e82d69b96fbdcae;p=packages%2Fo%2Fopenafs.git viced: Print a warning when using a deleted client We should never get a deleted client back from GetClient. Log a message if we do, to explain why access may suddenly appear to fail, and assist in determining why. Note that we still try to service the request, since the accessing user may still have enough access to do whatever was requested. Change-Id: Ie1d0c2d8a33a68a760704bfff9f268c6c507118f Reviewed-on: http://gerrit.openafs.org/4529 Tested-by: BuildBot Reviewed-by: Derrick Brashear --- diff --git a/src/viced/host.c b/src/viced/host.c index f74de5619..6249ec513 100644 --- a/src/viced/host.c +++ b/src/viced/host.c @@ -2646,6 +2646,14 @@ GetClient(struct rx_connection *tcon, struct client **cp) H_UNLOCK; return VICETOKENDEAD; } + if (client->deleted) { + ViceLog(0, ("GetClient: got deleted client, this should not happen! " + "Connection will appear to have no rights; " + "tcon %p sid %d epoch %d client %p host %s:%d viceid %d\n", + tcon, (int)rxr_CidOf(tcon), (int)rxr_GetEpoch(tcon), client, + afs_inet_ntoa_r(client->host->host, hoststr), + (int)ntohs(client->host->port), (int)client->ViceId)); + } client->refCount++; *cp = client;