diff options
| author | Wladimir J. van der Laan <[email protected]> | 2017-08-25 12:39:30 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2017-08-25 15:37:24 +0200 |
| commit | 82dd7195e1fb943f9cd45a48188f9678219c0206 (patch) | |
| tree | 01080ed5fe5bef69ea7288bf04811d52bc4e18aa /src/rpc/protocol.h | |
| parent | Merge #11112: [developer-notes] By default, declare single-argument construct... (diff) | |
| download | discoin-82dd7195e1fb943f9cd45a48188f9678219c0206.tar.xz discoin-82dd7195e1fb943f9cd45a48188f9678219c0206.zip | |
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.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/rpc/protocol.h b/src/rpc/protocol.h index 4bd4702d6..5c9c64f67 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 */ |