Skip to content

Commit

Permalink
Remove shared help from ossec-maild
Browse files Browse the repository at this point in the history
Implement fixes for ossec#207. Stop using shared help in ossec-maild.
  • Loading branch information
awiddersheim committed Aug 22, 2014
1 parent cf9ec82 commit 40af29c
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
24 changes: 22 additions & 2 deletions src/os_maild/maild.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ int main(int argc, char **argv)
print_version();
break;
case 'h':
help(ARGV0);
help_local();
break;
case 'd':
nowDebug();
Expand Down Expand Up @@ -83,7 +83,7 @@ int main(int argc, char **argv)
test_config = 1;
break;
default:
help(ARGV0);
help_local();
break;
}

Expand Down Expand Up @@ -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 <user> Run as 'user'");
print_out(" -g <group> Run as 'group'");
print_out(" -c <config> Read the 'config' file");
print_out(" -D <dir> Chroot to 'dir'");
print_out(" ");
exit(1);
}

/* EOF */
4 changes: 4 additions & 0 deletions src/os_maild/maild.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 40af29c

Please sign in to comment.