Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ else
endif

ONEWAY?=no
CLEANFULL?=no

export MYLDFLAGS= "${LDFLAGS}"
export MYCFLAGS= "${CFLAGS}"
Expand Down Expand Up @@ -137,10 +136,6 @@ ifdef DEBUG
OSSEC_CFLAGS+=-g
endif #DEBUG

ifneq (,$(filter ${CLEANFULL},yes y Y 1))
DEFINES+=-DCLEANFULL
endif

ifneq (,$(filter ${ONEWAY},yes y Y 1))
DEFINES+=-DONEWAY_ENABLED
endif
Expand Down Expand Up @@ -571,7 +566,6 @@ settings:
@echo " REUSE_ID: ${REUSE_ID}"
@echo " DATABASE: ${DATABASE}"
@echo " ONEWAY: ${ONEWAY}"
@echo " CLEANFULL: ${CLEANFULL}"
@echo "User settings:"
@echo " OSSEC_GROUP: ${OSSEC_GROUP}"
@echo " OSSEC_USER: ${OSSEC_USER}"
Expand Down
5 changes: 0 additions & 5 deletions src/os_maild/maild.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,8 @@
#define BODY_SIZE OS_MAXSTR + OS_SIZE_1024

#define SMS_SUBJECT "OSSEC %d - %d - %s"
#define MAIL_SUBJECT "OSSEC Notification - %s - Alert level %d"
#define MAIL_SUBJECT_FULL "OSSEC Alert - %s - Level %d - %s"

/* Full subject without ossec in the name */
#ifdef CLEANFULL
#define MAIL_SUBJECT_FULL2 "%d - %s - %s"
#endif

#ifdef LIBGEOIP_ENABLED
#define MAIL_BODY "\r\nOSSEC HIDS Notification.\r\n" \
Expand Down
25 changes: 5 additions & 20 deletions src/os_maild/os_maild_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,26 +144,11 @@ MailMsg *OS_RecvMailQ(file_queue *fileq, struct tm *p,
*subject_host = '\0';
}

/* We have two subject options - full and normal */
if (Mail->subject_full == 0) {
/* Option for a clean full subject (without ossec in the name) */
#ifdef CLEANFULL
snprintf(mail->subject, SUBJECT_SIZE - 1, MAIL_SUBJECT_FULL2,
al_data->level,
al_data->comment,
al_data->location);
#else
snprintf(mail->subject, SUBJECT_SIZE - 1, MAIL_SUBJECT_FULL,
al_data->location,
al_data->level,
al_data->comment);
#endif
} else {
snprintf(mail->subject, SUBJECT_SIZE - 1, MAIL_SUBJECT,
al_data->location,
al_data->level);
}

/* Option for a clean full subject (without ossec in the name) */
snprintf(mail->subject, SUBJECT_SIZE - 1, MAIL_SUBJECT_FULL2,
al_data->level,
al_data->comment,
al_data->location);

/* Fix subject back */
if (subject_host) {
Expand Down