mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
init: add option for rpccookie permissions
Add a bitcoind launch option `-rpccookieperms` to configure the file permissions of the cookie on Unix systems.
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user