diff options
author | Andrew Tridgell <tridge@samba.org> | 2002-02-25 02:12:38 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2002-02-25 02:12:38 +0000 |
commit | c75396cf49bb3640b07f105b72b4ddad056bd7cc (patch) | |
tree | 5371c3d8651ef65168223b352206536ad92f186a /source3/smbd | |
parent | 80592054fb0e95a977707f6701c52f494685dd5c (diff) | |
download | samba-c75396cf49bb3640b07f105b72b4ddad056bd7cc.tar.gz samba-c75396cf49bb3640b07f105b72b4ddad056bd7cc.tar.bz2 samba-c75396cf49bb3640b07f105b72b4ddad056bd7cc.zip |
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 used to be commit a75a2e9e2f11e27ca8a7fbad8c0108a2aee0a690)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/trans2.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 84ab7286e5..8e2bfd14b0 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -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); |