Fixed bug relating to configuration file not being read.
This commit is contained in:
+1
-4
@@ -120,7 +120,7 @@ int drop_privs(char *user) {
|
|||||||
int
|
int
|
||||||
main (int argc, char **argv)
|
main (int argc, char **argv)
|
||||||
{
|
{
|
||||||
char cfgfile[256];
|
char cfgfile[256] = DEFAULT_CONFIG_FILE;
|
||||||
FILE *config;
|
FILE *config;
|
||||||
|
|
||||||
int i, err;
|
int i, err;
|
||||||
@@ -230,9 +230,6 @@ main (int argc, char **argv)
|
|||||||
syslog(LOG_NOTICE, "server built on %s",
|
syslog(LOG_NOTICE, "server built on %s",
|
||||||
build_date);
|
build_date);
|
||||||
|
|
||||||
if (!cfgfile)
|
|
||||||
strncpy(cfgfile, DEFAULT_CONFIG_FILE, sizeof(cfgfile));
|
|
||||||
|
|
||||||
if ((config = fopen(cfgfile, "r")) == NULL) {
|
if ((config = fopen(cfgfile, "r")) == NULL) {
|
||||||
syslog(LOG_WARNING, "no configuration file found... using defaults");
|
syslog(LOG_WARNING, "no configuration file found... using defaults");
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user