getcapabilities avoid panic when cell is not filled
authorDerrick Brashear <shadow@dementia.org>
Mon, 24 May 2010 20:12:24 +0000 (16:12 -0400)
committerDerrick Brashear <shadow@dementia.org>
Mon, 24 May 2010 23:33:35 +0000 (16:33 -0700)
for a new server, getcapabilities is not safe, as cell may not be filled.

Change-Id: I0926034c1d9e9c8c08e7ca993de1bcef9c0de8cf
Reviewed-on: http://gerrit.openafs.org/2016
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

src/afs/afs_server.c

index 7b5949c..32c2891 100644 (file)
@@ -1696,7 +1696,7 @@ afs_GetCapabilities(struct server *ts)
     struct unixuser *tu;
     afs_int32 code;
 
-    if ( !ts )
+    if ( !ts || !ts->cell )
        return;
     if ( !afs_osi_credp )
        return;