Commit c9c7fa0064f4afe1d040e72f24c2256dd8ac402d

Authored by Steve French
1 parent 5b980b0121

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.

Cc: <stable@kernel.org>
Signed-off-by: Pavel Shilovsky <piastry@etersoft.ru>
Signed-off-by: Steve French <sfrench@us.ibm.com>

Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff

... ... @@ -1298,7 +1298,7 @@
1298 1298 /* ignore */
1299 1299 } else if (strnicmp(data, "guest", 5) == 0) {
1300 1300 /* ignore */
1301   - } else if (strnicmp(data, "rw", 2) == 0) {
  1301 + } else if (strnicmp(data, "rw", 2) == 0 && strlen(data) == 2) {
1302 1302 /* ignore */
1303 1303 } else if (strnicmp(data, "ro", 2) == 0) {
1304 1304 /* ignore */
... ... @@ -1401,7 +1401,7 @@
1401 1401 vol->server_ino = 1;
1402 1402 } else if (strnicmp(data, "noserverino", 9) == 0) {
1403 1403 vol->server_ino = 0;
1404   - } else if (strnicmp(data, "rwpidforward", 4) == 0) {
  1404 + } else if (strnicmp(data, "rwpidforward", 12) == 0) {
1405 1405 vol->rwpidforward = 1;
1406 1406 } else if (strnicmp(data, "cifsacl", 7) == 0) {
1407 1407 vol->cifs_acl = 1;