aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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"))