|
|
3addba3 |
From 8b43cb98bf31a30c5d0ee5c580520797697078b2 Mon Sep 17 00:00:00 2001
|
|
|
3addba3 |
From: Jamie Nguyen <j@jamielinux.com>
|
|
|
3addba3 |
Date: Fri, 13 Nov 2015 14:17:02 +0000
|
|
|
3addba3 |
Subject: [PATCH 1/3] Permit filesystem group to be root
|
|
|
3addba3 |
|
|
|
3addba3 |
---
|
|
|
3addba3 |
changes/bug17562-allow-root-group-read | 6 ++++++
|
|
|
3addba3 |
src/common/util.c | 2 +-
|
|
|
3addba3 |
2 files changed, 7 insertions(+), 1 deletion(-)
|
|
|
3addba3 |
create mode 100644 changes/bug17562-allow-root-group-read
|
|
|
3addba3 |
|
|
|
3addba3 |
diff --git a/changes/bug17562-allow-root-group-read b/changes/bug17562-allow-root-group-read
|
|
|
3addba3 |
new file mode 100644
|
|
|
3addba3 |
index 0000000..7a0903c
|
|
|
3addba3 |
--- /dev/null
|
|
|
3addba3 |
+++ b/changes/bug17562-allow-root-group-read
|
|
|
3addba3 |
@@ -0,0 +1,6 @@
|
|
|
3addba3 |
+ o Minor bug fixes:
|
|
|
3addba3 |
+ - If any directory created by Tor is marked as group readable, the
|
|
|
3addba3 |
+ filesystem group is allowed to be either the default GID or the root
|
|
|
3addba3 |
+ user. Allowing root to read the DataDirectory prevents the need for
|
|
|
3addba3 |
+ CAP_READ_SEARCH when using systemd's CapabilityBoundingSet, or
|
|
|
3addba3 |
+ dac_read_search when using SELinux.
|
|
|
3addba3 |
diff --git a/src/common/util.c b/src/common/util.c
|
|
|
3addba3 |
index b33c80f..c0178a3 100644
|
|
|
3addba3 |
--- a/src/common/util.c
|
|
|
3addba3 |
+++ b/src/common/util.c
|
|
|
3addba3 |
@@ -2116,7 +2116,7 @@ check_private_dir(const char *dirname, cpd_check_t check,
|
|
|
3addba3 |
return -1;
|
|
|
3addba3 |
}
|
|
|
3addba3 |
if ( (check & (CPD_GROUP_OK|CPD_GROUP_READ))
|
|
|
3addba3 |
- && (st.st_gid != running_gid) ) {
|
|
|
3addba3 |
+ && (st.st_gid != running_gid) && (st.st_gid != 0)) {
|
|
|
3addba3 |
struct group *gr;
|
|
|
3addba3 |
char *process_groupname = NULL;
|
|
|
3addba3 |
gr = getgrgid(running_gid);
|
|
|
3addba3 |
--
|
|
|
3addba3 |
2.5.0
|
|
|
3addba3 |
|