From cjc@cc942873-a.ewndsr1.nj.home.com  Mon Mar 13 19:27:40 2000
Return-Path: <cjc@cc942873-a.ewndsr1.nj.home.com>
Received: from cc942873-a.ewndsr1.nj.home.com (cc942873-a.ewndsr1.nj.home.com [24.2.89.207])
	by hub.freebsd.org (Postfix) with ESMTP id 81B5737B6C1
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 13 Mar 2000 19:27:27 -0800 (PST)
	(envelope-from cjc@cc942873-a.ewndsr1.nj.home.com)
Received: (from cjc@localhost)
	by cc942873-a.ewndsr1.nj.home.com (8.9.3/8.9.3) id WAA97349;
	Mon, 13 Mar 2000 22:27:22 -0500 (EST)
	(envelope-from cjc)
Message-Id: <200003140327.WAA97349@cc942873-a.ewndsr1.nj.home.com>
Date: Mon, 13 Mar 2000 22:27:22 -0500 (EST)
From: "Crist J. Clark" <cjc@cc942873-a.ewndsr1.nj.home.com>
Reply-To: cjc@cc942873-a.ewndsr1.nj.home.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: Bad error messaging from mountd(8)
X-Send-Pr-Version: 3.2

>Number:         17368
>Category:       bin
>Synopsis:       Bad error messaging from mountd(8)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    billf
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar 13 19:30:01 PST 2000
>Closed-Date:    Tue Jun 19 17:16:28 PDT 2001
>Last-Modified:  Tue Jun 19 17:20:31 PDT 2001
>Originator:     Crist J. Clark
>Release:        FreeBSD 3.4-STABLE i386
>Organization:
>Environment:

	FreeBSD 3.4-STABLE

>Description:

	mountd(8) can produce error messages like,

  mountd[389]: -mask requires -net

However, '-net' is not a legal mountd(8) option either. Only
'-network' and '-n' are. If you use '-net' you get,

  mountd[390]: bad opt net

>How-To-Repeat:

	Try an export line,

 /usr/obj -net 192.168.128.0 -mask 255.255.255.0

And you get the error above.

>Fix:
	
	Either let mountd(8) take a '-net' option,

--- /usr/src/sbin/mountd/mountd.c       Fri Nov 26 04:02:08 1999
+++ mountd.c    Mon Mar 13 22:24:33 2000
@@ -1399,7 +1399,7 @@
                        usedarg++;
                        opt_flags |= OP_MASK;
                } else if (cpoptarg && (!strcmp(cpopt, "network") ||
-                       !strcmp(cpopt, "n"))) {
+                       !strcmp(cpopt, "net") || !strcmp(cpopt, "n"))) {
                        if (grp->gr_type != GT_NULL) {
                                syslog(LOG_ERR, "network/host conflict");
                                return (1);

Or produce the correct error messages,

--- /usr/src/sbin/mountd/mountd.c       Fri Nov 26 04:02:08 1999
+++ mountd.c    Mon Mar 13 22:25:38 2000
@@ -2142,11 +2142,11 @@
            return (1);
        }
        if ((opt_flags & OP_MASK) && (opt_flags & OP_NET) == 0) {
-           syslog(LOG_ERR, "-mask requires -net");
+           syslog(LOG_ERR, "-mask requires -network");
            return (1);
        }
        if ((opt_flags & (OP_NET | OP_ISO)) == (OP_NET | OP_ISO)) {
-           syslog(LOG_ERR, "-net and -iso mutually exclusive");
+           syslog(LOG_ERR, "-network and -iso mutually exclusive");
            return (1);
        }
        if ((opt_flags & OP_ALLDIRS) && dp->dp_left) {




>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->billf 
Responsible-Changed-By: billf 
Responsible-Changed-When: Mon Mar 13 19:35:40 PST 2000 
Responsible-Changed-Why:  
I got really mad at mountd the other day and have some patches 
that make error message more verbose. I'll add these to my patch set. 
State-Changed-From-To: open->closed 
State-Changed-By: billf 
State-Changed-When: Tue Jun 19 17:16:28 PDT 2001 
State-Changed-Why:  
fixed by iedowse in src/sbin/mountd/mountd.c:1.48 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=17368 
>Unformatted:
