summaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifssmb.c
diff options
context:
space:
mode:
authorSteve French <smfrench@austin.rr.com>2005-04-30 11:10:57 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-30 11:10:57 -0700
commit68575476718ed1c6d6ddafeec8310b109e7a7a7f (patch)
tree6f2a6107859521b5f6b498aa50421cf0d0aebb7a /fs/cifs/cifssmb.c
parent9747dd6fa98f2983f4dd09cd6dad1fa3d2a4c5f2 (diff)
downloadop-kernel-dev-68575476718ed1c6d6ddafeec8310b109e7a7a7f.zip
op-kernel-dev-68575476718ed1c6d6ddafeec8310b109e7a7a7f.tar.gz
[PATCH] cifs: append \* properly on ASCII servers
For older servers which do not support Unicode Signed-off-by: Steve French (sfrench@us.ibm.com) Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/cifs/cifssmb.c')
-rw-r--r--fs/cifs/cifssmb.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index b004fef..741ff0c 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -2451,12 +2451,14 @@ findFirstRetry:
name_len += 2;
} else { /* BB add check for overrun of SMB buf BB */
name_len = strnlen(searchName, PATH_MAX);
- name_len++; /* trailing null */
/* BB fix here and in unicode clause above ie
if(name_len > buffersize-header)
free buffer exit; BB */
strncpy(pSMB->FileName, searchName, name_len);
- pSMB->FileName[name_len] = 0; /* just in case */
+ pSMB->FileName[name_len] = '\\';
+ pSMB->FileName[name_len+1] = '*';
+ pSMB->FileName[name_len+2] = 0;
+ name_len += 3;
}
params = 12 + name_len /* includes null */ ;
OpenPOWER on IntegriCloud