Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Mar 1997 15:57:31 -0500 (EST)
From:      Louis Mamakos <louie@TransSys.COM>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/3027: error in getmntops.c parsing 'port=' type arguments
Message-ID:  <199703182057.PAA07772@whizzo.transsys.com>
Resent-Message-ID: <199703182100.NAA27924@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         3027
>Category:       bin
>Synopsis:       error parsing mount options which include an '=' parameter
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Mar 18 13:00:02 PST 1997
>Last-Modified:
>Originator:     Louis A. Mamakos
>Organization:
>Release:        FreeBSD 3.0-CURRENT i386
>Environment:

Nothing special; try mounting an NFS server at a non-standard port number,
such as when using cfs (crypto file system)

>Description:

When upgrading to 3.0-CURRENT, noticed that Matt Blaze's cfs (encrypted
file system) stopped working, due to not being able to mount an nfs server
at a non-standard port number.	

>How-To-Repeat:

Try typing this:

    mount -t nfs -o port=3049,intr localhost:/null /crypt  

and notice you get an 'invalid' parameter error.

>Fix:
	
This patch, or alternatively, don't include the '=' in the option
name in sbin/mount_nfs/mount_nfs.c; not sure what's exactly intended.

Index: sbin/mount/getmntopts.c
===================================================================
RCS file: /usr/local/FreeBSD/cvs/src/sbin/mount/getmntopts.c,v
retrieving revision 1.4
diff -u -r1.4 getmntopts.c
--- getmntopts.c	1997/03/11 12:27:56	1.4
+++ getmntopts.c	1997/03/18 20:45:27
@@ -78,7 +78,7 @@
 		 */
 		p = strchr(opt, '=');
 		if (p)
-			 *p = '\0';
+			 *++p = '\0';
 
 		/* Scan option table. */
 		for (m = m0; m->m_option != NULL; ++m) {

>Audit-Trail:
>Unformatted:



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