aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2008-11-10 00:41:07 +0000
committerRoger Dingledine <arma@torproject.org>2008-11-10 00:41:07 +0000
commit0554e87f58216a0abefb3867278103f39ee63814 (patch)
tree1335ef23d5dabf3b8bc90f738f1c0dfafc650732 /src
parent4d8799b9874aa55639c26239b66812d63b43023e (diff)
downloadtor-0554e87f58216a0abefb3867278103f39ee63814.tar
tor-0554e87f58216a0abefb3867278103f39ee63814.tar.gz
better error message when you set User but start tor as non-root.
hopefully will address bug 857. svn:r17232
Diffstat (limited to 'src')
-rw-r--r--src/common/compat.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/compat.c b/src/common/compat.c
index 42d1754ee..bf7e27e18 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -1052,7 +1052,8 @@ switch_id(const char *user)
/* Properly switch egid,gid,euid,uid here or bail out */
if (setgroups(1, &pw->pw_gid)) {
- log_warn(LD_GENERAL, "Error setting groups to gid %d: %s",
+ log_warn(LD_GENERAL, "Error setting groups to gid %d: \"%s\". "
+ "If you set the \"User\" option, you must start Tor as root.",
(int)pw->pw_gid, strerror(errno));
return -1;
}