]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - fs/cifs/cifsencrypt.c
Merge branch 'stable/for-linus-4.10' of git://git.kernel.org/pub/scm/linux/kernel...
[mirror_ubuntu-zesty-kernel.git] / fs / cifs / cifsencrypt.c
index 5eb04129f93849c2727a517119bc484761160332..66bd7fa9b7a6f739f7f5fda0d0b6fe4c79192a47 100644 (file)
@@ -699,11 +699,15 @@ setup_ntlmv2_rsp(struct cifs_ses *ses, const struct nls_table *nls_cp)
 
        if (ses->server->negflavor == CIFS_NEGFLAVOR_EXTENDED) {
                if (!ses->domainName) {
-                       rc = find_domain_name(ses, nls_cp);
-                       if (rc) {
-                               cifs_dbg(VFS, "error %d finding domain name\n",
-                                        rc);
-                               goto setup_ntlmv2_rsp_ret;
+                       if (ses->domainAuto) {
+                               rc = find_domain_name(ses, nls_cp);
+                               if (rc) {
+                                       cifs_dbg(VFS, "error %d finding domain name\n",
+                                                rc);
+                                       goto setup_ntlmv2_rsp_ret;
+                               }
+                       } else {
+                               ses->domainName = kstrdup("", GFP_KERNEL);
                        }
                }
        } else {