|
@@ -3174,6 +3174,10 @@ out:
|
|
|
return rc;
|
|
|
}
|
|
|
|
|
|
+/*
|
|
|
+ * Issue a TREE_CONNECT request. Note that for IPC$ shares, that the tcon
|
|
|
+ * pointer may be NULL.
|
|
|
+ */
|
|
|
int
|
|
|
CIFSTCon(unsigned int xid, struct cifs_ses *ses,
|
|
|
const char *tree, struct cifs_tcon *tcon,
|
|
@@ -3208,7 +3212,7 @@ CIFSTCon(unsigned int xid, struct cifs_ses *ses,
|
|
|
pSMB->AndXCommand = 0xFF;
|
|
|
pSMB->Flags = cpu_to_le16(TCON_EXTENDED_SECINFO);
|
|
|
bcc_ptr = &pSMB->Password[0];
|
|
|
- if ((ses->server->sec_mode) & SECMODE_USER) {
|
|
|
+ if (!tcon || (ses->server->sec_mode & SECMODE_USER)) {
|
|
|
pSMB->PasswordLength = cpu_to_le16(1); /* minimum */
|
|
|
*bcc_ptr = 0; /* password is null byte */
|
|
|
bcc_ptr++; /* skip password */
|