]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: Remove the NULL fsp use of refuse_symlink().
authorJeremy Allison <jra@samba.org>
Thu, 20 May 2021 18:55:45 +0000 (11:55 -0700)
committerRalph Boehme <slow@samba.org>
Wed, 9 Jun 2021 13:14:30 +0000 (13:14 +0000)
It makes no sense here and will allow us to rename
refuse_symlink() -> refuse_symlink_fsp() and clean it up.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/trans2.c

index 2777124c8c6f429b48a1378de13152e2a4b2f418..9d8bbdf84eca931755f0f505592ccf8bd5ed6301 100644 (file)
@@ -6858,17 +6858,9 @@ static NTSTATUS smb_info_set_ea(connection_struct *conn,
                 * and we're in POSIX context.
                 * Ensure this is the case.
                 *
-                * There is still a race condition in that
-                * the symlink could be changed after we
-                * checked it, so ensure we only operate
-                * EA setting on a file handle.
+                * In this case we cannot set the EA.
                 */
                SMB_ASSERT(smb_fname->flags & SMB_FILENAME_POSIX_PATH);
-               if (!(smb_fname->flags & SMB_FILENAME_POSIX_PATH)) {
-                       return NT_STATUS_ACCESS_DENIED;
-               }
-               status = refuse_symlink(conn, NULL, smb_fname);
-               SMB_ASSERT(NT_STATUS_EQUAL(status, NT_STATUS_ACCESS_DENIED));
                return NT_STATUS_ACCESS_DENIED;
        }