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>
This commit is contained in:
parent
b41d5c10ad
commit
2b3904d233
|
@ -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 ) != 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 */
|
/* set executable bit where read bit is set */
|
||||||
st.st_mode |= (st.st_mode & 0444) >> 2;
|
st.st_mode |= (st.st_mode & 0444) >> 2;
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue