mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 07:20:11 +00:00
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 <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
This commit is contained in:
parent
9db8b123e4
commit
fb623d5da3
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user