Lines Matching refs:vol

1039 				       struct smb_vol *vol)  in cifs_parse_security_flavors()  argument
1048 vol->sectype = Unspecified; in cifs_parse_security_flavors()
1049 vol->sign = false; in cifs_parse_security_flavors()
1056 vol->sign = true; in cifs_parse_security_flavors()
1059 vol->sectype = Kerberos; in cifs_parse_security_flavors()
1062 vol->sign = true; in cifs_parse_security_flavors()
1065 vol->sectype = RawNTLMSSP; in cifs_parse_security_flavors()
1068 vol->sign = true; in cifs_parse_security_flavors()
1071 vol->sectype = NTLM; in cifs_parse_security_flavors()
1074 vol->sign = true; in cifs_parse_security_flavors()
1077 vol->sectype = NTLMv2; in cifs_parse_security_flavors()
1081 vol->sectype = LANMAN; in cifs_parse_security_flavors()
1085 vol->nullauth = 1; in cifs_parse_security_flavors()
1096 cifs_parse_cache_flavor(char *value, struct smb_vol *vol) in cifs_parse_cache_flavor() argument
1102 vol->direct_io = false; in cifs_parse_cache_flavor()
1103 vol->strict_io = false; in cifs_parse_cache_flavor()
1106 vol->direct_io = false; in cifs_parse_cache_flavor()
1107 vol->strict_io = true; in cifs_parse_cache_flavor()
1110 vol->direct_io = true; in cifs_parse_cache_flavor()
1111 vol->strict_io = false; in cifs_parse_cache_flavor()
1121 cifs_parse_smb_version(char *value, struct smb_vol *vol) in cifs_parse_smb_version() argument
1127 vol->ops = &smb1_operations; in cifs_parse_smb_version()
1128 vol->vals = &smb1_values; in cifs_parse_smb_version()
1132 vol->ops = &smb20_operations; in cifs_parse_smb_version()
1133 vol->vals = &smb20_values; in cifs_parse_smb_version()
1136 vol->ops = &smb21_operations; in cifs_parse_smb_version()
1137 vol->vals = &smb21_values; in cifs_parse_smb_version()
1140 vol->ops = &smb30_operations; in cifs_parse_smb_version()
1141 vol->vals = &smb30_values; in cifs_parse_smb_version()
1144 vol->ops = &smb30_operations; /* currently identical with 3.0 */ in cifs_parse_smb_version()
1145 vol->vals = &smb302_values; in cifs_parse_smb_version()
1149 vol->ops = &smb311_operations; in cifs_parse_smb_version()
1150 vol->vals = &smb311_values; in cifs_parse_smb_version()
1166 cifs_parse_devname(const char *devname, struct smb_vol *vol) in cifs_parse_devname() argument
1190 vol->UNC = kstrndup(devname, pos - devname, GFP_KERNEL); in cifs_parse_devname()
1191 if (!vol->UNC) in cifs_parse_devname()
1194 convert_delimiter(vol->UNC, '\\'); in cifs_parse_devname()
1200 vol->prepath = kstrdup(pos, GFP_KERNEL); in cifs_parse_devname()
1201 if (!vol->prepath) in cifs_parse_devname()
1209 struct smb_vol *vol) in cifs_parse_mount_options() argument
1227 struct sockaddr *dstaddr = (struct sockaddr *)&vol->dstaddr; in cifs_parse_mount_options()
1234 memset(vol, 0, sizeof(*vol)); in cifs_parse_mount_options()
1241 memset(vol->source_rfc1001_name, 0x20, RFC1001_NAME_LEN); in cifs_parse_mount_options()
1243 vol->source_rfc1001_name[i] = toupper(nodename[i]); in cifs_parse_mount_options()
1245 vol->source_rfc1001_name[RFC1001_NAME_LEN] = 0; in cifs_parse_mount_options()
1248 vol->target_rfc1001_name[0] = 0; in cifs_parse_mount_options()
1249 vol->cred_uid = current_uid(); in cifs_parse_mount_options()
1250 vol->linux_uid = current_uid(); in cifs_parse_mount_options()
1251 vol->linux_gid = current_gid(); in cifs_parse_mount_options()
1259 vol->remap = true; in cifs_parse_mount_options()
1262 vol->dir_mode = vol->file_mode = S_IRUGO | S_IXUGO | S_IWUSR; in cifs_parse_mount_options()
1266 vol->posix_paths = 1; in cifs_parse_mount_options()
1268 vol->server_ino = 1; in cifs_parse_mount_options()
1271 vol->strict_io = true; in cifs_parse_mount_options()
1273 vol->actimeo = CIFS_DEF_ACTIMEO; in cifs_parse_mount_options()
1276 vol->ops = &smb1_operations; in cifs_parse_mount_options()
1277 vol->vals = &smb1_values; in cifs_parse_mount_options()
1297 vol->backupuid_specified = false; /* no backup intent for a user */ in cifs_parse_mount_options()
1298 vol->backupgid_specified = false; /* no backup intent for a group */ in cifs_parse_mount_options()
1300 switch (cifs_parse_devname(devname, vol)) { in cifs_parse_mount_options()
1332 vol->no_xattr = 0; in cifs_parse_mount_options()
1335 vol->no_xattr = 1; in cifs_parse_mount_options()
1350 vol->noblocksnd = 1; in cifs_parse_mount_options()
1353 vol->noautotune = 1; in cifs_parse_mount_options()
1356 vol->retry = 1; in cifs_parse_mount_options()
1359 vol->retry = 0; in cifs_parse_mount_options()
1362 vol->noperm = 0; in cifs_parse_mount_options()
1365 vol->noperm = 1; in cifs_parse_mount_options()
1368 vol->sfu_remap = true; in cifs_parse_mount_options()
1369 vol->remap = false; /* disable SFM mapping */ in cifs_parse_mount_options()
1372 vol->sfu_remap = false; in cifs_parse_mount_options()
1375 vol->remap = true; in cifs_parse_mount_options()
1376 vol->sfu_remap = false; /* disable SFU mapping */ in cifs_parse_mount_options()
1379 vol->remap = false; in cifs_parse_mount_options()
1382 vol->sfu_emul = 1; in cifs_parse_mount_options()
1385 vol->sfu_emul = 0; in cifs_parse_mount_options()
1388 vol->nodfs = 1; in cifs_parse_mount_options()
1391 vol->posix_paths = 1; in cifs_parse_mount_options()
1394 vol->posix_paths = 0; in cifs_parse_mount_options()
1397 vol->no_linux_ext = 1; in cifs_parse_mount_options()
1400 vol->nocase = 1; in cifs_parse_mount_options()
1403 vol->nobrl = 0; in cifs_parse_mount_options()
1406 vol->nobrl = 1; in cifs_parse_mount_options()
1412 if (vol->file_mode == in cifs_parse_mount_options()
1414 vol->file_mode = S_IALLUGO; in cifs_parse_mount_options()
1417 vol->mand_lock = 1; in cifs_parse_mount_options()
1420 vol->setuids = 1; in cifs_parse_mount_options()
1423 vol->setuids = 0; in cifs_parse_mount_options()
1426 vol->dynperm = true; in cifs_parse_mount_options()
1429 vol->dynperm = false; in cifs_parse_mount_options()
1432 vol->retry = 0; in cifs_parse_mount_options()
1435 vol->retry = 1; in cifs_parse_mount_options()
1438 vol->intr = 0; in cifs_parse_mount_options()
1441 vol->intr = 1; in cifs_parse_mount_options()
1444 vol->nostrictsync = 1; in cifs_parse_mount_options()
1447 vol->nostrictsync = 0; in cifs_parse_mount_options()
1450 vol->server_ino = 1; in cifs_parse_mount_options()
1453 vol->server_ino = 0; in cifs_parse_mount_options()
1456 vol->rwpidforward = 1; in cifs_parse_mount_options()
1459 vol->cifs_acl = 1; in cifs_parse_mount_options()
1462 vol->cifs_acl = 0; in cifs_parse_mount_options()
1465 vol->no_psx_acl = 0; in cifs_parse_mount_options()
1468 vol->no_psx_acl = 1; in cifs_parse_mount_options()
1471 vol->local_lease = 1; in cifs_parse_mount_options()
1474 vol->sign = true; in cifs_parse_mount_options()
1482 vol->seal = 1; in cifs_parse_mount_options()
1492 vol->fsc = true; in cifs_parse_mount_options()
1495 vol->mfsymlinks = true; in cifs_parse_mount_options()
1498 vol->multiuser = true; in cifs_parse_mount_options()
1504 vol->nosharesock = true; in cifs_parse_mount_options()
1507 vol->nopersistent = true; in cifs_parse_mount_options()
1508 if (vol->persistent) { in cifs_parse_mount_options()
1515 vol->persistent = true; in cifs_parse_mount_options()
1516 if ((vol->nopersistent) || (vol->resilient)) { in cifs_parse_mount_options()
1523 vol->resilient = true; in cifs_parse_mount_options()
1524 if (vol->persistent) { in cifs_parse_mount_options()
1531 vol->resilient = false; /* already the default */ in cifs_parse_mount_options()
1536 if (get_option_uid(args, &vol->backupuid)) { in cifs_parse_mount_options()
1541 vol->backupuid_specified = true; in cifs_parse_mount_options()
1544 if (get_option_gid(args, &vol->backupgid)) { in cifs_parse_mount_options()
1549 vol->backupgid_specified = true; in cifs_parse_mount_options()
1552 if (get_option_uid(args, &vol->linux_uid)) { in cifs_parse_mount_options()
1560 if (get_option_uid(args, &vol->cred_uid)) { in cifs_parse_mount_options()
1567 if (get_option_gid(args, &vol->linux_gid)) { in cifs_parse_mount_options()
1580 vol->file_mode = option; in cifs_parse_mount_options()
1588 vol->dir_mode = option; in cifs_parse_mount_options()
1605 vol->rsize = option; in cifs_parse_mount_options()
1613 vol->wsize = option; in cifs_parse_mount_options()
1621 vol->actimeo = HZ * option; in cifs_parse_mount_options()
1622 if (vol->actimeo > CIFS_MAX_ACTIMEO) { in cifs_parse_mount_options()
1632 vol->nullauth = 1; in cifs_parse_mount_options()
1633 vol->username = NULL; in cifs_parse_mount_options()
1646 kfree(vol->username); in cifs_parse_mount_options()
1647 vol->username = kstrdup(string, GFP_KERNEL); in cifs_parse_mount_options()
1648 if (!vol->username) in cifs_parse_mount_options()
1665 kfree(vol->password); in cifs_parse_mount_options()
1666 vol->password = NULL; in cifs_parse_mount_options()
1703 kfree(vol->password); in cifs_parse_mount_options()
1706 vol->password = kzalloc(temp_len+1, GFP_KERNEL); in cifs_parse_mount_options()
1707 if (vol->password == NULL) { in cifs_parse_mount_options()
1713 vol->password[j] = value[i]; in cifs_parse_mount_options()
1719 vol->password[j] = '\0'; in cifs_parse_mount_options()
1748 kfree(vol->domainname); in cifs_parse_mount_options()
1749 vol->domainname = kstrdup(string, GFP_KERNEL); in cifs_parse_mount_options()
1750 if (!vol->domainname) { in cifs_parse_mount_options()
1762 (struct sockaddr *)&vol->srcaddr, in cifs_parse_mount_options()
1780 kfree(vol->iocharset); in cifs_parse_mount_options()
1781 vol->iocharset = kstrdup(string, in cifs_parse_mount_options()
1783 if (!vol->iocharset) { in cifs_parse_mount_options()
1798 memset(vol->source_rfc1001_name, 0x20, in cifs_parse_mount_options()
1809 vol->source_rfc1001_name[i] = string[i]; in cifs_parse_mount_options()
1824 memset(vol->target_rfc1001_name, 0x20, in cifs_parse_mount_options()
1836 vol->target_rfc1001_name[i] = string[i]; in cifs_parse_mount_options()
1860 if (cifs_parse_smb_version(string, vol) != 0) in cifs_parse_mount_options()
1868 if (cifs_parse_security_flavors(string, vol) != 0) in cifs_parse_mount_options()
1876 if (cifs_parse_cache_flavor(string, vol) != 0) in cifs_parse_mount_options()
1900 if (vol->multiuser) { in cifs_parse_mount_options()
1905 if (!vol->UNC) { in cifs_parse_mount_options()
1911 if (!strchr(vol->UNC + 3, '\\')) { in cifs_parse_mount_options()
1918 if (!cifs_convert_address(dstaddr, &vol->UNC[2], in cifs_parse_mount_options()
1919 strlen(&vol->UNC[2]))) { in cifs_parse_mount_options()
1929 vol->override_uid = override_uid; in cifs_parse_mount_options()
1934 vol->override_gid = override_gid; in cifs_parse_mount_options()
2048 match_security(struct TCP_Server_Info *server, struct smb_vol *vol) in match_security() argument
2055 if (select_sectype(server, vol->sectype) == Unspecified) in match_security()
2063 if (vol->sign && !server->sign) in match_security()
2069 static int match_server(struct TCP_Server_Info *server, struct smb_vol *vol) in match_server() argument
2071 struct sockaddr *addr = (struct sockaddr *)&vol->dstaddr; in match_server()
2073 if (vol->nosharesock) in match_server()
2076 if ((server->vals != vol->vals) || (server->ops != vol->ops)) in match_server()
2083 (struct sockaddr *)&vol->srcaddr)) in match_server()
2089 if (!match_security(server, vol)) in match_server()
2096 cifs_find_tcp_session(struct smb_vol *vol) in cifs_find_tcp_session() argument
2102 if (!match_server(server, vol)) in cifs_find_tcp_session()
2260 static int match_session(struct cifs_ses *ses, struct smb_vol *vol) in match_session() argument
2262 if (vol->sectype != Unspecified && in match_session()
2263 vol->sectype != ses->sectype) in match_session()
2268 if (!uid_eq(vol->cred_uid, ses->cred_uid)) in match_session()
2274 if (!vol->nullauth) in match_session()
2281 vol->username ? vol->username : "", in match_session()
2284 if ((vol->username && strlen(vol->username) != 0) && in match_session()
2287 vol->password ? vol->password : "", in match_session()
2295 cifs_find_smb_ses(struct TCP_Server_Info *server, struct smb_vol *vol) in cifs_find_smb_ses() argument
2303 if (!match_session(ses, vol)) in cifs_find_smb_ses()
2358 cifs_set_cifscreds(struct smb_vol *vol, struct cifs_ses *ses) in cifs_set_cifscreds() argument
2436 vol->username = kstrndup(payload, len, GFP_KERNEL); in cifs_set_cifscreds()
2437 if (!vol->username) { in cifs_set_cifscreds()
2443 cifs_dbg(FYI, "%s: username=%s\n", __func__, vol->username); in cifs_set_cifscreds()
2449 kfree(vol->username); in cifs_set_cifscreds()
2450 vol->username = NULL; in cifs_set_cifscreds()
2455 vol->password = kstrndup(delim, len, GFP_KERNEL); in cifs_set_cifscreds()
2456 if (!vol->password) { in cifs_set_cifscreds()
2460 kfree(vol->username); in cifs_set_cifscreds()
2461 vol->username = NULL; in cifs_set_cifscreds()
2475 cifs_set_cifscreds(struct smb_vol *vol __attribute__((unused)), in cifs_set_cifscreds() argument
2836 volume_info = mnt_data->vol; in cifs_match_super()
3378 build_unc_path_to_root(const struct smb_vol *vol, in build_unc_path_to_root() argument
3382 unsigned int pplen = vol->prepath ? strlen(vol->prepath) + 1 : 0; in build_unc_path_to_root()
3383 unsigned int unc_len = strnlen(vol->UNC, MAX_TREE_SIZE + 1); in build_unc_path_to_root()
3389 strncpy(full_path, vol->UNC, unc_len); in build_unc_path_to_root()
3394 strncpy(pos + 1, vol->prepath, pplen); in build_unc_path_to_root()
3979 cifs_set_vol_auth(struct smb_vol *vol, struct cifs_ses *ses) in cifs_set_vol_auth() argument
3981 vol->sectype = ses->sectype; in cifs_set_vol_auth()
3984 if (vol->sectype == Kerberos) in cifs_set_vol_auth()
3987 return cifs_set_cifscreds(vol, ses); in cifs_set_vol_auth()