From: Derrick Brashear Date: Wed, 12 Jan 2011 21:45:57 +0000 (-0500) Subject: afsd: CellItems doesn't apply to memcache mode X-Git-Tag: upstream/1.6.0.pre2^2~141 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=b7bd939f53dfa54d9c7c94b13691a13235aa7020;p=packages%2Fo%2Fopenafs.git afsd: CellItems doesn't apply to memcache mode avoid a potential panic from passing a bogus path into the kernel for evaluation, in memcache mode. Reviewed-on: http://gerrit.openafs.org/3651 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 6edcb1830480ef55d9dcb8a3b4735c30d802cbe4) Change-Id: I570372cae294b8060fbd77ed58939129ad56dd5d Reviewed-on: http://gerrit.openafs.org/3678 Tested-by: BuildBot Reviewed-by: Derrick Brashear --- diff --git a/src/afsd/afsd.c b/src/afsd/afsd.c index 451015d4e..90a4cdbe3 100644 --- a/src/afsd/afsd.c +++ b/src/afsd/afsd.c @@ -2302,10 +2302,12 @@ afsd_run(void) * Pass the kernel the name of the workstation cache file holding the * cell information. */ - if (afsd_debug) - printf("%s: Calling AFSOP_CELLINFO: cell info file is '%s'\n", rn, - fullpn_CellInfoFile); - afsd_call_syscall(AFSOP_CELLINFO, fullpn_CellInfoFile); + if (!(cacheFlags & AFSCALL_INIT_MEMCACHE)) { + if (afsd_debug) + printf("%s: Calling AFSOP_CELLINFO: cell info file is '%s'\n", rn, + fullpn_CellInfoFile); + afsd_call_syscall(AFSOP_CELLINFO, fullpn_CellInfoFile); + } if (rxmaxmtu) { if (afsd_verbose)