From: Christof Hanke Date: Fri, 13 Sep 2013 09:47:08 +0000 (+0200) Subject: afsd: check if mountdir is an absolute path X-Git-Tag: openafs-stable-1_8_0pre1~1006 X-Git-Url: http://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=fb623d5da30e6d304f672d8485da2e1781afa5df 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 --- diff --git a/src/afsd/afsd_kernel.c b/src/afsd/afsd_kernel.c index 7800fcb..a58be2c 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; }