]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Simplify fdos_mode
authorVolker Lendecke <vl@samba.org>
Tue, 25 Jun 2024 14:04:53 +0000 (16:04 +0200)
committerRalph Boehme <slow@samba.org>
Fri, 28 Jun 2024 13:26:24 +0000 (13:26 +0000)
We don't need the outer !NT_STATUS_IS_OK and the comment

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/dosmode.c

index e0a6f1672b0644c952394849792a11cbf0d8a38b..51d9c0508fe4a8fa5e6faa3a93db584dad04d60a 100644 (file)
@@ -719,15 +719,11 @@ uint32_t fdos_mode(struct files_struct *fsp)
        status = SMB_VFS_FGET_DOS_ATTRIBUTES(fsp->conn,
                                             metadata_fsp(fsp),
                                             &result);
-       if (!NT_STATUS_IS_OK(status)) {
-               /*
-                * Only fall back to using UNIX modes if we get NOT_IMPLEMENTED.
-                */
-               if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_IMPLEMENTED)) {
-                       result |= dos_mode_from_sbuf(fsp->conn,
-                                                    &fsp->fsp_name->st,
-                                                    fsp);
-               }
+
+       if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_IMPLEMENTED)) {
+               result |= dos_mode_from_sbuf(fsp->conn,
+                                            &fsp->fsp_name->st,
+                                            fsp);
        }
 
        fsp->fsp_name->st.cached_dos_attributes = dos_mode_post(result, fsp, __func__);