Commit 22316c1c authored by Dave Jones's avatar Dave Jones

[PATCH] 64bit fixes for smbfs

By Urban Widmark
parent 00b0ac82
......@@ -3772,12 +3772,15 @@ do_smb_super_data_conv(void *raw_data)
struct smb_mount_data *s = (struct smb_mount_data *)raw_data;
struct smb_mount_data32 *s32 = (struct smb_mount_data32 *)raw_data;
if (s32->version != SMB_MOUNT_OLDVERSION)
goto out;
s->version = s32->version;
s->mounted_uid = s32->mounted_uid;
s->uid = s32->uid;
s->gid = s32->gid;
s->file_mode = s32->file_mode;
s->dir_mode = s32->dir_mode;
out:
return raw_data;
}
......
......@@ -332,12 +332,15 @@ static void *do_smb_super_data_conv(void *raw_data)
struct smb_mount_data *s = (struct smb_mount_data *)raw_data;
struct smb_mount_data32 *s32 = (struct smb_mount_data32 *)raw_data;
if (s32->version != SMB_MOUNT_OLDVERSION)
goto out;
s->version = s32->version;
s->mounted_uid = s32->mounted_uid;
s->uid = s32->uid;
s->gid = s32->gid;
s->file_mode = s32->file_mode;
s->dir_mode = s32->dir_mode;
out:
return raw_data;
}
......
......@@ -1563,12 +1563,15 @@ static void *do_smb_super_data_conv(void *raw_data)
struct smb_mount_data *s = (struct smb_mount_data *)raw_data;
struct smb_mount_data32 *s32 = (struct smb_mount_data32 *)raw_data;
if (s32->version != SMB_MOUNT_OLDVERSION)
goto out;
s->version = s32->version;
s->mounted_uid = low2highuid(s32->mounted_uid);
s->uid = low2highuid(s32->uid);
s->gid = low2highgid(s32->gid);
s->file_mode = s32->file_mode;
s->dir_mode = s32->dir_mode;
out:
return raw_data;
}
......
......@@ -1582,6 +1582,8 @@ static void *do_smb_super_data_conv(void *raw_data)
struct smb_mount_data news, *s = &news;
struct smb_mount_data32 *s32 = (struct smb_mount_data32 *)raw_data;
if (s32->version != SMB_MOUNT_OLDVERSION)
goto out;
s->version = s32->version;
s->mounted_uid = low2highuid(s32->mounted_uid);
s->uid = low2highuid(s32->uid);
......@@ -1589,6 +1591,7 @@ static void *do_smb_super_data_conv(void *raw_data)
s->file_mode = s32->file_mode;
s->dir_mode = s32->dir_mode;
memcpy(raw_data, s, sizeof(struct smb_mount_data));
out:
return raw_data;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment