Author: delphij
Date: Wed Jul 31 07:06:58 2013
New Revision: 253833
URL: http://svnweb.freebsd.org/changeset/base/253833

Log:
  Resolve fflag with realpath().
  
  MFC after:    2 weeks

Modified:
  head/sbin/mdconfig/mdconfig.c

Modified: head/sbin/mdconfig/mdconfig.c
==============================================================================
--- head/sbin/mdconfig/mdconfig.c       Wed Jul 31 06:23:10 2013        
(r253832)
+++ head/sbin/mdconfig/mdconfig.c       Wed Jul 31 07:06:58 2013        
(r253833)
@@ -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"))
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to