* [PATCH] mount.cifs: fix the conflict between rwpidforward and rw mount options
@ 2011-08-27 16:21 Pavel Shilovsky
[not found] ` <1314462077-6196-1-git-send-email-piastry-7qunaywFIewox3rIn2DAYQ@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Pavel Shilovsky @ 2011-08-27 16:21 UTC (permalink / raw)
To: linux-cifs-u79uwXL29TY76Z2rM5mHXA
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-7qunaywFIewox3rIn2DAYQ@public.gmane.org>
---
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;
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mount.cifs: fix the conflict between rwpidforward and rw mount options
[not found] ` <1314462077-6196-1-git-send-email-piastry-7qunaywFIewox3rIn2DAYQ@public.gmane.org>
@ 2011-08-29 16:55 ` Jeff Layton
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Layton @ 2011-08-29 16:55 UTC (permalink / raw)
To: Pavel Shilovsky; +Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA
On Sat, 27 Aug 2011 20:21:17 +0400
Pavel Shilovsky <piastry-7qunaywFIewox3rIn2DAYQ@public.gmane.org> 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-7qunaywFIewox3rIn2DAYQ@public.gmane.org>
> ---
> 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-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-08-29 16:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-27 16:21 [PATCH] mount.cifs: fix the conflict between rwpidforward and rw mount options Pavel Shilovsky
[not found] ` <1314462077-6196-1-git-send-email-piastry-7qunaywFIewox3rIn2DAYQ@public.gmane.org>
2011-08-29 16:55 ` Jeff Layton
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.