From fb623d5da30e6d304f672d8485da2e1781afa5df Mon Sep 17 00:00:00 2001 From: Christof Hanke Date: Fri, 13 Sep 2013 11:47:08 +0200 Subject: [PATCH] afsd: check if mountdir is an absolute path if the mountdir in the cacheinfo file is not absolute, it can confuse commands like "df". Thus, force it to be absolute. Change-Id: Idb098b7c83fef6931fe71dd53a85569a953e5e3f Reviewed-on: http://gerrit.openafs.org/10250 Tested-by: BuildBot Reviewed-by: Derrick Brashear --- src/afsd/afsd_kernel.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/afsd/afsd_kernel.c b/src/afsd/afsd_kernel.c index 7800fcbad9..a58be2c439 100644 --- a/src/afsd/afsd_kernel.c +++ b/src/afsd/afsd_kernel.c @@ -555,6 +555,9 @@ afsd_check_mount(const char *rn, const char *mountdir) } else if (!S_ISDIR(statbuf.st_mode)) { printf("%s: Mountpoint %s is not a directory.\n", rn, mountdir); return -1; + } else if (mountdir[0] != '/') { + printf("%s: Mountpoint %s is not an absolute path.\n", rn, mountdir); + return -1; } return 0; }