]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
better error message when you set User but start tor as non-root.
authorRoger Dingledine <arma@torproject.org>
Mon, 10 Nov 2008 00:41:07 +0000 (00:41 +0000)
committerRoger Dingledine <arma@torproject.org>
Mon, 10 Nov 2008 00:41:07 +0000 (00:41 +0000)
hopefully will address bug 857.

svn:r17232

src/common/compat.c

index 42d1754ee1ffb58f29b86deec099d405700f2e96..bf7e27e1860e777cfc70343932448a38e10edcbb 100644 (file)
@@ -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;
   }