diff options
author | Attila Molnar <attilamolnar@hush.com> | 2013-09-26 08:01:15 -0700 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2013-09-26 08:01:15 -0700 |
commit | 5ad3a1cd8c8d09a4f2d350a53089af392cf4be0f (patch) | |
tree | c5ed56ef297da359fa722e844c03261c4376ca5f | |
parent | b8440f4a023069e31f0af75dd9c15af3c3f9a26c (diff) | |
parent | e51ea66534e407bd5314d2df3ecdaf8ef2e7d310 (diff) |
Merge pull request #638 from SaberUK/insp20+runas-fix
Improve error reporting for <security:runas{user,group}>.
-rw-r--r-- | docs/conf/inspircd.conf.example | 10 | ||||
-rw-r--r-- | src/inspircd.cpp | 8 |
2 files changed, 10 insertions, 8 deletions
diff --git a/docs/conf/inspircd.conf.example b/docs/conf/inspircd.conf.example index 9512e17c4..20344792e 100644 --- a/docs/conf/inspircd.conf.example +++ b/docs/conf/inspircd.conf.example @@ -718,13 +718,15 @@ # 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="" diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 9d92888a3..b201e38c6 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -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); } } |