From 134a7beb7abb77cd3e63a59591f54ea2ddde8890 Mon Sep 17 00:00:00 2001 From: Jon Schipp Date: Tue, 22 Jul 2014 14:15:07 -0500 Subject: mausezahn: re-work configuration file /etc/netsniff-ng/mausezahn.conf as mentioned in manual was never read because code was statically set to mz.cfg in /etc/mausezahn. This patch simplifies things by using the existing /etc/netsniff-ng directory created in the default install and still using a single configuration but with a an easier to remember name e.g. ${tool}.conf. Example: $ cat /etc/netsniff-ng/mausezahn.conf user = testuser password = testpassword enable = awesome Pre-patch: $ mausezahn -x Mausezahn accepts incoming Telnet connections on port 25542. mz: Problems opening config file. Will use defaults Post-patch: $ mausezahn -x Mausezahn accepts incoming Telnet connections on port 25542. Signed-off-by: Jon Schipp Signed-off-by: Daniel Borkmann --- staging/cli.c | 4 ++-- staging/mz.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'staging') diff --git a/staging/cli.c b/staging/cli.c index 0e22640..ad040a1 100644 --- a/staging/cli.c +++ b/staging/cli.c @@ -27,13 +27,13 @@ void mz_cli_init() { amp_head = automops_init(); - // Initialize default credentials (will be overwritten by mz.cfg) + // Initialize default credentials (will be overwritten by mausezahn.cfg) strcpy(mz_username, MZ_DEFAULT_USERNAME); strcpy(mz_password, MZ_DEFAULT_PASSWORD); strcpy(mz_enable, MZ_DEFAULT_ENABLE_PASSWORD); // read login credentials from config file - if (cli_read_cfg("mz.cfg")) { + if (cli_read_cfg("mausezahn.cfg")) { fprintf(stderr, "mz: Problems opening config file. Will use defaults\n"); } diff --git a/staging/mz.h b/staging/mz.h index cad091f..d9ac716 100644 --- a/staging/mz.h +++ b/staging/mz.h @@ -79,7 +79,7 @@ static inline void verbose_l2(const char *format, ...) // "Dies ist ein schrecklicher Ort." -#define MZ_DEFAULT_CONFIG_PATH "/etc/mausezahn/" // see also mz_default_config_path below +#define MZ_DEFAULT_CONFIG_PATH "/etc/netsniff-ng/" // see also mz_default_config_path below #define MZ_DEFAULT_LOG_PATH "/var/log/mausezahn/" // see also mz_default_log_path below #define SLEEP usleep // The sleep function to use. Consider 'nanosleep' in future. -- cgit v1.2.3-54-g00ecf