From 0b30e6770105c54816c69aad3a6fc0b9cd2c1a10 Mon Sep 17 00:00:00 2001 From: willcl-ark Date: Tue, 9 Jan 2024 11:48:09 +0000 Subject: [PATCH] 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 --- src/httprpc.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/httprpc.h b/src/httprpc.h index 404d13083f..9317cb8175 100644 --- a/src/httprpc.h +++ b/src/httprpc.h @@ -6,6 +6,12 @@ #define BITCOIN_HTTPRPC_H #include +#include + +/** 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.