diff options
author | Sachin Prabhu <sprabhu@redhat.com> | 2012-04-13 09:04:32 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2012-04-13 11:03:29 -0400 |
commit | bfa890a3cdeed29eef53d54cd7f80cec0fd46b11 (patch) | |
tree | 1392f59d8a984c97a36e289f506303806627c209 /fs | |
parent | 4fe9e9639d95cd11de63afa353f2de320f26033a (diff) |
Fix number parsing in cifs_parse_mount_options
The function kstrtoul() used to parse number strings in the mount
option parser is set to expect a base 10 number . This treats the octal
numbers passed for mount options such as file_mode as base10 numbers
leading to incorrect behavior.
Change the 'base' argument passed to kstrtoul from 10 to 0 to
allow it to auto-detect the base of the number passed.
Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
Acked-by: Jeff Layton <jlayton@samba.org>
Reported-by: Chris Clayton <chris2553@googlemail.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/cifs/connect.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 6a86f3d68182..f31dc9ac37b7 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -1123,7 +1123,7 @@ static int get_option_ul(substring_t args[], unsigned long *option) | |||
1123 | string = match_strdup(args); | 1123 | string = match_strdup(args); |
1124 | if (string == NULL) | 1124 | if (string == NULL) |
1125 | return -ENOMEM; | 1125 | return -ENOMEM; |
1126 | rc = kstrtoul(string, 10, option); | 1126 | rc = kstrtoul(string, 0, option); |
1127 | kfree(string); | 1127 | kfree(string); |
1128 | 1128 | ||
1129 | return rc; | 1129 | return rc; |