rpc: add default 600 permissions for cookie file

Set owner read/write permissions on cookie files by default.
On Windows this will cause the write bit to be set.

Github-Pull: #28167
Rebased-From: 35df85346438258e1bb5f736e9c4d48cf59e6547
This commit is contained in:
willcl-ark 2024-01-09 11:48:09 +00:00 committed by Luke Dashjr
parent 907996129b
commit 0b30e67701

View File

@ -6,6 +6,12 @@
#define BITCOIN_HTTPRPC_H
#include <any>
#include <util/fs.h>
/** Default permissions for cookie file.
* Set to owner read/write, which on Windows sets the write permission.
*/
const fs::perms DEFAULT_COOKIE_PERMS{fs::perms::owner_read | fs::perms::owner_write};
/** Start HTTP RPC subsystem.
* Precondition; HTTP and RPC has been started.