getcapabilities avoid panic when cell is not filled

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>
This commit is contained in:
Derrick Brashear 2010-05-24 16:12:24 -04:00
parent dd7b9235e6
commit 2f0998ff13

View 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;