aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/connect.c
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2007-09-28 18:28:55 -0400
committerSteve French <sfrench@us.ibm.com>2007-09-28 18:28:55 -0400
commit7f8ed420f80c91176dfd27c8089f22cab5c9ba78 (patch)
treebd3cea6554c3e59230c83fa7e9912740e178b00c /fs/cifs/connect.c
parent407f61a2b482ab9a6d03549ab9513e4a823ae4a2 (diff)
[CIFS] CIFS support for named pipes (part 1)
This allows cifs to mount to ipc shares (IPC$) which will allow user space applications to layer over authenticated cifs connections (useful for Wine and others that would want to put DCE/RPC over CIFS or run CIFS named pipes) Acked-by: Rob Shearman <rob@codeweavers.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r--fs/cifs/connect.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index e43cb880f54a..21cac15ed9a7 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -2186,8 +2186,10 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
2186 tcon->ses = pSesInfo; 2186 tcon->ses = pSesInfo;
2187 2187
2188 /* do not care if following two calls succeed - informational */ 2188 /* do not care if following two calls succeed - informational */
2189 CIFSSMBQFSDeviceInfo(xid, tcon); 2189 if (!tcon->ipc) {
2190 CIFSSMBQFSAttributeInfo(xid, tcon); 2190 CIFSSMBQFSDeviceInfo(xid, tcon);
2191 CIFSSMBQFSAttributeInfo(xid, tcon);
2192 }
2191 2193
2192 /* tell server which Unix caps we support */ 2194 /* tell server which Unix caps we support */
2193 if (tcon->ses->capabilities & CAP_UNIX) 2195 if (tcon->ses->capabilities & CAP_UNIX)
@@ -3385,6 +3387,18 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses,
3385 bcc_ptr = pByteArea(smb_buffer_response); 3387 bcc_ptr = pByteArea(smb_buffer_response);
3386 length = strnlen(bcc_ptr, BCC(smb_buffer_response) - 2); 3388 length = strnlen(bcc_ptr, BCC(smb_buffer_response) - 2);
3387 /* skip service field (NB: this field is always ASCII) */ 3389 /* skip service field (NB: this field is always ASCII) */
3390 if (length == 3) {
3391 if ((bcc_ptr[0] == 'I') && (bcc_ptr[1] == 'P') &&
3392 (bcc_ptr[2] == 'C')) {
3393 cFYI(1, ("IPC connection"));
3394 tcon->ipc = 1;
3395 }
3396 } else if (length == 2) {
3397 if ((bcc_ptr[0] == 'A') && (bcc_ptr[1] == ':')) {
3398 /* the most common case */
3399 cFYI(1, ("disk share connection"));
3400 }
3401 }
3388 bcc_ptr += length + 1; 3402 bcc_ptr += length + 1;
3389 strncpy(tcon->treeName, tree, MAX_TREE_SIZE); 3403 strncpy(tcon->treeName, tree, MAX_TREE_SIZE);
3390 if (smb_buffer->Flags2 & SMBFLG2_UNICODE) { 3404 if (smb_buffer->Flags2 & SMBFLG2_UNICODE) {