]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Improve error reporting for <security:runas{user,group}>.
authorPeter Powell <petpow@saberuk.com>
Tue, 24 Sep 2013 21:36:28 +0000 (22:36 +0100)
committerPeter Powell <petpow@saberuk.com>
Thu, 26 Sep 2013 14:54:37 +0000 (15:54 +0100)
docs/conf/inspircd.conf.example
src/inspircd.cpp

index 9512e17c448c92f4ece28ec03d7b0ab656f7fd69..20344792e864f6018f695877246d6176401d30fc 100644 (file)
           #  no        Do not show
           operspywhois="no"
 
-          # runasuser: If this is set, InspIRCd will attempt to setuid
-          # to run as this user- allows binding of ports under 1024.
+          # runasuser: If this is set, InspIRCd will attempt to switch
+          # to run as this user, which allows binding of ports under 1024.
+          # You should NOT set this unless you are starting as root.
           # NOT SUPPORTED/NEEDED UNDER WINDOWS.
           #runasuser=""
 
-          # runasgroup: If this is set, InspIRCd will attempt to set group
-          # to run under this group, which allows binding of ports under 1024
+          # runasgroup: If this is set, InspIRCd will attempt to switch
+          # to run as this group, which allows binding of ports under 1024.
+          # You should NOT set this unless you are starting as root.
           # NOT SUPPORTED/NEEDED UNDER WINDOWS.
           #runasgroup=""
 
index 9d92888a38ec05bb4d1c437154e0c3979b536f93..b201e38c6e6e5c71bf0600f61898fa9a4255670b 100644 (file)
@@ -693,7 +693,7 @@ InspIRCd::InspIRCd(int argc, char** argv) :
 
                if (!g)
                {
-                       this->Logs->Log("SETGUID", DEFAULT, "getgrnam() failed (bad user?): %s", strerror(errno));
+                       this->Logs->Log("SETGUID", DEFAULT, "getgrnam(%s) failed (wrong group?): %s", SetGroup.c_str(), strerror(errno));
                        this->QuickExit(0);
                }
 
@@ -701,7 +701,7 @@ InspIRCd::InspIRCd(int argc, char** argv) :
 
                if (ret == -1)
                {
-                       this->Logs->Log("SETGUID", DEFAULT, "setgid() failed (bad user?): %s", strerror(errno));
+                       this->Logs->Log("SETGUID", DEFAULT, "setgid() failed (wrong group?): %s", strerror(errno));
                        this->QuickExit(0);
                }
        }
@@ -716,7 +716,7 @@ InspIRCd::InspIRCd(int argc, char** argv) :
 
                if (!u)
                {
-                       this->Logs->Log("SETGUID", DEFAULT, "getpwnam() failed (bad user?): %s", strerror(errno));
+                       this->Logs->Log("SETGUID", DEFAULT, "getpwnam(%s) failed (wrong user?): %s", SetUser.c_str(), strerror(errno));
                        this->QuickExit(0);
                }
 
@@ -724,7 +724,7 @@ InspIRCd::InspIRCd(int argc, char** argv) :
 
                if (ret == -1)
                {
-                       this->Logs->Log("SETGUID", DEFAULT, "setuid() failed (bad user?): %s", strerror(errno));
+                       this->Logs->Log("SETGUID", DEFAULT, "setuid() failed (wrong user?): %s", strerror(errno));
                        this->QuickExit(0);
                }
        }