Update to 2.6.32.41 Mainline
/fs/cifs/connect.c
blob:7df59377df5f58b9d722d5d72647df3cd76cce0f -> blob:623441773c6a8e1109606564fb5c5c739b7e094a
--- fs/cifs/connect.c
+++ fs/cifs/connect.c
@@ -799,8 +799,7 @@ static int
cifs_parse_mount_options(char *options, const char *devname,
struct smb_vol *vol)
{
- char *value;
- char *data;
+ char *value, *data, *end;
unsigned int temp_len, i, j;
char separator[2];
short int override_uid = -1;
@@ -843,6 +842,7 @@ cifs_parse_mount_options(char *options,
if (!options)
return 1;
+ end = options + strlen(options);
if (strncmp(options, "sep=", 4) == 0) {
if (options[4] != 0) {
separator[0] = options[4];
@@ -907,6 +907,7 @@ cifs_parse_mount_options(char *options,
the only illegal character in a password is null */
if ((value[temp_len] == 0) &&
+ (value + temp_len < end) &&
(value[temp_len+1] == separator[0])) {
/* reinsert comma */
value[temp_len] = separator[0];
@@ -2230,6 +2231,11 @@ is_path_accessible(int xid, struct cifsT
0 /* not legacy */, cifs_sb->local_nls,
cifs_sb->mnt_cifs_flags &
CIFS_MOUNT_MAP_SPECIAL_CHR);
+
+ if (rc == -EOPNOTSUPP || rc == -EINVAL)
+ rc = SMBQueryInformation(xid, tcon, full_path, pfile_info,
+ cifs_sb->local_nls, cifs_sb->mnt_cifs_flags &
+ CIFS_MOUNT_MAP_SPECIAL_CHR);
kfree(pfile_info);
return rc;
}