[or-cvs] r17232: {tor} better error message when you set User but start tor as non- (tor/trunk/src/common)

arma at seul.org arma at seul.org
Mon Nov 10 00:41:07 UTC 2008


Author: arma
Date: 2008-11-09 19:41:07 -0500 (Sun, 09 Nov 2008)
New Revision: 17232

Modified:
   tor/trunk/src/common/compat.c
Log:
better error message when you set User but start tor as non-root.
hopefully will address bug 857.


Modified: tor/trunk/src/common/compat.c
===================================================================
--- tor/trunk/src/common/compat.c	2008-11-10 00:27:20 UTC (rev 17231)
+++ tor/trunk/src/common/compat.c	2008-11-10 00:41:07 UTC (rev 17232)
@@ -1052,7 +1052,8 @@
 
   /* 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;
   }



More information about the tor-commits mailing list