From: Jeremy Allison Date: Thu, 20 May 2021 18:55:45 +0000 (-0700) Subject: s3: smbd: Remove the NULL fsp use of refuse_symlink(). X-Git-Tag: tevent-0.11.0~630 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8f9606b26d69ecb0c42d044f6ce183186d97af7f;p=thirdparty%2Fsamba.git s3: smbd: Remove the NULL fsp use of refuse_symlink(). 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 Reviewed-by: Ralph Boehme --- diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 2777124c8c6..9d8bbdf84ec 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -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; }