Lines Matching refs:vol
1028 struct smb_vol *vol) in cifs_parse_security_flavors() argument
1037 vol->sectype = Unspecified; in cifs_parse_security_flavors()
1038 vol->sign = false; in cifs_parse_security_flavors()
1045 vol->sign = true; in cifs_parse_security_flavors()
1048 vol->sectype = Kerberos; in cifs_parse_security_flavors()
1051 vol->sign = true; in cifs_parse_security_flavors()
1054 vol->sectype = RawNTLMSSP; in cifs_parse_security_flavors()
1057 vol->sign = true; in cifs_parse_security_flavors()
1060 vol->sectype = NTLM; in cifs_parse_security_flavors()
1063 vol->sign = true; in cifs_parse_security_flavors()
1066 vol->sectype = NTLMv2; in cifs_parse_security_flavors()
1070 vol->sectype = LANMAN; in cifs_parse_security_flavors()
1074 vol->nullauth = 1; in cifs_parse_security_flavors()
1085 cifs_parse_cache_flavor(char *value, struct smb_vol *vol) in cifs_parse_cache_flavor() argument
1091 vol->direct_io = false; in cifs_parse_cache_flavor()
1092 vol->strict_io = false; in cifs_parse_cache_flavor()
1095 vol->direct_io = false; in cifs_parse_cache_flavor()
1096 vol->strict_io = true; in cifs_parse_cache_flavor()
1099 vol->direct_io = true; in cifs_parse_cache_flavor()
1100 vol->strict_io = false; in cifs_parse_cache_flavor()
1110 cifs_parse_smb_version(char *value, struct smb_vol *vol) in cifs_parse_smb_version() argument
1116 vol->ops = &smb1_operations; in cifs_parse_smb_version()
1117 vol->vals = &smb1_values; in cifs_parse_smb_version()
1121 vol->ops = &smb20_operations; in cifs_parse_smb_version()
1122 vol->vals = &smb20_values; in cifs_parse_smb_version()
1125 vol->ops = &smb21_operations; in cifs_parse_smb_version()
1126 vol->vals = &smb21_values; in cifs_parse_smb_version()
1129 vol->ops = &smb30_operations; in cifs_parse_smb_version()
1130 vol->vals = &smb30_values; in cifs_parse_smb_version()
1133 vol->ops = &smb30_operations; /* currently identical with 3.0 */ in cifs_parse_smb_version()
1134 vol->vals = &smb302_values; in cifs_parse_smb_version()
1149 cifs_parse_devname(const char *devname, struct smb_vol *vol) in cifs_parse_devname() argument
1173 vol->UNC = kstrndup(devname, pos - devname, GFP_KERNEL); in cifs_parse_devname()
1174 if (!vol->UNC) in cifs_parse_devname()
1177 convert_delimiter(vol->UNC, '\\'); in cifs_parse_devname()
1183 vol->prepath = kstrdup(pos, GFP_KERNEL); in cifs_parse_devname()
1184 if (!vol->prepath) in cifs_parse_devname()
1192 struct smb_vol *vol) in cifs_parse_mount_options() argument
1210 struct sockaddr *dstaddr = (struct sockaddr *)&vol->dstaddr; in cifs_parse_mount_options()
1217 memset(vol, 0, sizeof(*vol)); in cifs_parse_mount_options()
1224 memset(vol->source_rfc1001_name, 0x20, RFC1001_NAME_LEN); in cifs_parse_mount_options()
1226 vol->source_rfc1001_name[i] = toupper(nodename[i]); in cifs_parse_mount_options()
1228 vol->source_rfc1001_name[RFC1001_NAME_LEN] = 0; in cifs_parse_mount_options()
1231 vol->target_rfc1001_name[0] = 0; in cifs_parse_mount_options()
1232 vol->cred_uid = current_uid(); in cifs_parse_mount_options()
1233 vol->linux_uid = current_uid(); in cifs_parse_mount_options()
1234 vol->linux_gid = current_gid(); in cifs_parse_mount_options()
1242 vol->remap = true; in cifs_parse_mount_options()
1245 vol->dir_mode = vol->file_mode = S_IRUGO | S_IXUGO | S_IWUSR; in cifs_parse_mount_options()
1249 vol->posix_paths = 1; in cifs_parse_mount_options()
1251 vol->server_ino = 1; in cifs_parse_mount_options()
1254 vol->strict_io = true; in cifs_parse_mount_options()
1256 vol->actimeo = CIFS_DEF_ACTIMEO; in cifs_parse_mount_options()
1259 vol->ops = &smb1_operations; in cifs_parse_mount_options()
1260 vol->vals = &smb1_values; in cifs_parse_mount_options()
1280 vol->backupuid_specified = false; /* no backup intent for a user */ in cifs_parse_mount_options()
1281 vol->backupgid_specified = false; /* no backup intent for a group */ in cifs_parse_mount_options()
1283 switch (cifs_parse_devname(devname, vol)) { in cifs_parse_mount_options()
1315 vol->no_xattr = 0; in cifs_parse_mount_options()
1318 vol->no_xattr = 1; in cifs_parse_mount_options()
1333 vol->noblocksnd = 1; in cifs_parse_mount_options()
1336 vol->noautotune = 1; in cifs_parse_mount_options()
1339 vol->retry = 1; in cifs_parse_mount_options()
1342 vol->retry = 0; in cifs_parse_mount_options()
1345 vol->noperm = 0; in cifs_parse_mount_options()
1348 vol->noperm = 1; in cifs_parse_mount_options()
1351 vol->sfu_remap = true; in cifs_parse_mount_options()
1352 vol->remap = false; /* disable SFM mapping */ in cifs_parse_mount_options()
1355 vol->sfu_remap = false; in cifs_parse_mount_options()
1358 vol->remap = true; in cifs_parse_mount_options()
1359 vol->sfu_remap = false; /* disable SFU mapping */ in cifs_parse_mount_options()
1362 vol->remap = false; in cifs_parse_mount_options()
1365 vol->sfu_emul = 1; in cifs_parse_mount_options()
1368 vol->sfu_emul = 0; in cifs_parse_mount_options()
1371 vol->nodfs = 1; in cifs_parse_mount_options()
1374 vol->posix_paths = 1; in cifs_parse_mount_options()
1377 vol->posix_paths = 0; in cifs_parse_mount_options()
1380 vol->no_linux_ext = 1; in cifs_parse_mount_options()
1383 vol->nocase = 1; in cifs_parse_mount_options()
1386 vol->nobrl = 0; in cifs_parse_mount_options()
1389 vol->nobrl = 1; in cifs_parse_mount_options()
1395 if (vol->file_mode == in cifs_parse_mount_options()
1397 vol->file_mode = S_IALLUGO; in cifs_parse_mount_options()
1400 vol->mand_lock = 1; in cifs_parse_mount_options()
1403 vol->setuids = 1; in cifs_parse_mount_options()
1406 vol->setuids = 0; in cifs_parse_mount_options()
1409 vol->dynperm = true; in cifs_parse_mount_options()
1412 vol->dynperm = false; in cifs_parse_mount_options()
1415 vol->retry = 0; in cifs_parse_mount_options()
1418 vol->retry = 1; in cifs_parse_mount_options()
1421 vol->intr = 0; in cifs_parse_mount_options()
1424 vol->intr = 1; in cifs_parse_mount_options()
1427 vol->nostrictsync = 1; in cifs_parse_mount_options()
1430 vol->nostrictsync = 0; in cifs_parse_mount_options()
1433 vol->server_ino = 1; in cifs_parse_mount_options()
1436 vol->server_ino = 0; in cifs_parse_mount_options()
1439 vol->rwpidforward = 1; in cifs_parse_mount_options()
1442 vol->cifs_acl = 1; in cifs_parse_mount_options()
1445 vol->cifs_acl = 0; in cifs_parse_mount_options()
1448 vol->no_psx_acl = 0; in cifs_parse_mount_options()
1451 vol->no_psx_acl = 1; in cifs_parse_mount_options()
1454 vol->local_lease = 1; in cifs_parse_mount_options()
1457 vol->sign = true; in cifs_parse_mount_options()
1465 vol->seal = 1; in cifs_parse_mount_options()
1475 vol->fsc = true; in cifs_parse_mount_options()
1478 vol->mfsymlinks = true; in cifs_parse_mount_options()
1481 vol->multiuser = true; in cifs_parse_mount_options()
1487 vol->nosharesock = true; in cifs_parse_mount_options()
1492 if (get_option_uid(args, &vol->backupuid)) { in cifs_parse_mount_options()
1497 vol->backupuid_specified = true; in cifs_parse_mount_options()
1500 if (get_option_gid(args, &vol->backupgid)) { in cifs_parse_mount_options()
1505 vol->backupgid_specified = true; in cifs_parse_mount_options()
1508 if (get_option_uid(args, &vol->linux_uid)) { in cifs_parse_mount_options()
1516 if (get_option_uid(args, &vol->cred_uid)) { in cifs_parse_mount_options()
1523 if (get_option_gid(args, &vol->linux_gid)) { in cifs_parse_mount_options()
1536 vol->file_mode = option; in cifs_parse_mount_options()
1544 vol->dir_mode = option; in cifs_parse_mount_options()
1561 vol->rsize = option; in cifs_parse_mount_options()
1569 vol->wsize = option; in cifs_parse_mount_options()
1577 vol->actimeo = HZ * option; in cifs_parse_mount_options()
1578 if (vol->actimeo > CIFS_MAX_ACTIMEO) { in cifs_parse_mount_options()
1588 vol->nullauth = 1; in cifs_parse_mount_options()
1589 vol->username = NULL; in cifs_parse_mount_options()
1602 kfree(vol->username); in cifs_parse_mount_options()
1603 vol->username = kstrdup(string, GFP_KERNEL); in cifs_parse_mount_options()
1604 if (!vol->username) in cifs_parse_mount_options()
1621 kfree(vol->password); in cifs_parse_mount_options()
1622 vol->password = NULL; in cifs_parse_mount_options()
1659 kfree(vol->password); in cifs_parse_mount_options()
1662 vol->password = kzalloc(temp_len+1, GFP_KERNEL); in cifs_parse_mount_options()
1663 if (vol->password == NULL) { in cifs_parse_mount_options()
1669 vol->password[j] = value[i]; in cifs_parse_mount_options()
1675 vol->password[j] = '\0'; in cifs_parse_mount_options()
1704 kfree(vol->domainname); in cifs_parse_mount_options()
1705 vol->domainname = kstrdup(string, GFP_KERNEL); in cifs_parse_mount_options()
1706 if (!vol->domainname) { in cifs_parse_mount_options()
1718 (struct sockaddr *)&vol->srcaddr, in cifs_parse_mount_options()
1736 kfree(vol->iocharset); in cifs_parse_mount_options()
1737 vol->iocharset = kstrdup(string, in cifs_parse_mount_options()
1739 if (!vol->iocharset) { in cifs_parse_mount_options()
1754 memset(vol->source_rfc1001_name, 0x20, in cifs_parse_mount_options()
1765 vol->source_rfc1001_name[i] = string[i]; in cifs_parse_mount_options()
1780 memset(vol->target_rfc1001_name, 0x20, in cifs_parse_mount_options()
1792 vol->target_rfc1001_name[i] = string[i]; in cifs_parse_mount_options()
1816 if (cifs_parse_smb_version(string, vol) != 0) in cifs_parse_mount_options()
1824 if (cifs_parse_security_flavors(string, vol) != 0) in cifs_parse_mount_options()
1832 if (cifs_parse_cache_flavor(string, vol) != 0) in cifs_parse_mount_options()
1856 if (vol->multiuser) { in cifs_parse_mount_options()
1861 if (!vol->UNC) { in cifs_parse_mount_options()
1867 if (!strchr(vol->UNC + 3, '\\')) { in cifs_parse_mount_options()
1874 if (!cifs_convert_address(dstaddr, &vol->UNC[2], in cifs_parse_mount_options()
1875 strlen(&vol->UNC[2]))) { in cifs_parse_mount_options()
1885 vol->override_uid = override_uid; in cifs_parse_mount_options()
1890 vol->override_gid = override_gid; in cifs_parse_mount_options()
2004 match_security(struct TCP_Server_Info *server, struct smb_vol *vol) in match_security() argument
2011 if (select_sectype(server, vol->sectype) == Unspecified) in match_security()
2019 if (vol->sign && !server->sign) in match_security()
2025 static int match_server(struct TCP_Server_Info *server, struct smb_vol *vol) in match_server() argument
2027 struct sockaddr *addr = (struct sockaddr *)&vol->dstaddr; in match_server()
2029 if (vol->nosharesock) in match_server()
2032 if ((server->vals != vol->vals) || (server->ops != vol->ops)) in match_server()
2039 (struct sockaddr *)&vol->srcaddr)) in match_server()
2045 if (!match_security(server, vol)) in match_server()
2052 cifs_find_tcp_session(struct smb_vol *vol) in cifs_find_tcp_session() argument
2058 if (!match_server(server, vol)) in cifs_find_tcp_session()
2216 static int match_session(struct cifs_ses *ses, struct smb_vol *vol) in match_session() argument
2218 if (vol->sectype != Unspecified && in match_session()
2219 vol->sectype != ses->sectype) in match_session()
2224 if (!uid_eq(vol->cred_uid, ses->cred_uid)) in match_session()
2230 if (!vol->nullauth) in match_session()
2237 vol->username ? vol->username : "", in match_session()
2240 if ((vol->username && strlen(vol->username) != 0) && in match_session()
2243 vol->password ? vol->password : "", in match_session()
2251 cifs_find_smb_ses(struct TCP_Server_Info *server, struct smb_vol *vol) in cifs_find_smb_ses() argument
2259 if (!match_session(ses, vol)) in cifs_find_smb_ses()
2314 cifs_set_cifscreds(struct smb_vol *vol, struct cifs_ses *ses) in cifs_set_cifscreds() argument
2391 vol->username = kstrndup(payload, len, GFP_KERNEL); in cifs_set_cifscreds()
2392 if (!vol->username) { in cifs_set_cifscreds()
2398 cifs_dbg(FYI, "%s: username=%s\n", __func__, vol->username); in cifs_set_cifscreds()
2404 kfree(vol->username); in cifs_set_cifscreds()
2405 vol->username = NULL; in cifs_set_cifscreds()
2410 vol->password = kstrndup(delim, len, GFP_KERNEL); in cifs_set_cifscreds()
2411 if (!vol->password) { in cifs_set_cifscreds()
2415 kfree(vol->username); in cifs_set_cifscreds()
2416 vol->username = NULL; in cifs_set_cifscreds()
2430 cifs_set_cifscreds(struct smb_vol *vol __attribute__((unused)), in cifs_set_cifscreds() argument
2755 volume_info = mnt_data->vol; in cifs_match_super()
3297 build_unc_path_to_root(const struct smb_vol *vol, in build_unc_path_to_root() argument
3301 unsigned int pplen = vol->prepath ? strlen(vol->prepath) + 1 : 0; in build_unc_path_to_root()
3302 unsigned int unc_len = strnlen(vol->UNC, MAX_TREE_SIZE + 1); in build_unc_path_to_root()
3308 strncpy(full_path, vol->UNC, unc_len); in build_unc_path_to_root()
3313 strncpy(pos + 1, vol->prepath, pplen); in build_unc_path_to_root()
3887 cifs_set_vol_auth(struct smb_vol *vol, struct cifs_ses *ses) in cifs_set_vol_auth() argument
3889 vol->sectype = ses->sectype; in cifs_set_vol_auth()
3892 if (vol->sectype == Kerberos) in cifs_set_vol_auth()
3895 return cifs_set_cifscreds(vol, ses); in cifs_set_vol_auth()