Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 May 1999 03:30:03 -0700 (PDT)
From:      David Malone <dwmalone@maths.tcd.ie>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/6399: [PATCH] When using "-u" mount doesn't start from the fstab options 
Message-ID:  <199905051030.DAA03183@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/6399; it has been noted by GNATS.

From: David Malone <dwmalone@maths.tcd.ie>
To: jkoshy@freebsd.org
Cc: Freebsd-gnats-submit@freebsd.org
Subject: Re: bin/6399: [PATCH] When using "-u" mount doesn't start from the fstab options 
Date: Wed, 05 May 1999 11:23:05 +0100

 > A late followup (better late than never!) with some review comments:
 
 ;-)
 I was working up to re-doing it for current again and then complaining
 bitterly!
 
 > 230         if ((fs = getfsfile(mntbuf->f_mntonname)) != NULL)
 > 231                 mntfromname = fs->fs_spec;
 > 232         else
 > 233                 mntfromname = mntbuf->f_mntfromname;
 > 234         options = update_options(options,fs->fs_mntops,mntbuf->f_flags);
 > 
 > We have a null pointer deference here if `getfsfile()' on line 230 returns
 > NULL.
 
 Grand - I'll have a look at this one - should be easy enough to fix.
 
 > 606                 strcpy(tmpopt,"no");
 > 607                 strcat(tmpopt,o);
 > 608                 remopt(newopt,tmpopt);
 > 609                 free(tmpopt);
 > 610
 > 611                 if (strncmp("no",o,2) == 0) remopt(newopt,o+2); 
 > 
 > Lines 606--608 are redundant if the option has a 'no' prefix; e.g:-
 > "nofoo".  In this case the `remopt()' call gets called with `nonofoo'
 > and is effectively a noop.  Shouldn't we be removing option 'foo' from
 > the `newopt' list instead?
 
 We remove "foo" on line 611. I think I was worried about options like "notice"
 and its obvious inverse "nonotice", it has the less obvious inverse "tice"
 which hopefully wouldn't be a distinct option.
 
 I'll produce a version for -current of today with the NULL pointer
 dereference fixed and send it later today.
 
 	David.
 


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?199905051030.DAA03183>