Display correct error message when "Server{UID|GID}" is invalid
authorAlexander Barton <alex@barton.de>
Tue, 3 Jan 2012 19:37:41 +0000 (20:37 +0100)
committerAlexander Barton <alex@barton.de>
Tue, 3 Jan 2012 19:37:41 +0000 (20:37 +0100)
This partly closes bug #118. ngIRCd still starts up even when
Server{UID|GID} is invalid: then the daemon falls back to "nobody"
when running with root(0) privileges (as before).

src/ngircd/conf.c

index b0c7fb4bf0c50a79b2da6ed158c8161894636c62..f18016b5c13f7a852ca61ce688a0048980370ef4 100644 (file)
@@ -1308,7 +1308,9 @@ Handle_GLOBAL( int Line, char *Var, char *Arg )
                else {
                        Conf_GID = (unsigned int)atoi(Arg);
                        if (!Conf_GID && strcmp(Arg, "0"))
-                               Config_Error_NaN(Line, Var);
+                               Config_Error(LOG_WARNING,
+                                            "%s, line %d: Value of \"%s\" is not a valid group name or ID!",
+                                            NGIRCd_ConfFile, Line, Var);
                }
                return;
        }
@@ -1319,7 +1321,9 @@ Handle_GLOBAL( int Line, char *Var, char *Arg )
                else {
                        Conf_UID = (unsigned int)atoi(Arg);
                        if (!Conf_UID && strcmp(Arg, "0"))
-                               Config_Error_NaN(Line, Var);
+                               Config_Error(LOG_WARNING,
+                                            "%s, line %d: Value of \"%s\" is not a valid user name or ID!",
+                                            NGIRCd_ConfFile, Line, Var);
                }
                return;
        }