diff options
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r-- | fs/cifs/connect.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 991c63c6bdd0..21b3a291c327 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -1575,14 +1575,24 @@ cifs_parse_mount_options(const char *mountdata, const char *devname, | |||
1575 | } | 1575 | } |
1576 | break; | 1576 | break; |
1577 | case Opt_blank_pass: | 1577 | case Opt_blank_pass: |
1578 | vol->password = NULL; | ||
1579 | break; | ||
1580 | case Opt_pass: | ||
1581 | /* passwords have to be handled differently | 1578 | /* passwords have to be handled differently |
1582 | * to allow the character used for deliminator | 1579 | * to allow the character used for deliminator |
1583 | * to be passed within them | 1580 | * to be passed within them |
1584 | */ | 1581 | */ |
1585 | 1582 | ||
1583 | /* | ||
1584 | * Check if this is a case where the password | ||
1585 | * starts with a delimiter | ||
1586 | */ | ||
1587 | tmp_end = strchr(data, '='); | ||
1588 | tmp_end++; | ||
1589 | if (!(tmp_end < end && tmp_end[1] == delim)) { | ||
1590 | /* No it is not. Set the password to NULL */ | ||
1591 | vol->password = NULL; | ||
1592 | break; | ||
1593 | } | ||
1594 | /* Yes it is. Drop down to Opt_pass below.*/ | ||
1595 | case Opt_pass: | ||
1586 | /* Obtain the value string */ | 1596 | /* Obtain the value string */ |
1587 | value = strchr(data, '='); | 1597 | value = strchr(data, '='); |
1588 | value++; | 1598 | value++; |