Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Aug 1996 11:00:11 -0400
From:      dennis@etinc.com (Dennis)
To:        Toshihiro Kanda <candy@fct.kgc.co.jp>
Cc:        hackers@freebsd.org
Subject:   Re: mountd(8) bug?
Message-ID:  <199608281500.LAA12238@etinc.com>

next in thread | raw e-mail | index | archive | help
>  Hello, hackers.  I found that mountd(8) dumpes core by certain
>(bogus) exports file.  For example:
>
>| $ uname -srm
>| FreeBSD 2.1.5-RELEASE i386
>
>| $ cat /tmp/bogus-exoprts
>| /cdrom -network 192.168.1 192.168.8
>
>| $ /sbin/mountd -d /tmp/bogus-exports
>| Getting export list.
>| Got line /cdrom -network 192.168.1 192.168.8
>| Making new ep fs=0x400,0x1
>| doing opt -network 192.168.1 192.168.8
>| Segmentation fault (core dumped)
>
>  I hope the following patch will fix this problem.  New mountd now
>shows:
>
>| $ /usr/src/sbin/mountd/obj/mountd -d /tmp/bogus-export 
>| Getting export list.
>| Got line /cdrom -network 192.168.1 192.168.8
>| Making new ep fs=0x400,0x1
>| doing opt -network 192.168.1 192.168.8
>| got host 192.168.8
>| Getting mount list.
>| Here we go.
>
>And syslogd(8) logs:
>| Aug 28 19:22:19 xxx mountd[723]: Bad exports list line /cdrom -network
192.168.1 192.168.8
>
>  Is this correct?
>
>candy@fct.kgc.co.jp (Toshihiro Kanda)
>
>----------8<----------8<----------8<----------8<----------
>*** mountd.c.orig	Thu Jan 11 09:12:45 1996
>--- mountd.c	Wed Aug 28 18:15:00 1996
>***************
>*** 1346,1352 ****
>           */
>          checkgrp = tgrp;
>          while (checkgrp) {
>!                 if (checkgrp->gr_ptr.gt_hostent != NULL &&
>                      !strcmp(checkgrp->gr_ptr.gt_hostent->h_name,
hp->h_name)) {
>                          grp->gr_type = GT_IGNORE;
>  			return(0);
>--- 1346,1353 ----
>           */
>          checkgrp = tgrp;
>          while (checkgrp) {
>!                 if (checkgrp->gr_type == GT_HOST &&
>!                     checkgrp->gr_ptr.gt_hostent != NULL &&
>                      !strcmp(checkgrp->gr_ptr.gt_hostent->h_name,
hp->h_name)) {
>                          grp->gr_type = GT_IGNORE;
>  			return(0);
>----------8<----------8<----------8<----------8<----------
>

If you really feel ambitious....the "bug" that causes mountd to hang on boot
for a long
period of time when an export entry is not reachable is realllllllllly
annoying also.

Dennis
----------------------------------------------------------------------------
Emerging Technologies, Inc.      http://www.etinc.com

Synchronous Communications Cards and Routers For
Discriminating Tastes. 56k to T1 and beyond. Frame
Relay, PPP, HDLC, and X.25 for BSD/OS, FreeBSD 
and LINUX




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