smbd: add twrp arg to synthetic_smb_fname()
[amitay/samba.git] / source3 / smbd / dosmode.c
index 2c4efa0fcff8f1947943d937a10f8a739eda9571..9bb8d1c1941659b52a52dfc9641fe0e02745ae2e 100644 (file)
@@ -535,8 +535,11 @@ NTSTATUS set_ea_dos_attribute(connection_struct *conn,
                        return NT_STATUS_ACCESS_DENIED;
                }
 
-               status = smbd_check_access_rights(conn, smb_fname, false,
-                                                 FILE_WRITE_ATTRIBUTES);
+               status = smbd_check_access_rights(conn,
+                                       conn->cwd_fsp,
+                                       smb_fname,
+                                       false,
+                                       FILE_WRITE_ATTRIBUTES);
                if (NT_STATUS_IS_OK(status)) {
                        set_dosmode_ok = true;
                }
@@ -907,6 +910,7 @@ static void dos_mode_at_vfs_get_dosmode_done(struct tevent_req *subreq)
                                       path,
                                       NULL,
                                       &state->smb_fname->st,
+                                      state->smb_fname->twrp,
                                       0);
        if (tevent_req_nomem(smb_path, req)) {
                return;
@@ -1318,6 +1322,7 @@ NTSTATUS set_create_timespec_ea(connection_struct *conn,
                                        psmb_fname->base_name,
                                        NULL,
                                        &psmb_fname->st,
+                                       psmb_fname->twrp,
                                        psmb_fname->flags);
 
        if (smb_fname == NULL) {