1
0
mirror of https://github.com/osmarks/ngircd.git synced 2024-12-12 09:50:29 +00:00

"IncludeDir" can't be overwritten by included files

This commit is contained in:
Alexander Barton 2013-05-24 22:40:23 +02:00
parent f206fda8ae
commit 891dbd2acc

View File

@ -1684,6 +1684,12 @@ Handle_OPTIONS(const char *File, int Line, char *Var, char *Arg)
return;
}
if (strcasecmp(Var, "IncludeDir") == 0) {
if (Conf_IncludeDir[0]) {
Config_Error(LOG_ERR,
"%s, line %d: Can't overwrite value of \"IncludeDir\" variable!",
File, Line);
return;
}
len = strlcpy(Conf_IncludeDir, Arg, sizeof(Conf_IncludeDir));
if (len >= sizeof(Conf_IncludeDir))
Config_Error_TooLong(File, Line, Var);