From 41c4f3920e76ddd3b3a183fc18e6e0834a26086b Mon Sep 17 00:00:00 2001 From: phk Date: Sat, 9 Oct 1999 11:54:14 +0000 Subject: mount* fixes from Martin Blapp : 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 Reviewed by: phk --- sbin/mount_nullfs/mount_nullfs.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'sbin/mount_nullfs') diff --git a/sbin/mount_nullfs/mount_nullfs.c b/sbin/mount_nullfs/mount_nullfs.c index a866e38..cf61208 100644 --- a/sbin/mount_nullfs/mount_nullfs.c +++ b/sbin/mount_nullfs/mount_nullfs.c @@ -97,11 +97,9 @@ main(argc, argv) if (argc != 2) usage(); - if (realpath(argv[0], target) == 0) - err(EX_OSERR, "%s", target); - - if (realpath(argv[1], source) == 0) - err(EX_OSERR, "%s", source); + /* resolve target and source with realpath(3) */ + (void)checkpath(argv[0], target); + (void)checkpath(argv[1], source); if (subdir(target, source) || subdir(source, target)) errx(EX_USAGE, "%s (%s) and %s are not distinct paths", -- cgit v1.1