Date: Wed, 5 May 1999 01:50:02 -0700 (PDT) From: <jkoshy@FreeBSD.org> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/6399: [PATCH] When using "-u" mount doesn't start from the fstab options Message-ID: <199905050850.BAA96636@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: <jkoshy@FreeBSD.org>
To: dwmalone@maths.tcd.ie
Cc: Freebsd-gnats-submit@freebsd.org
Subject: Re: bin/6399: [PATCH] When using "-u" mount doesn't start from the fstab options
Date: Wed, 5 May 1999 01:45:09 -0700 (PDT)
A late followup (better late than never!) with some review comments:
1 :::
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.
2 :::
602 for ( p = expopt; (o = strsep(&p, ",")) != NULL; ) {
603 if ( (tmpopt = malloc( strlen(o) + 2 + 1 )) == NULL)
604 err(1,NULL);
605
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?
Thanks for (patiently) redoing the patch for -current.
Regards,
Koshy
<jkoshy@freebsd.org>
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?199905050850.BAA96636>
