Don't open symlinks when opening logfile

This commit is contained in:
baldurk
2023-05-19 10:47:12 +01:00
parent 1f72a09e3b
commit 203fc8382a
+2 -2
View File
@@ -497,8 +497,8 @@ rdcstr logfile_readall(uint64_t offset, const rdcstr &filename)
LogFileHandle *logfile_open(const rdcstr &filename)
{
int fd =
open(filename.c_str(), O_APPEND | O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
int fd = open(filename.c_str(), O_APPEND | O_WRONLY | O_CREAT | O_NOFOLLOW,
S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
if(fd < 0)
{