All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix a couple of problems that crept into mount
@ 2007-03-20 22:52 Kevin Coffman
  2007-03-20 23:27 ` Neil Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Kevin Coffman @ 2007-03-20 22:52 UTC (permalink / raw)
  To: neilb; +Cc: nfs

From: Kevin Coffman <kwc@citi.umich.edu>

Commit 6facb22402a0bd8cd49be2ed1a0856b24fef42f4 changed the allocation
of len to no longer get 20 extra bytes.  It needs to get at least one
extra byte for a null character, otherwise a single extra option such
as "sec=krb5" is never copied in parse_opt() and is dropped.

Commit 44a3727a3243e674a1f1fdad5cbbc639aa25d01c added a typo when
checking the program name.
---

 utils/mount/mount.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/utils/mount/mount.c b/utils/mount/mount.c
index 487c0a6..b367b64 100644
--- a/utils/mount/mount.c
+++ b/utils/mount/mount.c
@@ -262,7 +262,7 @@ static void parse_opts (const char *opti
 	if (options != NULL) {
 		char *opts = xstrdup(options);
 		char *opt, *p;
-		int len = strlen(opts);
+		int len = strlen(opts) + 1;		/* include room for a null */
 		int open_quote = 0;
 
 		*extra_opts = xmalloc(len);
@@ -437,7 +437,7 @@ int main(int argc, char *argv[])
 		exit(1);
 	}
 
-	if (strcmp(progname, "mount.nfsv4") == 0)
+	if (strcmp(progname, "mount.nfs4") == 0)
 		nfs_mount_vers = 4;
 
 	if (uid != 0) {

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Fix a couple of problems that crept into mount
  2007-03-20 22:52 [PATCH] Fix a couple of problems that crept into mount Kevin Coffman
@ 2007-03-20 23:27 ` Neil Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Neil Brown @ 2007-03-20 23:27 UTC (permalink / raw)
  To: Kevin Coffman; +Cc: nfs

On Tuesday March 20, kwc@citi.umich.edu wrote:
> From: Kevin Coffman <kwc@citi.umich.edu>
> 
> Commit 6facb22402a0bd8cd49be2ed1a0856b24fef42f4 changed the allocation
> of len to no longer get 20 extra bytes.  It needs to get at least one
> extra byte for a null character, otherwise a single extra option such
> as "sec=krb5" is never copied in parse_opt() and is dropped.
> 
> Commit 44a3727a3243e674a1f1fdad5cbbc639aa25d01c added a typo when
> checking the program name.

Thanks Kevin!

Applied.

NeilBrown

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-03-20 23:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-20 22:52 [PATCH] Fix a couple of problems that crept into mount Kevin Coffman
2007-03-20 23:27 ` Neil Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.