On Sat, 27 Aug 2011 20:21:17 +0400 Pavel Shilovsky <piastry@xxxxxxxxxxx> wrote: > Both these options are started with "rw" - that's why the first one > isn't switched on even if it is specified. Fix this by adding a length > check for "rw" option check. > > Signed-off-by: Pavel Shilovsky <piastry@xxxxxxxxxxx> > --- > mount.cifs.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/mount.cifs.c b/mount.cifs.c > index aa4581f..1e3d534 100644 > --- a/mount.cifs.c > +++ b/mount.cifs.c > @@ -837,7 +837,7 @@ static int parse_opt_token(const char *token) > return OPT_GUEST; > if (strncmp(token, "ro", 2) == 0) > return OPT_RO; > - if (strncmp(token, "rw", 2) == 0) > + if (strncmp(token, "rw", 2) == 0 && strlen(token) == 2) > return OPT_RW; > if (strncmp(token, "remount", 7) == 0) > return OPT_REMOUNT; Committed. -- Jeff Layton <jlayton@xxxxxxxxx> -- To unsubscribe from this list: send the line "unsubscribe linux-cifs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html