Date: Wed, 28 Aug 1996 19:30:15 +0900 From: Toshihiro Kanda <candy@fct.kgc.co.jp> To: freebsd-hackers@freebsd.org Subject: mountd(8) bug? Message-ID: <199608281030.TAA00792@xxx.fct.kgc.co.jp>
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<----------
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199608281030.TAA00792>
