summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-08-21 21:07:27 +0000
committerJeremy Allison <jra@samba.org>2002-08-21 21:07:27 +0000
commitd01bbd42ff043d9fb0dc40dc4e207da8df0c9c14 (patch)
treeef62c425c78a2dda1524c007a804b326db6f32f7
parenta8936762967643a935ae45f468ad70e206406190 (diff)
downloadsamba-d01bbd42ff043d9fb0dc40dc4e207da8df0c9c14.tar.gz
samba-d01bbd42ff043d9fb0dc40dc4e207da8df0c9c14.tar.xz
samba-d01bbd42ff043d9fb0dc40dc4e207da8df0c9c14.zip
Fix longstanding bug in Win2k clients by clearing the shortname
buffer before returning ascii short name. Jeremy.
-rw-r--r--source/smbd/trans2.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/smbd/trans2.c b/source/smbd/trans2.c
index 8da55ba4ec5..91e76012e6d 100644
--- a/source/smbd/trans2.c
+++ b/source/smbd/trans2.c
@@ -660,6 +660,11 @@ static BOOL get_lanman2_dir_entry(connection_struct *conn,
SIVAL(p,0,nt_extmode); p += 4;
q = p; p += 4;
SIVAL(p,0,0); p += 4;
+ /* Clear the short name buffer. This is
+ * IMPORTANT as not doing so will trigger
+ * a Win2k client bug. JRA.
+ */
+ memset(p,'\0',26);
if (!was_8_3) {
pstring mangled_name;
pstrcpy(mangled_name, fname);