Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Mar 2000 22:27:22 -0500 (EST)
From:      "Crist J. Clark" <cjc@cc942873-a.ewndsr1.nj.home.com>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/17368: Bad error messaging from mountd(8)
Message-ID:  <200003140327.WAA97349@cc942873-a.ewndsr1.nj.home.com>

next in thread | raw e-mail | index | archive | help
>Number:         17368
>Category:       bin
>Synopsis:       Bad error messaging from mountd(8)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar 13 19:30:01 PST 2000
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




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