diff options
author | phk <phk@FreeBSD.org> | 1999-10-09 11:54:14 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1999-10-09 11:54:14 +0000 |
commit | 41c4f3920e76ddd3b3a183fc18e6e0834a26086b (patch) | |
tree | 90d36f2866e2e9c8c9fe890230d8240ed54253f1 /sbin/mount_std | |
parent | 977cb3153eec3286210df53421e8494748c21d3a (diff) | |
download | FreeBSD-src-41c4f3920e76ddd3b3a183fc18e6e0834a26086b.zip FreeBSD-src-41c4f3920e76ddd3b3a183fc18e6e0834a26086b.tar.gz |
mount* fixes from Martin Blapp <mb@imp.ch>:
Made mount more userfriendly (bad slashes are now filtered out)
and we remove in mount_nfs trailing slashes if there are any.
Fixed mount_xxx binarys to resolve with realpath(3)
the mountpoint.
Translate the deprecated nfs-syntax with '@' to ':' .
The ':' syntax has now precedence, but '@' still works.
Notify the user that the '@' syntax should not be used.
PR: 7846
PR: 13692
Submitted by: Martin Blapp <mb@imp.ch>
Reviewed by: phk
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 2d2c5a2..2a95764 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); } |