]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libsmb: Ask for posix semantics if requested
authorVolker Lendecke <vl@samba.org>
Tue, 19 Sep 2023 19:29:11 +0000 (12:29 -0700)
committerJeremy Allison <jra@samba.org>
Thu, 12 Oct 2023 16:55:34 +0000 (16:55 +0000)
This is so far only for the getattr-style smb311 calls to request
case-sensitive semantics when "posix" was requested over smb311.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/libsmb/cli_smb2_fnum.c

index 1939db1b71151671a26c69fc781bcf4413985690..c295d11976ef5fca4fe80cf1963dbdcc3cd32819 100644 (file)
@@ -246,6 +246,24 @@ struct tevent_req *cli_smb2_create_fnum_send(
                create_options |= FILE_OPEN_FOR_BACKUP_INTENT;
        }
 
+       if (cli->smb2.client_smb311_posix) {
+               uint8_t modebuf[4] = {
+                       0,
+               };
+
+               status =
+                       smb2_create_blob_add(state,
+                                            &state->in_cblobs,
+                                            SMB2_CREATE_TAG_POSIX,
+                                            (DATA_BLOB){
+                                                    .data = modebuf,
+                                                    .length = sizeof(modebuf),
+                                            });
+               if (tevent_req_nterror(req, status)) {
+                       return tevent_req_post(req, ev);
+               }
+       }
+
        /* Check for @GMT- paths. Remove the @GMT and turn into TWrp if so. */
        have_twrp = clistr_smb2_extract_snapshot_token(fname, &ntt);
        if (have_twrp) {