File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -306,8 +306,7 @@ static std::optional<unsigned> StringToOctal(const std::string& str)
306
306
307
307
static auto ConvertPermsToOctal (const std::string& str) noexcept -> std::optional<unsigned>
308
308
{
309
- // Don't permit setting special bits as they're not relevant to cookie files
310
- if (str.length () == 3 ) return StringToOctal (str);
309
+ if ((str.length () == 3 ) || (str.length () == 4 )) return StringToOctal (str);
311
310
return std::nullopt;
312
311
}
313
312
Original file line number Diff line number Diff line change @@ -93,8 +93,9 @@ def test_rpccookieperms(self):
93
93
"group" : 0o640 ,
94
94
"all" : 0o644 ,
95
95
"440" : 0o440 ,
96
- "640 " : 0o640 ,
96
+ "0640 " : 0o640 ,
97
97
"444" : 0o444 ,
98
+ "1660" : 0o1660 ,
98
99
}
99
100
100
101
if platform .system () == 'Windows' :
@@ -104,7 +105,7 @@ def test_rpccookieperms(self):
104
105
self .log .info ('Check cookie file permissions can be set using -rpccookieperms' )
105
106
106
107
cookie_file_path = self .nodes [1 ].chain_path / '.cookie'
107
- PERM_BITS_UMASK = 0o777
108
+ PERM_BITS_UMASK = 0o7777
108
109
109
110
def test_perm (perm : Optional [str ]):
110
111
if not perm :
You can’t perform that action at this time.
0 commit comments