aboutsummaryrefslogtreecommitdiffstats
path: root/mount.cifs.c
diff options
context:
space:
mode:
authorPavel Shilovsky <piastry@etersoft.ru>2011-08-29 12:57:03 -0400
committerJeff Layton <jlayton@samba.org>2011-08-29 12:57:03 -0400
commit03636114ab55bebe33f28cacaab40c1f1efb1c07 (patch)
treedf7cccebd03f85c1fb3c19fd96c014e65a19ccad /mount.cifs.c
parentfa80f0150ad1803a2705c6a153cf5b64cc18a2d6 (diff)
downloadcifs-utils-03636114ab55bebe33f28cacaab40c1f1efb1c07.tar.gz
cifs-utils-03636114ab55bebe33f28cacaab40c1f1efb1c07.tar.xz
cifs-utils-03636114ab55bebe33f28cacaab40c1f1efb1c07.zip
mount.cifs: fix the conflict between rwpidforward and rw mount options
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@etersoft.ru>
Diffstat (limited to 'mount.cifs.c')
-rw-r--r--mount.cifs.c2
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;