diff options
author | dds <dds@FreeBSD.org> | 2005-03-11 07:50:09 +0000 |
---|---|---|
committer | dds <dds@FreeBSD.org> | 2005-03-11 07:50:09 +0000 |
commit | fcf4fb8cca8074ea3918b168763e330c7c336f9c (patch) | |
tree | 19845c469a4510b8fd0911b690e1dd49b2c8eaae /usr.sbin/mount_portalfs | |
parent | 904377a8e5db4840c2371d921f42c8cb75e33a9f (diff) | |
download | FreeBSD-src-fcf4fb8cca8074ea3918b168763e330c7c336f9c.zip FreeBSD-src-fcf4fb8cca8074ea3918b168763e330c7c336f9c.tar.gz |
Ensure the configuration file is given with an absolute file path.
Diffstat (limited to 'usr.sbin/mount_portalfs')
-rw-r--r-- | usr.sbin/mount_portalfs/mount_portalfs.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/usr.sbin/mount_portalfs/mount_portalfs.c b/usr.sbin/mount_portalfs/mount_portalfs.c index 49a11d0..376e827 100644 --- a/usr.sbin/mount_portalfs/mount_portalfs.c +++ b/usr.sbin/mount_portalfs/mount_portalfs.c @@ -136,6 +136,12 @@ main(argc, argv) * Get config file and mount point */ conf = argv[optind]; + if (conf[0] != '/') { + (void)fprintf(stderr, + "The configuration file must be specified" + "through an absolute file path.\n"); + exit(EX_USAGE); + } /* resolve the mountpoint with realpath(3) */ (void)checkpath(argv[optind+1], mountpt); |