diff options
| author | Poul-Henning Kamp <phk@FreeBSD.org> | 1999-10-09 11:54:14 +0000 |
|---|---|---|
| committer | Poul-Henning Kamp <phk@FreeBSD.org> | 1999-10-09 11:54:14 +0000 |
| commit | 73dd3167345391095dd7c75aefa870a5bce92397 (patch) | |
| tree | 33cadf04c808cb0644aedaa306f8f3c0987ba3fe /sbin/mount_std | |
| parent | 1d64c295bbdb773ca3d62cdb5a9eec06e12799c8 (diff) | |
Notes
Diffstat (limited to 'sbin/mount_std')
| -rw-r--r-- | sbin/mount_std/mount_std.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sbin/mount_std/mount_std.c b/sbin/mount_std/mount_std.c index 2d2c5a2670f3..2a95764d8542 100644 --- a/sbin/mount_std/mount_std.c +++ b/sbin/mount_std/mount_std.c @@ -71,6 +71,7 @@ main(argc, argv) char *argv[]; { int ch, mntflags; + char mntpath[MAXPATHLEN]; struct vfsconf vfc; int error; @@ -116,7 +117,10 @@ main(argc, argv) if (error) errx(EX_OSERR, "%s filesystem not available", fsname); - if (mount(vfc.vfc_name, argv[1], mntflags, NULL)) + /* resolve the mountpoint with realpath(3) */ + (void)checkpath(argv[1], mntpath); + + if (mount(vfc.vfc_name, mntpath, mntflags, NULL)) err(EX_OSERR, NULL); exit(0); } |
