diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-12 18:18:20 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-12 18:18:20 -0400 |
commit | 0b1fd266bffdab61f5936c9b67d892b353cbf54e (patch) | |
tree | 42098cb8e8cf57153af7052dfedbe04ca2e6be40 /fs | |
parent | 6074fffbf8cd4d966b29c17a25f0b336074ebc28 (diff) | |
parent | c369c9a4a7c82d33329d869cbaf93304cc7a0c40 (diff) |
Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6
Pull CIFS fix from Steve French:
"Fixes a regression in cifs in which a password which begins with a
comma is parsed incorrectly as a blank password"
* 'for-next' of git://git.samba.org/sfrench/cifs-2.6:
cifs: Allow passwords which begin with a delimitor
Diffstat (limited to 'fs')
-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++; |