Clear the mount argument list before filling it in. This is the patch
from Michael Hitch in pr#1722. As noted in the pr, this may not be the most correct fix, but at least it prevents crashes.
This commit is contained in:
parent
a29aff2565
commit
15539710a0
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mountd.c,v 1.28 1995/11/06 07:00:07 thorpej Exp $ */
|
||||
/* $NetBSD: mountd.c,v 1.29 1995/11/16 04:34:13 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1993
|
||||
@ -46,7 +46,7 @@ static char copyright[] =
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)mountd.c 8.8 (Berkeley) 2/20/94";
|
||||
#else
|
||||
static char rcsid[] = "$NetBSD: mountd.c,v 1.28 1995/11/06 07:00:07 thorpej Exp $";
|
||||
static char rcsid[] = "$NetBSD: mountd.c,v 1.29 1995/11/16 04:34:13 thorpej Exp $";
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -650,6 +650,7 @@ get_exportlist()
|
||||
!strncmp(fsp->f_fstypename, MOUNT_MSDOS, MFSNAMELEN) ||
|
||||
!strncmp(fsp->f_fstypename, MOUNT_ADOSFS, MFSNAMELEN) ||
|
||||
!strncmp(fsp->f_fstypename, MOUNT_CD9660, MFSNAMELEN)) {
|
||||
bzero((char *)&targs, sizeof(targs));
|
||||
targs.ua.fspec = NULL;
|
||||
targs.ua.export.ex_flags = MNT_DELEXPORT;
|
||||
if (mount(fsp->f_fstypename, fsp->f_mntonname,
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mountd.c,v 1.28 1995/11/06 07:00:07 thorpej Exp $ */
|
||||
/* $NetBSD: mountd.c,v 1.29 1995/11/16 04:34:13 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1993
|
||||
@ -46,7 +46,7 @@ static char copyright[] =
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)mountd.c 8.8 (Berkeley) 2/20/94";
|
||||
#else
|
||||
static char rcsid[] = "$NetBSD: mountd.c,v 1.28 1995/11/06 07:00:07 thorpej Exp $";
|
||||
static char rcsid[] = "$NetBSD: mountd.c,v 1.29 1995/11/16 04:34:13 thorpej Exp $";
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -650,6 +650,7 @@ get_exportlist()
|
||||
!strncmp(fsp->f_fstypename, MOUNT_MSDOS, MFSNAMELEN) ||
|
||||
!strncmp(fsp->f_fstypename, MOUNT_ADOSFS, MFSNAMELEN) ||
|
||||
!strncmp(fsp->f_fstypename, MOUNT_CD9660, MFSNAMELEN)) {
|
||||
bzero((char *)&targs, sizeof(targs));
|
||||
targs.ua.fspec = NULL;
|
||||
targs.ua.export.ex_flags = MNT_DELEXPORT;
|
||||
if (mount(fsp->f_fstypename, fsp->f_mntonname,
|
||||
|
Loading…
Reference in New Issue
Block a user