aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/protocol.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2017-08-25 12:39:30 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2017-08-25 15:37:24 +0200
commit82dd7195e1fb943f9cd45a48188f9678219c0206 (patch)
tree01080ed5fe5bef69ea7288bf04811d52bc4e18aa /src/rpc/protocol.h
parent3f726c99f819f97f2ab21b94d34c6b3129cd883a (diff)
downloadbitcoin-82dd7195e1fb943f9cd45a48188f9678219c0206.tar.xz
rpc: Write authcookie atomically
Use POSIX rename atomicity at the `bitcoind` side to create a working cookie atomically: - Write `.cookie.tmp`, close file - Rename `.cookie.tmp` to `.cookie` This avoids clients reading invalid/partial cookies as in #11129.
Diffstat (limited to 'src/rpc/protocol.h')
-rw-r--r--src/rpc/protocol.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/rpc/protocol.h b/src/rpc/protocol.h
index 4bd4702d62..5c9c64f67d 100644
--- a/src/rpc/protocol.h
+++ b/src/rpc/protocol.h
@@ -91,8 +91,6 @@ UniValue JSONRPCReplyObj(const UniValue& result, const UniValue& error, const Un
std::string JSONRPCReply(const UniValue& result, const UniValue& error, const UniValue& id);
UniValue JSONRPCError(int code, const std::string& message);
-/** Get name of RPC authentication cookie file */
-fs::path GetAuthCookieFile();
/** Generate a new RPC authentication cookie and write it to disk */
bool GenerateAuthCookie(std::string *cookie_out);
/** Read the RPC authentication cookie from disk */