path: root/usr.sbin
diff options
authorRobert Wing <rew@FreeBSD.org>2021-02-17 09:22:23 +0000
committerRobert Wing <rew@FreeBSD.org>2021-02-17 10:02:56 +0000
commit63640b2f552c0476f50484635eb9888eafcd22dc (patch)
tree971bae5379a64b7d5ace47284598994223a2096d /usr.sbin
parent02af91c52e71e8a0f47251e637c9687f35d45dd9 (diff)
automount(8): fix absolute path when creating a mountpoint
When executing automount(8), it will attempt to create the directory where an autofs filesystem is to be mounted. Explicity set the root path for this directory to "/". This fixes the issue where the directory being created was being treated as a relative path instead of an absolute path (as expected). PR: 224601 Reported by: kusumi.tomohiro@gmail.com Reviewed by: trasz MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D27832
Diffstat (limited to 'usr.sbin')
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/autofs/common.c b/usr.sbin/autofs/common.c
index a6ed90909ec9..7c8df4205a86 100644
--- a/usr.sbin/autofs/common.c
+++ b/usr.sbin/autofs/common.c
@@ -140,7 +140,7 @@ create_directory(const char *path)
copy = tofree = checked_strdup(path + 1);
- partial = checked_strdup("");
+ partial = checked_strdup("/");
for (;;) {
component = strsep(&copy, "/");
if (component == NULL)