server: Check whether the new file name is executable.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
feature/deterministic
Zebediah Figura 2020-03-30 00:12:18 -05:00 committed by Alexandre Julliard
parent b41d5c10ad
commit 2b3904d233
1 changed files with 1 additions and 1 deletions

View File

@ -2438,7 +2438,7 @@ static void set_fd_name( struct fd *fd, struct fd *root, const char *nameptr,
if (is_file_executable( fd->unix_name ) != is_file_executable( name ) && !fstat( fd->unix_fd, &st ))
{
if (is_file_executable( fd->unix_name ))
if (is_file_executable( name ))
/* set executable bit where read bit is set */
st.st_mode |= (st.st_mode & 0444) >> 2;
else