Date: Sat, 14 Aug 1999 13:29:43 -0700 (PDT) From: adrian@freebsd.org To: FreeBSD-gnats-submit@freebsd.org Subject: bin/13143: changing mount flags on a mounted filesystem not in fstab segfaults mount(8) Message-ID: <199908142029.NAA50837@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 13143 >Category: bin >Synopsis: changing mount flags on a mounted filesystem not in fstab segfaults mount(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: Sat Aug 14 13:30:01 PDT 1999 >Closed-Date: >Last-Modified: >Originator: Adrian Chadd >Release: FreeBSD 4.0-CURRENT i386 >Organization: bin >Environment: FreeBSD ywing.m2.ip.versatel.net 4.0-CURRENT FreeBSD 4.0-CURRENT #6: Fri Aug 13 20:09:12 CEST 1999 >Description: When you attempt to modify the mount flags of a mounted filesystem NOT in /etc/fstab, you segfault mount. >How-To-Repeat: $ /sbin/mount -u -o rw /mnt Segmentation fault - core dumped >Fix: Fix update_options to not strdup() a NULL string - Index: mount.c =================================================================== RCS file: /home/ncvs/src/sbin/mount/mount.c,v retrieving revision 1.31 diff -u -r1.31 mount.c --- mount.c 1999/05/07 05:31:00 1.31 +++ mount.c 1999/08/14 20:16:04 @@ -594,7 +594,11 @@ if (opts == NULL) return strdup(""); - fstab = strdup(fstab); + if (fstab == NULL) { + fstab = strdup(""); + } else { + fstab = strdup(fstab); + } /* remove meta options from list */ remopt(fstab, MOUNT_META_OPTION_FSTAB); >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?199908142029.NAA50837>