aboutsummaryrefslogtreecommitdiff
path: root/sbin/mdconfig/mdconfig.c
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2013-07-31 07:06:58 +0000
committerXin LI <delphij@FreeBSD.org>2013-07-31 07:06:58 +0000
commitcab9f71ffeee157849da3af972fe29e4431aa3d9 (patch)
treec54562c747f73f6ea0f5b30a9057ef28ca301896 /sbin/mdconfig/mdconfig.c
parentcaa18d0c6c308471b39bee8f6d55980a49ea2dc0 (diff)
downloadsrc-cab9f71ffeee157849da3af972fe29e4431aa3d9.tar.gz
src-cab9f71ffeee157849da3af972fe29e4431aa3d9.zip
Resolve fflag with realpath().
MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=253833
Diffstat (limited to 'sbin/mdconfig/mdconfig.c')
-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 6ba4cd6e603d..233058d5d661 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"))