Skip to content

Commit

Permalink
Merge pull request FEX-Emu#3607 from teohhanhui/fix/open-mode
Browse files Browse the repository at this point in the history
Pass compulsory `mode` argument to `open` when `O_CREAT` is used
  • Loading branch information
Sonicadvance1 authored May 2, 2024
2 parents 7c79e5d + 7519af2 commit f70aafb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Source/Tools/FEXLoader/FEXLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,8 @@ int main(int argc, char** argv, char** const envp) {
LogMan::Msg::InstallHandler(FEXServerLogging::MsgHandler);
}
} else if (!LogFile.empty()) {
OutputFD = open(LogFile.c_str(), O_CREAT | O_CLOEXEC | O_WRONLY);
constexpr int USER_PERMS = S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH;
OutputFD = open(LogFile.c_str(), O_CREAT | O_CLOEXEC | O_WRONLY, USER_PERMS);
}
}

Expand Down

0 comments on commit f70aafb

Please sign in to comment.