Commit Graph

38 Commits

Author SHA1 Message Date
Luke Dashjr
cbd3aa51b7 Merge rpccookieperms_octal_compat-28+knots 2025-03-05 03:27:08 +00:00
Luke Dashjr
e57bd40ca9 RPC: Delete cookie file before replacing it
Unclear if this is the best thing to do, but due to v26.1.knots20240325 creating it read-only, it is somewhat necessary for now
2025-02-21 17:31:36 +00:00
Luke Dashjr
783fbafb67 Bugfix: RPC: Attempt to delete cookie tmp before creating it
May be needed if we ended up with a read-only tmp file
2025-02-21 17:31:36 +00:00
Luke Dashjr
051c276b67 Skip changing permissions entirely if -rpccookieperms=0 specified 2025-02-21 17:31:36 +00:00
Luke Dashjr
d307da8781 rpccookieperms: Allow setting setxid/sticky bits
Simply for backward compatibility
2025-02-21 17:31:36 +00:00
Luke Dashjr
0a4e77a361 QA: rpc_users: Extend rpccookieperms test to octal values 2025-02-21 17:31:36 +00:00
Luke Dashjr
eaaa8e1d51 QA: rpc_users: Test rpcauth wallet restrictions 2025-02-21 16:30:03 +00:00
Luke Dashjr
38698fecf6 Merge branch 'improve_args_pr31212-28' into multiwallet_rpc-28+knots 2025-02-21 16:29:54 +00:00
Hodlinator
56c374dfad test: -norpccookiefile
Both bitcoind and bitcoin-cli.

