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 /usr.sbin | |
parent | 1d64c295bbdb773ca3d62cdb5a9eec06e12799c8 (diff) | |
download | src-73dd3167345391095dd7c75aefa870a5bce92397.tar.gz src-73dd3167345391095dd7c75aefa870a5bce92397.zip |
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
Notes
Notes:
svn path=/head/; revision=52055
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/mount_portalfs/mount_portalfs.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/mount_portalfs/mount_portalfs.c b/usr.sbin/mount_portalfs/mount_portalfs.c index c0b1852a44b3..48cf609df74e 100644 --- a/usr.sbin/mount_portalfs/mount_portalfs.c +++ b/usr.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 |