smbd: Ignore incoming POSIX create context
authorVolker Lendecke <vl@samba.org>
Tue, 4 Feb 2020 15:19:05 +0000 (17:19 +0200)
committerJeremy Allison <jra@samba.org>
Fri, 7 Feb 2020 21:01:31 +0000 (21:01 +0000)
We will use this internally and can only expose this once SMB3.11 unix
extensions are activated for the client.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/smb2_create.c

index bf0c3912c076aadef58469fe03b36b87487555b9..2221c4c7d0d99356f97ff4e082a45fd18577d143 100644 (file)
@@ -551,6 +551,14 @@ static NTSTATUS smbd_smb2_create_fetch_create_ctx(
        struct smbd_smb2_create_state *state = tevent_req_data(
                req, struct smbd_smb2_create_state);
 
+       /*
+        * For now, remove the posix create context from the wire. We
+        * are using it inside smbd and will properly use it once
+        * smb3.11 unix extensions will be done. So in the future we
+        * will remove it only if unix extensions are not negotiated.
+        */
+       smb2_create_blob_remove(in_context_blobs, SMB2_CREATE_TAG_POSIX);
+
        state->dhnq = smb2_create_blob_find(in_context_blobs,
                                            SMB2_CREATE_TAG_DHNQ);
        state->dhnc = smb2_create_blob_find(in_context_blobs,