]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
afsd: CellItems doesn't apply to memcache mode
authorDerrick Brashear <shadow@dementia.org>
Wed, 12 Jan 2011 21:45:57 +0000 (16:45 -0500)
committerDerrick Brashear <shadow@dementia.org>
Tue, 18 Jan 2011 19:07:17 +0000 (11:07 -0800)
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 <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 6edcb1830480ef55d9dcb8a3b4735c30d802cbe4)

Change-Id: I570372cae294b8060fbd77ed58939129ad56dd5d
Reviewed-on: http://gerrit.openafs.org/3678
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
src/afsd/afsd.c

index 451015d4e0d4eac68310b66828e6c4a6e6b77ce1..90a4cdbe33ca03cbb5b762d8647a0ce9c2f747db 100644 (file)
@@ -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)