summaryrefslogtreecommitdiffstats
path: root/sbin/mdconfig
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2013-07-31 07:06:58 +0000
committerdelphij <delphij@FreeBSD.org>2013-07-31 07:06:58 +0000
commite07cc719808308b44f63f6fd6236d4580948b5e7 (patch)
treec54562c747f73f6ea0f5b30a9057ef28ca301896 /sbin/mdconfig
parent4c91eadf3ebae2c3ec2c806e5db307fbda276d79 (diff)
downloadFreeBSD-src-e07cc719808308b44f63f6fd6236d4580948b5e7.zip
FreeBSD-src-e07cc719808308b44f63f6fd6236d4580948b5e7.tar.gz
Resolve fflag with realpath().
MFC after: 2 weeks
Diffstat (limited to 'sbin/mdconfig')
-rw-r--r--sbin/mdconfig/mdconfig.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sbin/mdconfig/mdconfig.c b/sbin/mdconfig/mdconfig.c
index 6ba4cd6..233058d 100644
--- a/sbin/mdconfig/mdconfig.c
+++ b/sbin/mdconfig/mdconfig.c
@@ -161,7 +161,9 @@ main(int argc, char **argv)
case 'f':
if (fflag != NULL)
errx(1, "-f can be passed only once");
- fflag = optarg;
+ fflag = realpath(optarg, NULL);
+ if (fflag == NULL)
+ err(1, "realpath");
break;
case 'o':
if (!strcmp(optarg, "async"))
OpenPOWER on IntegriCloud