s3: smbd: If EA's are turned off on a share don't allow an SMB2 create containing...
authorJeremy Allison <jra@samba.org>
Wed, 4 Nov 2015 17:34:57 +0000 (09:34 -0800)
committerUri Simchoni <uri@samba.org>
Wed, 4 Nov 2015 21:14:22 +0000 (22:14 +0100)
Otherwise a create that should have failed may succeed.

Based on an original patch from John Mulligan <phlogistonjohn@asynchrono.us>
and comments from Uri Simchoni <uri@samba.org>

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Autobuild-User(master): Uri Simchoni <uri@samba.org>
Autobuild-Date(master): Wed Nov  4 22:14:22 CET 2015 on sn-devel-104

source3/smbd/smb2_create.c

index e151e9673fb7ece6ab96b58e52dcf13f80ace65f..1b12962f4575faa279ff84fd443792ba7a053a56 100644 (file)
@@ -707,6 +707,12 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX *mem_ctx,
                }
 
                if (exta) {
+                       if (!lp_ea_support(SNUM(smb2req->tcon->compat))) {
+                               tevent_req_nterror(req,
+                                       NT_STATUS_EAS_NOT_SUPPORTED);
+                               return tevent_req_post(req, ev);
+                       }
+
                        ea_list = read_nttrans_ea_list(mem_ctx,
                                (const char *)exta->data.data, exta->data.length);
                        if (!ea_list) {