aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/request.h
diff options
context:
space:
mode:
authorwillcl-ark <will@256k1.dev>2024-01-08 15:02:44 +0000
committerwillcl-ark <will@256k1.dev>2024-06-27 15:08:19 +0100
commitf467aede78533dac60a118e1566138d65522c213 (patch)
tree5acfdef9cea45663d07c7bb9d2d8e859807f94de /src/rpc/request.h
parent7df03f1a923e239cea8c9b0d603a9eb00863a40c (diff)
init: add option for rpccookie permissions
Add a bitcoind launch option `-rpccookieperms` to configure the file permissions of the cookie on Unix systems.
Diffstat (limited to 'src/rpc/request.h')
-rw-r--r--src/rpc/request.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rpc/request.h b/src/rpc/request.h
index a682c58d96..c7e723d962 100644
--- a/src/rpc/request.h
+++ b/src/rpc/request.h
@@ -7,9 +7,11 @@
#define BITCOIN_RPC_REQUEST_H
#include <any>
+#include <optional>
#include <string>
#include <univalue.h>
+#include <util/fs.h>
UniValue JSONRPCRequestObj(const std::string& strMethod, const UniValue& params, const UniValue& id);
UniValue JSONRPCReplyObj(const UniValue& result, const UniValue& error, const UniValue& id);
@@ -17,7 +19,7 @@ std::string JSONRPCReply(const UniValue& result, const UniValue& error, const Un
UniValue JSONRPCError(int code, const std::string& message);
/** Generate a new RPC authentication cookie and write it to disk */
-bool GenerateAuthCookie(std::string *cookie_out);
+bool GenerateAuthCookie(std::string* cookie_out, std::optional<fs::perms> cookie_perms=std::nullopt);
/** Read the RPC authentication cookie from disk */
bool GetAuthCookie(std::string *cookie_out);
/** Delete RPC authentication cookie from disk */