s3-smbd: Fix old DOS client doing wildcard delete - gives a attribute type of zero
authorJeremy Allison <jra@samba.org>
Mon, 19 Oct 2015 23:04:02 +0000 (16:04 -0700)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 21 Oct 2015 06:25:26 +0000 (08:25 +0200)
In the wildcard delete path we forgot to map 0 -> FILE_ATTRIBUTE_NORMAL
as we do in the non-wildcard delete path.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11452

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/smbd/reply.c

index bebb789dfe76b0b6a0dcada2af68154a75ba5729..c796c00ff19d36ed3222f68b9dc7b14b2648e8cb 100644 (file)
@@ -2915,6 +2915,9 @@ NTSTATUS unlink_internals(connection_struct *conn, struct smb_request *req,
                        status = NT_STATUS_OBJECT_NAME_INVALID;
                        goto out;
                }
+               if (dirtype == 0) {
+                       dirtype = FILE_ATTRIBUTE_NORMAL;
+               }
 
                if (strequal(fname_mask,"????????.???")) {
                        TALLOC_FREE(fname_mask);