[PATCH] server: Check whether the new file name is executable.
30 Mar
2020
30 Mar
'20
12:12 a.m.
Fixes: 4a43546b341917072fd0faa60abd2360203ae533 Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> --- server/fd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/fd.c b/server/fd.c index 5019ae2da00..d4584f73268 100644 --- a/server/fd.c +++ b/server/fd.c @@ -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 -- 2.25.1
2173
Age (days ago)
2173
Last active (days ago)
0 comments
1 participants
participants (1)
-
Zebediah Figura