From 40af29caaccab5480e930890792dc099ce699a62 Mon Sep 17 00:00:00 2001 From: awiddersheim Date: Fri, 22 Aug 2014 15:07:20 -0400 Subject: [PATCH] Remove shared help from ossec-maild Implement fixes for #207. Stop using shared help in ossec-maild. --- src/os_maild/maild.c | 24 ++++++++++++++++++++++-- src/os_maild/maild.h | 4 ++++ 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/src/os_maild/maild.c b/src/os_maild/maild.c index 976796e6d..0a1ba0671 100755 --- a/src/os_maild/maild.c +++ b/src/os_maild/maild.c @@ -51,7 +51,7 @@ int main(int argc, char **argv) print_version(); break; case 'h': - help(ARGV0); + help_local(); break; case 'd': nowDebug(); @@ -83,7 +83,7 @@ int main(int argc, char **argv) test_config = 1; break; default: - help(ARGV0); + help_local(); break; } @@ -478,4 +478,24 @@ void OS_Run(MailConfig *mail) } } +/* print help statement */ +void help_local() +{ + print_header(); + print_out(" %s: -[Vhdt] [-u user] [-g group] [-c config] [-D dir]", ARGV0); + print_out(" -V Version and license message"); + print_out(" -h This help message"); + print_out(" -d Execute in debug mode. This parameter"); + print_out(" can be specified up to two times"); + print_out(" to increase the debug level."); + print_out(" -t Test configuration"); + print_out(" -f Run in foreground"); + print_out(" -u Run as 'user'"); + print_out(" -g Run as 'group'"); + print_out(" -c Read the 'config' file"); + print_out(" -D Chroot to 'dir'"); + print_out(" "); + exit(1); +} + /* EOF */ diff --git a/src/os_maild/maild.h b/src/os_maild/maild.h index ed0a0a87a..4042baf61 100755 --- a/src/os_maild/maild.h +++ b/src/os_maild/maild.h @@ -80,6 +80,10 @@ int OS_Sendsms(MailConfig *mail, struct tm *p, MailMsg *sms_msg); int OS_SendCustomEmail(char **to, char *subject, char *smtpserver, char *from, char *idsname, FILE *fp, struct tm *p); +/* print help message */ +void help_local(); + + /* Mail timeout used by the file-queue */ int mail_timeout;