Bug 11452 - DOS Client Cannot Delete *.*
DOS Client Cannot Delete *.*
Product: Samba 4.1 and newer
Classification: Unclassified
Component: File services
All All
: P5 normal
: ---
Assigned To: Karolin Seeger
Samba QA Contact
Depends on:
  Show dependency treegraph
Reported: 2015-08-17 14:26 UTC by Adan Calderon
Modified: 2015-10-29 11:46 UTC (History)
5 users (show)

See Also:

smb.conf used on a slackware 64 server (1.19 KB, text/plain)
2015-08-17 14:26 UTC, Adan Calderon
no flags Details
tar gzip of log level 10 (28.96 KB, application/gzip)
2015-09-08 02:43 UTC, Adan Calderon
no flags Details
Wire Shark Capture (19.51 KB, application/octet-stream)
2015-09-08 02:45 UTC, Adan Calderon
no flags Details
git-am fix for master. (4.39 KB, patch)
2015-10-19 23:25 UTC, Jeremy Allison
no flags Details
Fixed patch for mater (fixes samba3.raw.unlink error). (5.62 KB, patch)
2015-10-20 19:40 UTC, Jeremy Allison
no flags Details
git-am fix for 4.3.x, 4.2.x. (5.88 KB, patch)
2015-10-21 17:33 UTC, Jeremy Allison
asn: review+
jra: review? (slow)

Note You need to log in before you can comment on or make changes to this bug.
Description Adan Calderon 2015-08-17 14:26:51 UTC
Created attachment 11343 [details]
smb.conf used on a slackware 64 server

File in Root directory can not be deleted using the MS DOS Client 3.0. 

For example:

Typing on the DOS Console
mkdir ADIR             ENTER KEY
CD ADIR                ENTER KEY
copy con A             ENTER KEY
Some garbage Text^Z    F6 KEY Followed by ENTER KEY

del *.*                ENTER KEY
This is followed by Are you sure (Y/N)?y

Pressing Y and enter is then followed by 
File not Found

del A

works fine.

I tested this on a slackware 64 bit as well as a 32 bit.

Repeating the same operations using a windows 7 client on a mapped drive work.

Comment 1 Jeremy Allison 2015-08-24 23:15:16 UTC
Please upload wireshark trace and debug level 10 log between client and server.

Thanks !

Comment 2 Adan Calderon 2015-09-08 02:43:55 UTC
Created attachment 11417 [details]
tar gzip of log level 10
Comment 3 Adan Calderon 2015-09-08 02:45:38 UTC
Created attachment 11418 [details]
Wire Shark Capture

I mounted \\server\drived

created a file with copy con A

tried deleting it with del *.*

Finally deleted it using del A
Comment 4 Jeremy Allison 2015-10-19 22:16:03 UTC
OK, I think I've spotted the bug. Missing map of dtype from zero -> FILE_ATTRIBUTE_NORMAL in the wildcard delete case.

Patch to follow.
Comment 5 Jeremy Allison 2015-10-19 23:25:38 UTC
Created attachment 11507 [details]
git-am fix for master.

Submitted to samba-technical.
Comment 6 Jeremy Allison 2015-10-20 19:40:16 UTC
Created attachment 11514 [details]
Fixed patch for mater (fixes samba3.raw.unlink error).

Ah - fails on source4/torture/raw/unlink.c,
but that test code is incorrect anyway (it adds
a special return check for NT_STATUS_NO_SUCH_FILE
if the server is Samba3 - Samba should return
NT_STATUS_OK here as Windows does).

That's kind of funny - as it means we already
had a proper test for this but instead of
noticing and fixing the bug in the server,
we hacked in a "if Samba3" workaround for
our incorrect response :-) :-).

Updated patch attached. Andreas if you
could just review the samba3.raw.unlink
fixup (last hunk of the patch) it's
good to go !

Cheers (and sorry about the error),

Comment 7 Jeremy Allison 2015-10-21 17:33:52 UTC
Created attachment 11519 [details]
git-am fix for 4.3.x, 4.2.x.

Cherry-pick from master.
Comment 8 Andreas Schneider 2015-10-21 18:24:48 UTC
Comment on attachment 11519 [details]
git-am fix for 4.3.x, 4.2.x.

Comment 9 Andreas Schneider 2015-10-21 18:25:27 UTC
Karolin, please add the patches to the next 4.3 and 4.2 release. Thanks!
Comment 10 Karolin Seeger 2015-10-28 09:51:51 UTC
(In reply to Andreas Schneider from comment #9)
Pushed to autobuild-v4-[2|3]-test.
Comment 11 Karolin Seeger 2015-10-29 11:46:35 UTC
(In reply to Karolin Seeger from comment #10)
Pushed to both branches.
Closing out bug report.