mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-24 22:58:50 +01:00
Permit filesystem group to be root
This commit is contained in:
parent
d68b7fd442
commit
08c7ceb5df
2 changed files with 7 additions and 1 deletions
6
changes/bug17562-allow-root-group-read
Normal file
6
changes/bug17562-allow-root-group-read
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
o Minor bug fixes:
|
||||||
|
- If any directory created by Tor is marked as group readable, the
|
||||||
|
filesystem group is allowed to be either the default GID or the root
|
||||||
|
user. Allowing root to read the DataDirectory prevents the need for
|
||||||
|
CAP_READ_SEARCH when using systemd's CapabilityBoundingSet, or
|
||||||
|
dac_read_search when using SELinux.
|
|
@ -2143,7 +2143,7 @@ check_private_dir(const char *dirname, cpd_check_t check,
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if ( (check & (CPD_GROUP_OK|CPD_GROUP_READ))
|
if ( (check & (CPD_GROUP_OK|CPD_GROUP_READ))
|
||||||
&& (st.st_gid != running_gid) ) {
|
&& (st.st_gid != running_gid) && (st.st_gid != 0)) {
|
||||||
struct group *gr;
|
struct group *gr;
|
||||||
char *process_groupname = NULL;
|
char *process_groupname = NULL;
|
||||||
gr = getgrgid(running_gid);
|
gr = getgrgid(running_gid);
|
||||||
|
|
Loading…
Add table
Reference in a new issue