aboutsummaryrefslogtreecommitdiff
path: root/sbin/mount_portalfs/mount_portalfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/mount_portalfs/mount_portalfs.c')
-rw-r--r--sbin/mount_portalfs/mount_portalfs.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sbin/mount_portalfs/mount_portalfs.c b/sbin/mount_portalfs/mount_portalfs.c
index c0b1852a44b3..48cf609df74e 100644
--- a/sbin/mount_portalfs/mount_portalfs.c
+++ b/sbin/mount_portalfs/mount_portalfs.c
@@ -105,7 +105,7 @@ main(argc, argv)
struct portal_args args;
struct sockaddr_un un;
char *conf;
- char *mountpt;
+ char mountpt[MAXPATHLEN];
int mntflags = 0;
char tag[32];
struct vfsconf vfc;
@@ -142,7 +142,9 @@ main(argc, argv)
* Get config file and mount point
*/
conf = argv[optind];
- mountpt = argv[optind+1];
+
+ /* resolve the mountpoint with realpath(3) */
+ (void)checkpath(argv[optind+1], mountpt);
/*
* Construct the listening socket