diff options
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r-- | fs/cifs/connect.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 3156a9de947d..e65f72d1f23b 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -100,6 +100,7 @@ struct smb_vol { | |||
100 | bool nostrictsync:1; /* do not force expensive SMBflush on every sync */ | 100 | bool nostrictsync:1; /* do not force expensive SMBflush on every sync */ |
101 | bool fsc:1; /* enable fscache */ | 101 | bool fsc:1; /* enable fscache */ |
102 | bool mfsymlinks:1; /* use Minshall+French Symlinks */ | 102 | bool mfsymlinks:1; /* use Minshall+French Symlinks */ |
103 | bool multiuser:1; | ||
103 | unsigned int rsize; | 104 | unsigned int rsize; |
104 | unsigned int wsize; | 105 | unsigned int wsize; |
105 | bool sockopt_tcp_nodelay:1; | 106 | bool sockopt_tcp_nodelay:1; |
@@ -1347,6 +1348,8 @@ cifs_parse_mount_options(char *options, const char *devname, | |||
1347 | vol->fsc = true; | 1348 | vol->fsc = true; |
1348 | } else if (strnicmp(data, "mfsymlinks", 10) == 0) { | 1349 | } else if (strnicmp(data, "mfsymlinks", 10) == 0) { |
1349 | vol->mfsymlinks = true; | 1350 | vol->mfsymlinks = true; |
1351 | } else if (strnicmp(data, "multiuser", 8) == 0) { | ||
1352 | vol->multiuser = true; | ||
1350 | } else | 1353 | } else |
1351 | printk(KERN_WARNING "CIFS: Unknown mount option %s\n", | 1354 | printk(KERN_WARNING "CIFS: Unknown mount option %s\n", |
1352 | data); | 1355 | data); |
@@ -1378,6 +1381,13 @@ cifs_parse_mount_options(char *options, const char *devname, | |||
1378 | return 1; | 1381 | return 1; |
1379 | } | 1382 | } |
1380 | } | 1383 | } |
1384 | |||
1385 | if (vol->multiuser && !(vol->secFlg & CIFSSEC_MAY_KRB5)) { | ||
1386 | cERROR(1, "Multiuser mounts currently require krb5 " | ||
1387 | "authentication!"); | ||
1388 | return 1; | ||
1389 | } | ||
1390 | |||
1381 | if (vol->UNCip == NULL) | 1391 | if (vol->UNCip == NULL) |
1382 | vol->UNCip = &vol->UNC[2]; | 1392 | vol->UNCip = &vol->UNC[2]; |
1383 | 1393 | ||
@@ -2563,6 +2573,9 @@ static void setup_cifs_sb(struct smb_vol *pvolume_info, | |||
2563 | cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_DYNPERM; | 2573 | cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_DYNPERM; |
2564 | if (pvolume_info->fsc) | 2574 | if (pvolume_info->fsc) |
2565 | cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_FSCACHE; | 2575 | cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_FSCACHE; |
2576 | if (pvolume_info->multiuser) | ||
2577 | cifs_sb->mnt_cifs_flags |= (CIFS_MOUNT_MULTIUSER | | ||
2578 | CIFS_MOUNT_NO_PERM); | ||
2566 | if (pvolume_info->direct_io) { | 2579 | if (pvolume_info->direct_io) { |
2567 | cFYI(1, "mounting share using direct i/o"); | 2580 | cFYI(1, "mounting share using direct i/o"); |
2568 | cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_DIRECT_IO; | 2581 | cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_DIRECT_IO; |