Github-Pull: #31212
Rebased-From: 7402658bc2
2025-01-08 18:48:13 +00:00
Hodlinator
9b90eea2a1 test: Harden testing of cookie file existence
Github-Pull: #31212
Rebased-From: 6e28c76907
2025-01-08 18:48:13 +00:00
Luke Dashjr
06a4368d84 Ignore -rpcauthfile params if -norpcauth is used 2024-09-03 14:18:15 +00:00
Luke Dashjr
6e104095c2 QA: rpc_users: Add tests for rpcauthfile 2024-09-03 14:17:57 +00:00
Luke Dashjr
6bb3773aa6 Merge branch 'fix_rpcauth_blank' into rpcauthfile-28+knots 2024-09-03 13:53:22 +00:00
Hennadii Stepanov
a0473442d1
scripted-diff: Add __file__ argument to BitcoinTestFramework.init()
-BEGIN VERIFY SCRIPT-
sed -i -e 's/\s*().main\s*()/(__file__).main()/' $(git ls-files test/functional/*.py)
sed -i -e 's/def __init__(self)/def __init__(self, test_file)/' test/functional/test_framework/test_framework.py
-END VERIFY SCRIPT-
2024-07-16 22:06:47 +01:00
willcl-ark
d2afa2690c
test: add rpccookieperms test
Tests various perms on non-Windows OSes
2024-06-27 15:08:23 +01:00
Luke Dashjr
6b79de4f9a QA: rpc_users: Test behaviour of -norpcauth 2023-12-26 21:55:08 +00:00
Luke Dashjr
415734ebaf QA: rpc_users: Test blank rpcauth in combination with non-blank 2023-12-23 18:48:02 +00:00
MarcoFalke
aaaa3aefbd
test: Use TestNode *_path properties where possible
Seems odd to place the burden on test writers to hardcode the chain or
datadir path for the nodes under test.
2023-06-21 08:49:18 +02:00
MarcoFalke
fa8fe5b696
scripted-diff: Use new python 3.7 keywords
-BEGIN VERIFY SCRIPT-
 sed -i 's/universal_newlines/text/g' $(git grep -l universal_newlines)
-END VERIFY SCRIPT-
2023-01-18 13:00:34 +01:00
Hennadii Stepanov
306ccd4927
scripted-diff: Bump copyright headers
-BEGIN VERIFY SCRIPT-
./contrib/devtools/copyright_header.py update ./
-END VERIFY SCRIPT-

Commits of previous years:
- 2021: f47dda2c58
- 2020: fa0074e2d8
- 2019: aaaaad6ac9
2022-12-24 23:49:50 +00:00
MacroFake
fa12706fc6
Reject invalid rpcauth formats 2022-04-30 12:53:35 +02:00
MarcoFalke
fa0074e2d8
scripted-diff: Bump copyright headers
-BEGIN VERIFY SCRIPT-
./contrib/devtools/copyright_header.py update ./
-END VERIFY SCRIPT-
2020-12-31 09:45:41 +01:00
João Barbosa
46001323b1 rpc: Validate -rpcauth arguments 2020-11-23 21:02:54 +00:00
MarcoFalke
faf45d1f1f
http: Avoid crash when g_thread_http was never started
g_thread_http can not be joined when it is not joinable. Avoid crashing
the node by adding the required check and add a test.
2020-05-19 10:41:44 -04:00
MarcoFalke
fa12a37b27
test: Replace inline-comments with logs, pep8 formatting 2020-05-19 10:41:30 -04:00
MarcoFalke
aaaaad6ac9
scripted-diff: Bump copyright of files changed in 2019
-BEGIN VERIFY SCRIPT-
./contrib/devtools/copyright_header.py update ./
-END VERIFY SCRIPT-
2019-12-30 10:42:20 +13:00
practicalswift
993e38a4e2 tests: Mark functional tests not supporting bitcoin-cli (--usecli) as such 2019-12-06 14:40:28 +00:00
Carl Dong
e263a343d4
test: rpc_users: Make variable names more clear. 2019-07-08 16:13:35 -04:00
Carl Dong
830dc2dd0f
test: rpc_users: Also test rpcauth.py with specified password. 2019-07-08 16:13:34 -04:00
Carl Dong
c73d871799
test: rpc_users: Add function for testing auth params. 2019-07-08 16:13:33 -04:00
Carl Dong
604e2a997f
test: rpc_users: Add function for auth'd requests. 2019-07-08 16:13:32 -04:00
MarcoFalke
1b04b55f2d
Merge #13867: qa: Make extended tests pass on native Windows
fafe73a626 qa: Raise feature_help timeout to 5s (MarcoFalke)
faabd7bc47 qa: Use files for stdout/stderr to support Windows (MarcoFalke)
facb56ffaf qa: Run gen_rpcauth with sys.executable (MarcoFalke)
fada8966c5 qa: Close stdout and stderr file when node stops (MarcoFalke)

Pull request description:

  ### qa: Close stdout and stderr file when node stops

  Since these files are potentially deleted by the test framework for cleanup, they should be closed first. Otherwise this will lead to errors on Windows when the tests finish successfully.

  Side note: After the patch, it is no longer possible to reopen the file on Windows (see https://docs.python.org/3/library/tempfile.html#tempfile.NamedTemporaryFile)

  ### qa: Run gen_rpcauth with sys.executable

  Similar to `test_runner.py`, the `sys.executable` needs to be passed down into subprocesses to pass on native Windows. (Should have no effect on Linux)

  ###   qa: Use files for stdout/stderr to support Windows

  It seems that using PIPE is not supported on Windows. Also, it is easier to just use the files that capture the stdout and stderr within the test node class.

Tree-SHA512: ec675012b10705978606b7fcbdb287c39a8e6e3732aae2fa4041d963a3c6993c6eac6a9a3cbd5479514e7d8017fe74c12235d1ed6fed2e8af8f3c71981e91864
2018-08-11 07:01:37 -04:00
MarcoFalke
facb56ffaf
qa: Run gen_rpcauth with sys.executable 2018-08-03 16:25:54 -04:00
DrahtBot
eb7daf4d60 Update copyright headers to 2018 2018-07-27 07:15:02 -04:00
Mason Simon
c64cc1bd94 scripted-diff: Fix references to share/rpcuser (now share/rpcauth)
Commit 3fdb29778a renamed share/rpcuser to share/rpcauth but left references to the old path in code; this commit fixes the old references.

Performed update using https://github.com/facebook/codemod with command: `codemod --extensions cpp,py,md 'share/rpcuser' 'share/rpcauth'`

-BEGIN VERIFY SCRIPT-
git grep --files-with-matches 'share/rpcuser' src/*.cpp | xargs sed -i -E 's:share/rpcuser:share/rpcauth:g'
git grep --files-with-matches 'share/rpcuser' test/functional/*.py | xargs sed -i -E 's:share/rpcuser:share/rpcauth:g'
-END VERIFY SCRIPT-
2018-07-15 17:56:02 -07:00
Chun Kuan Lee
8b8032e283
test: Add rpcauth pair that generated by rpcauth 2018-04-23 06:32:58 +08:00
MarcoFalke
c8330d4216 qa: Use node.datadir instead of tmpdir in test framework 2018-03-19 12:26:00 -04:00
Anthony Towns
81b79f2c39 [tests] Rename rpc_* functional tests. 2018-01-25 09:44:29 +10:00