From 71588156cc3061c6dfb4c6a84029e8dcf4f723a1 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Mon, 19 May 2014 13:43:31 +0000 Subject: as reported by Helg, should use realpath for mounts. ok guenther syl --- lib/libfuse/fuse.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/libfuse') 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"; -- cgit v1.2.3