]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
viced: Print a warning when using a deleted client
authorAndrew Deason <adeason@sinenomine.net>
Sat, 23 Apr 2011 21:44:41 +0000 (16:44 -0500)
committerDerrick Brashear <shadow@dementia.org>
Tue, 3 May 2011 02:17:56 +0000 (19:17 -0700)
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.

Reviewed-on: http://gerrit.openafs.org/4529
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 8b07814e037d19dc9868dd202e82d69b96fbdcae)

Change-Id: I0b1d9fe46e5b83b93b59ff6facc2421db9136c12
Reviewed-on: http://gerrit.openafs.org/4533
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
src/viced/host.c

index 92baaa4c71beee4084b4cb06207237668a1336a3..2e83476700010a7787bfb3a4008a8dd3c415754c 100644 (file)
@@ -2665,6 +2665,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;