1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-29 21:47:30 +03:00

This fixes 4 info levels in a trans2 find_first that should not be null

terminated for the filenames.

this is what caused win2k to go into a loop sending 20000 packets to set
an acl on a directory. It didn't recognise ".." with a null termination as
being ".."
This commit is contained in:
Andrew Tridgell -
parent 8095375623
commit a75a2e9e2f

View File

@ -622,7 +622,7 @@ static BOOL get_lanman2_dir_entry(connection_struct *conn,
*(p+2) = 0;
}
p += 2 + 24;
len = srvstr_push(outbuf, p, fname, -1, STR_TERMINATE);
len = srvstr_push(outbuf, p, fname, -1, 0);
SIVAL(q,0,len);
p += len;
len = PTR_DIFF(p, pdata);
@ -643,7 +643,7 @@ static BOOL get_lanman2_dir_entry(connection_struct *conn,
p += 16;
SIVAL(p,0,nt_extmode); p += 4;
p += 4;
len = srvstr_push(outbuf, p, fname, -1, STR_TERMINATE);
len = srvstr_push(outbuf, p, fname, -1, 0);
SIVAL(p, -4, len);
p += len;
len = PTR_DIFF(p, pdata);
@ -666,7 +666,7 @@ static BOOL get_lanman2_dir_entry(connection_struct *conn,
p += 4;
SIVAL(p,0,0); p += 4;
len = srvstr_push(outbuf, p, fname, -1, STR_TERMINATE);
len = srvstr_push(outbuf, p, fname, -1, 0);
SIVAL(p, -4, len);
p += len;
@ -680,7 +680,9 @@ static BOOL get_lanman2_dir_entry(connection_struct *conn,
p += 4;
SIVAL(p,0,reskey); p += 4;
p += 4;
len = srvstr_push(outbuf, p, fname, -1, STR_TERMINATE);
/* this must *not* be null terminated or w2k gets in a loop trying to set an
acl on a dir (tridge) */
len = srvstr_push(outbuf, p, fname, -1, 0);
SIVAL(p, -4, len);
p += len;
len = PTR_DIFF(p, pdata);