Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 May 2010 01:18:13 +0000 (UTC)
From:      Rick Macklem <rmacklem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r208176 - stable/8/usr.sbin/mountd
Message-ID:  <201005170118.o4H1IDeI072097@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rmacklem
Date: Mon May 17 01:18:12 2010
New Revision: 208176
URL: http://svn.freebsd.org/changeset/base/208176

Log:
  MFC: r207689
  If the "-alldirs" export option was used for the V4: line, mountd
  would crash in check_options() since dp == NULL for the V4: line.
  This patch moves the check for options allowed on the V4: line to
  ahead of where dp is used to avoid this crash.

Modified:
  stable/8/usr.sbin/mountd/mountd.c
Directory Properties:
  stable/8/usr.sbin/mountd/   (props changed)

Modified: stable/8/usr.sbin/mountd/mountd.c
==============================================================================
--- stable/8/usr.sbin/mountd/mountd.c	Sun May 16 23:45:10 2010	(r208175)
+++ stable/8/usr.sbin/mountd/mountd.c	Mon May 17 01:18:12 2010	(r208176)
@@ -2881,16 +2881,16 @@ check_options(dp)
 		syslog(LOG_ERR, "-mask and /masklen are mutually exclusive");
 		return (1);
 	}
-	if ((opt_flags & OP_ALLDIRS) && dp->dp_left) {
-	    syslog(LOG_ERR, "-alldirs has multiple directories");
-	    return (1);
-	}
 	if (v4root_phase > 0 &&
 	    (opt_flags &
 	     ~(OP_SEC | OP_MASK | OP_NET | OP_HAVEMASK | OP_MASKLEN)) != 0) {
 	    syslog(LOG_ERR,"only -sec,-net,-mask options allowed on V4:");
 	    return (1);
 	}
+	if ((opt_flags & OP_ALLDIRS) && dp->dp_left) {
+	    syslog(LOG_ERR, "-alldirs has multiple directories");
+	    return (1);
+	}
 	return (0);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201005170118.o4H1IDeI072097>