From 5a5128939bbec76818fc22d024d3601463c9be99 Mon Sep 17 00:00:00 2001 From: tedu Date: Mon, 19 May 2014 13:43:30 +0000 Subject: [PATCH] as reported by Helg, should use realpath for mounts. ok guenther syl --- lib/libfuse/fuse.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/libfuse/fuse.c b/lib/libfuse/fuse.c index 6d8b5cdc0b8..16d9376e6ce 100644 --- a/lib/libfuse/fuse.c +++ b/lib/libfuse/fuse.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fuse.c,v 1.21 2014/03/24 07:24:32 syl Exp $ */ +/* $OpenBSD: fuse.c,v 1.22 2014/05/19 13:43:30 tedu Exp $ */ /* * Copyright (c) 2013 Sylvestre Gallon * @@ -153,7 +153,7 @@ fuse_mount(const char *dir, unused struct fuse_args *args) if (fc == NULL) return (NULL); - fc->dir = strdup(dir); + fc->dir = realpath(dir, NULL); if (fc->dir == NULL) goto bad; @@ -163,7 +163,7 @@ fuse_mount(const char *dir, unused struct fuse_args *args) } fargs.fd = fc->fd; - if (mount(MOUNT_FUSEFS, dir, 0, &fargs)) { + if (mount(MOUNT_FUSEFS, fc->dir, 0, &fargs)) { switch (errno) { case EMFILE: errcause = "mount table full"; -- 2.20.1