mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 19:01:57 -04:00
Add new build option to allow symlinks
This commit is contained in:
parent
dccba9fd8c
commit
2f5ffc3e90
3 changed files with 15 additions and 1 deletions
|
|
@ -198,7 +198,10 @@ static int verify_executable(const char* exec_path, char* resolved_path)
|
|||
* Open the executable
|
||||
* O_NOFOLLOW prevents following symlinks to mitigate redirection attacks
|
||||
*/
|
||||
int fd = openat(dir_fd, exec_name, O_RDONLY | O_NOFOLLOW
|
||||
int fd = openat(dir_fd, exec_name, O_RDONLY
|
||||
#if !HAVE_SYMLINK_TOOLS
|
||||
| O_NOFOLLOW
|
||||
#endif
|
||||
#if !HAVE_FEXECVE
|
||||
| O_CLOEXEC /* with fexecve cannot use O_CLOEXEC (Close on Exec) */
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue